cmParseGTMCoverage.h 1.7 KB

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