cmParseGTMCoverage.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 cmParseGTMCoverage_h
  4. #define cmParseGTMCoverage_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmParseMumpsCoverage.h"
  7. #include <string>
  8. class cmCTest;
  9. class cmCTestCoverageHandlerContainer;
  10. /** \class cmParseGTMCoverage
  11. * \brief Parse GTM coverage information
  12. *
  13. * This class is used to parse GTM coverage information for
  14. * mumps.
  15. */
  16. class cmParseGTMCoverage : public cmParseMumpsCoverage
  17. {
  18. public:
  19. cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest);
  20. protected:
  21. // implement virtual from parent
  22. bool LoadCoverageData(const char* dir) override;
  23. // Read a single mcov file
  24. bool ReadMCovFile(const char* f);
  25. // find out what line in a mumps file (filepath) the given entry point
  26. // or function is. lineoffset is set by this method.
  27. bool FindFunctionInMumpsFile(std::string const& filepath,
  28. std::string const& function, int& lineoffset);
  29. // parse a line from a .mcov file, and fill in the
  30. // routine, function, linenumber and coverage count
  31. bool ParseMCOVLine(std::string const& line, std::string& routine,
  32. std::string& function, int& linenumber, int& count);
  33. };
  34. #endif