summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmParseMumpsCoverage.h
blob: ab957b88bf7e92d89baa0504ed969c1ddfd660fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc.

  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/

#ifndef cmParseMumpsCoverage_h
#define cmParseMumpsCoverage_h

#include "cmCTestCoverageHandler.h"

/** \class cmParseMumpsCoverage
 * \brief Parse Mumps coverage information
 *
 * This class is used as the base class for Mumps coverage
 * parsing.
 */
class cmParseMumpsCoverage
{
public:
  cmParseMumpsCoverage(cmCTestCoverageHandlerContainer& cont,
    cmCTest* ctest);
  virtual ~cmParseMumpsCoverage();
  // This is the toplevel coverage file locating the coverage files
  // and the mumps source code package tree.
  bool ReadCoverageFile(const char* file);
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);
  // Find mumps file for routine
  bool FindMumpsFile(std::string const& routine,
                     std::string& filepath);
protected:
  std::map<std::string, std::string> RoutineToDirectory;
  cmCTestCoverageHandlerContainer& Coverage;
  cmCTest* CTest;
};

#endif