cmParseMumpsCoverage.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 cmParseMumpsCoverage_h
  11. #define cmParseMumpsCoverage_h
  12. #include "cmCTestCoverageHandler.h"
  13. /** \class cmParseMumpsCoverage
  14. * \brief Parse Mumps coverage information
  15. *
  16. * This class is used as the base class for Mumps coverage
  17. * parsing.
  18. */
  19. class cmParseMumpsCoverage
  20. {
  21. public:
  22. cmParseMumpsCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest);
  23. virtual ~cmParseMumpsCoverage();
  24. // This is the toplevel coverage file locating the coverage files
  25. // and the mumps source code package tree.
  26. bool ReadCoverageFile(const char* file);
  27. protected:
  28. // sub classes will use this to
  29. // load all coverage files found in the given directory
  30. virtual bool LoadCoverageData(const char* d) = 0;
  31. // search the package directory for mumps files and fill
  32. // in the RoutineToDirectory map
  33. bool LoadPackages(const char* dir);
  34. // initialize the coverage information for a single mumps file
  35. void InitializeMumpsFile(std::string& file);
  36. // Find mumps file for routine
  37. bool FindMumpsFile(std::string const& routine, std::string& filepath);
  38. protected:
  39. std::map<std::string, std::string> RoutineToDirectory;
  40. cmCTestCoverageHandlerContainer& Coverage;
  41. cmCTest* CTest;
  42. };
  43. #endif