source: rtems-tools/tester/covoar/ReportsHtml.h @ fb987e8

5
Last change on this file since fb987e8 was 100f517, checked in by Chris Johns <chrisj@…>, on 05/09/14 at 11:50:37

covoar: Merger the covoar source from rtems-testing.git.

Use waf to build covoar.

  • Property mode set to 100644
File size: 5.6 KB
Line 
1/*! @file ReportsHtml.h
2 *  @brief Reports in HTML Specification
3 *
4 *  This file contains the specification of the Reports methods.  This
5 *  collection of methods is used to generate the various reports of
6 *  the analysis results.
7 */
8
9#ifndef __REPORTSHTML_H__
10#define __REPORTSHTML_H__
11
12#include <stdint.h>
13#include "ReportsBase.h"
14#include "Explanations.h"
15
16namespace Coverage {
17
18/*!
19 *   This class contains all methods and data necessary to
20 *   do all of the HTML style reports.
21 */
22class ReportsHtml: public ReportsBase {
23
24  public:
25    ReportsHtml( time_t timestamp );
26   ~ReportsHtml();
27
28   /*!
29    *  This method produces an index file.
30    *
31    *  @param[in] fileName identifies the file name.
32    */
33   void WriteIndex(
34     const char* const fileName
35   );
36
37   /*!
38    *  This method produces a report that contains information about each
39    *  uncovered branch statement.
40    *
41    *  @param[in] fileName identifies the branch report file name
42    */
43   void WriteBranchReport(
44     const char* const fileName
45   );
46
47   /*!
48    *  This method produces a report that contains information about each
49    *  uncovered range of bytes.
50    *
51    *  @param[in] fileName identifies the coverage report file name
52    */
53   void WriteCoverageReport(
54     const char* const fileName
55   );
56
57   /*!
58    *  This method produces a summary report that lists each uncovered
59    *  range of bytes.
60    *
61    *  @param[in] fileName identifies the size report file name
62    */
63   void WriteSizeReport(
64     const char* const fileName
65   );
66
67  protected:
68
69    /*!
70     *  This variable tracks the annotated state at the time the
71     *  last line was output.  This allows the text formating to change
72     *  based upon the type of lines being put out: source code or assembly
73     *  object dump line....
74     */
75    AnnotatedLineState_t lastState_m;
76
77    /* Inherit documentation from base class. */
78    virtual FILE* OpenAnnotatedFile(
79      const char* const fileName
80    );
81
82    /* Inherit documentation from base class. */
83    virtual FILE* OpenBranchFile(
84      const char* const fileName,
85      bool              hasBranches
86    );
87
88    /* Inherit documentation from base class. */
89    virtual FILE* OpenCoverageFile(
90      const char* const fileName
91    );
92
93    /* Inherit documentation from base class. */
94    FILE* OpenNoRangeFile(
95      const char* const fileName
96    );
97
98    /* Inherit documentation from base class. */
99    virtual FILE* OpenSizeFile(
100      const char* const fileName
101    );
102
103    /* Inherit documentation from base class. */
104    virtual FILE* OpenSymbolSummaryFile(
105      const char* const fileName
106    );
107
108    /* Inherit documentation from base class. */
109    virtual void CloseAnnotatedFile(
110      FILE*  aFile
111    );
112
113    /* Inherit documentation from base class. */
114    virtual void CloseBranchFile(
115      FILE*  aFile,
116      bool   hasBranches
117    );
118
119    /* Inherit documentation from base class. */
120    virtual void CloseCoverageFile(
121      FILE*  aFile
122    );
123
124    /* Inherit documentation from base class. */
125    void CloseNoRangeFile(
126      FILE*  aFile
127    );
128
129    /* Inherit documentation from base class. */
130    virtual void CloseSizeFile(
131      FILE*  aFile
132    );
133
134    /* Inherit documentation from base class. */
135    virtual void CloseSymbolSummaryFile(
136      FILE*  aFile
137    );
138
139    /* Inherit documentation from base class. */
140    virtual void PutAnnotatedLine(
141      FILE*                aFile,
142      AnnotatedLineState_t state,
143      std::string          line,
144      uint32_t             id
145    );
146
147    /* Inherit documentation from base class. */
148     virtual void AnnotatedStart(
149      FILE*                aFile
150    );
151 
152    /* Inherit documentation from base class. */
153     virtual void AnnotatedEnd(
154      FILE*                aFile
155    );
156 
157    /* Inherit documentation from base class. */
158    virtual bool PutNoBranchInfo(
159      FILE* report
160    );
161
162    /* Inherit documentation from base class. */
163    virtual bool PutBranchEntry(
164      FILE*                                            report,
165      unsigned int                                     number,
166      Coverage::DesiredSymbols::symbolSet_t::iterator  symbolPtr,
167      Coverage::CoverageRanges::ranges_t::iterator     rangePtr
168    );
169
170    /* Inherit documentation from base class. */
171    virtual void putCoverageNoRange(
172      FILE*        report,
173      FILE*        noRangeFile,
174      unsigned int number,
175      std::string  symbol
176    );
177
178    /* Inherit documentation from base class. */
179    virtual bool PutCoverageLine(
180      FILE*                                           report,
181      unsigned int                                    number,
182      Coverage::DesiredSymbols::symbolSet_t::iterator ditr,
183      Coverage::CoverageRanges::ranges_t::iterator    ritr
184    );
185
186    /* Inherit documentation from base class. */
187    virtual bool PutSizeLine(
188      FILE*                                           report,
189      unsigned int                                    number,
190      Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
191      Coverage::CoverageRanges::ranges_t::iterator    range
192    );
193
194    /* Inherit documentation from base class. */
195    virtual bool PutSymbolSummaryLine(
196      FILE*                                           report,
197      unsigned int                                    number,
198      Coverage::DesiredSymbols::symbolSet_t::iterator symbol
199    );
200
201    /* Inherit documentation from base class. */
202    virtual FILE* OpenFile(
203      const char* const fileName
204    );
205
206    /* Inherit documentation from base class. */
207    virtual bool WriteExplationFile(
208      const char*                  fileName,
209      const Coverage::Explanation* explanation
210    );
211  };
212
213}
214
215#endif
Note: See TracBrowser for help on using the repository browser.