cmake/Source/CTest/cmParseMumpsCoverage.h

45 lines
1.4 KiB
C
Raw Normal View History

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