summaryrefslogtreecommitdiffstats
path: root/tester/covoar/CoverageWriterBase.h
blob: ee8c148857cc57cc88314399b3ef1cea310db7d2 (plain) (blame)
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
52
53
54
55
56
57
58
59
/*! @file CoverageWriterBase.h
 *  @brief CoverageWriterBase Specification
 *
 *  This file contains the specification of the CoverageWriterBase class.
 */

#ifndef __COVERAGE_WRITER_BASE_H__
#define __COVERAGE_WRITER_BASE_H__

#include <stdint.h>

#include <string>

#include "CoverageMapBase.h"

namespace Coverage {

  /*! @class CoverageWriterBase
   *
   *  This is the specification of the CoverageWriter base class.
   *  All CoverageWriter implementations inherit from this class.
   */
  class CoverageWriterBase {

  public:

    /*!
     *  This method constructs a CoverageWriterBase instance.
     */
    CoverageWriterBase();

    /*!
     *  This method destructs a CoverageWriterBase instance.
     */
    virtual ~CoverageWriterBase();

    /*!
     *  This method writes the @a coverage map for the specified
     *  address range and writes it to @file.
     *
     *  @param[in] file specifies the name of the file to write
     *  @param[in] coverage specifies the coverage map to output
     *  @param[in] lowAddress specifies the lowest address in the
     *             coverage map to process
     *  @param[in] highAddress specifies the highest address in the
     *             coverage map to process
     *
     *  @return Returns TRUE if the method succeeded and FALSE if it failed.
     */
    virtual void writeFile(
      const std::string& file,
      CoverageMapBase*   coverage,
      uint32_t           lowAddress,
      uint32_t           highAddress
    ) = 0;
  };

}
#endif