cmParseMumpsCoverage.h 1.4 KB

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