cmParseMumpsCoverage.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmParseMumpsCoverage_h
  11. #define cmParseMumpsCoverage_h
  12. #include "cmStandardIncludes.h"
  13. #include "cmCTestCoverageHandler.h"
  14. /** \class cmParseMumpsCoverage
  15. * \brief Parse Mumps coverage information
  16. *
  17. * This class is used as the base class for Mumps coverage
  18. * parsing.
  19. */
  20. class cmParseMumpsCoverage
  21. {
  22. public:
  23. cmParseMumpsCoverage(cmCTestCoverageHandlerContainer& cont,
  24. cmCTest* ctest);
  25. virtual ~cmParseMumpsCoverage();
  26. // This is the toplevel coverage file locating the coverage files
  27. // and the mumps source code package tree.
  28. bool ReadCoverageFile(const char* file);
  29. protected:
  30. // sub classes will use this to
  31. // load all coverage files found in the given directory
  32. virtual bool LoadCoverageData(const char* d) = 0;
  33. // search the package directory for mumps files and fill
  34. // in the RoutineToDirectory map
  35. bool LoadPackages(const char* dir);
  36. // initialize the coverage information for a single mumps file
  37. void InitializeMumpsFile(std::string& file);
  38. // Find mumps file for routine
  39. bool FindMumpsFile(std::string const& routine,
  40. std::string& filepath);
  41. protected:
  42. std::map<cmStdString, cmStdString> RoutineToDirectory;
  43. cmCTestCoverageHandlerContainer& Coverage;
  44. cmCTest* CTest;
  45. };
  46. #endif