cmParseGTMCoverage.h 1.7 KB

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