cmParseMumpsCoverage.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmParseMumpsCoverage_h
  4. #define cmParseMumpsCoverage_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <map>
  7. #include <string>
  8. class cmCTest;
  9. class cmCTestCoverageHandlerContainer;
  10. /** \class cmParseMumpsCoverage
  11. * \brief Parse Mumps coverage information
  12. *
  13. * This class is used as the base class for Mumps coverage
  14. * parsing.
  15. */
  16. class cmParseMumpsCoverage
  17. {
  18. public:
  19. cmParseMumpsCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest);
  20. virtual ~cmParseMumpsCoverage();
  21. // This is the toplevel coverage file locating the coverage files
  22. // and the mumps source code package tree.
  23. bool ReadCoverageFile(const char* file);
  24. protected:
  25. // sub classes will use this to
  26. // load all coverage files found in the given directory
  27. virtual bool LoadCoverageData(const char* d) = 0;
  28. // search the package directory for mumps files and fill
  29. // in the RoutineToDirectory map
  30. bool LoadPackages(const char* dir);
  31. // initialize the coverage information for a single mumps file
  32. void InitializeMumpsFile(std::string& file);
  33. // Find mumps file for routine
  34. bool FindMumpsFile(std::string const& routine, std::string& filepath);
  35. protected:
  36. std::map<std::string, std::string> RoutineToDirectory;
  37. cmCTestCoverageHandlerContainer& Coverage;
  38. cmCTest* CTest;
  39. };
  40. #endif