2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2012-05-01 17:35:07 +00:00
|
|
|
#ifndef cmParseMumpsCoverage_h
|
|
|
|
#define cmParseMumpsCoverage_h
|
|
|
|
|
2017-04-11 20:00:21 +00:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2016-08-24 20:01:40 +00:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class cmCTest;
|
|
|
|
class cmCTestCoverageHandlerContainer;
|
2012-05-01 17:35:07 +00:00
|
|
|
|
|
|
|
/** \class cmParseMumpsCoverage
|
|
|
|
* \brief Parse Mumps coverage information
|
|
|
|
*
|
|
|
|
* This class is used as the base class for Mumps coverage
|
|
|
|
* parsing.
|
|
|
|
*/
|
|
|
|
class cmParseMumpsCoverage
|
|
|
|
{
|
|
|
|
public:
|
2016-05-16 14:34:04 +00:00
|
|
|
cmParseMumpsCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest);
|
2012-05-01 18:36:18 +00:00
|
|
|
virtual ~cmParseMumpsCoverage();
|
2012-05-01 17:35:07 +00:00
|
|
|
// This is the toplevel coverage file locating the coverage files
|
|
|
|
// and the mumps source code package tree.
|
|
|
|
bool ReadCoverageFile(const char* file);
|
2016-05-16 14:34:04 +00:00
|
|
|
|
2012-05-01 17:35:07 +00:00
|
|
|
protected:
|
|
|
|
// sub classes will use this to
|
|
|
|
// load all coverage files found in the given directory
|
|
|
|
virtual bool LoadCoverageData(const char* d) = 0;
|
|
|
|
// search the package directory for mumps files and fill
|
|
|
|
// in the RoutineToDirectory map
|
|
|
|
bool LoadPackages(const char* dir);
|
|
|
|
// initialize the coverage information for a single mumps file
|
|
|
|
void InitializeMumpsFile(std::string& file);
|
2012-05-01 21:00:43 +00:00
|
|
|
// Find mumps file for routine
|
2016-05-16 14:34:04 +00:00
|
|
|
bool FindMumpsFile(std::string const& routine, std::string& filepath);
|
|
|
|
|
2012-05-01 17:35:07 +00:00
|
|
|
protected:
|
2014-02-10 05:21:34 +00:00
|
|
|
std::map<std::string, std::string> RoutineToDirectory;
|
2012-05-01 17:35:07 +00:00
|
|
|
cmCTestCoverageHandlerContainer& Coverage;
|
|
|
|
cmCTest* CTest;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|