diff options
author | Chris Johns <chrisj@rtems.org> | 2014-05-09 21:50:37 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-06-18 16:48:08 +1200 |
commit | 100f517ab37265acdf067e36b6860020ec8b2184 (patch) | |
tree | 2316c8b888e11dcbcfbfc66a0c1e31991ea20656 /tester/covoar/Explanations.h | |
parent | 4.11: Add ntp patch. (diff) | |
download | rtems-tools-100f517ab37265acdf067e36b6860020ec8b2184.tar.bz2 |
covoar: Merger the covoar source from rtems-testing.git.
Use waf to build covoar.
Diffstat (limited to 'tester/covoar/Explanations.h')
-rw-r--r-- | tester/covoar/Explanations.h | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/tester/covoar/Explanations.h b/tester/covoar/Explanations.h new file mode 100644 index 0000000..9b32358 --- /dev/null +++ b/tester/covoar/Explanations.h @@ -0,0 +1,119 @@ +/*! @file Explanations.h + * @brief Explanations Specification + * + * This file contains the specification of the Explanations class. + */ + +#ifndef __EXPLANATIONS_H__ +#define __EXPLANATIONS_H__ + +#include <map> +#include <stdint.h> +#include <string> +#include <vector> + +namespace Coverage { + + /*! @class Explanation + * + * This class defines the information that comprises an explanation + * of an uncovered range or branch. + */ + class Explanation { + + public: + + /*! + * This member variable contains the starting line number of + * the uncovered range or branch. + */ + std::string startingPoint; + + /*! + * This member variable contains the classification of + * the explanation. + */ + std::string classification; + + /*! + * This member variable contains the multi-line explanation text. + */ + std::vector<std::string> explanation; + + /*! + * This member variable indicates whether this explanation was + * used during analysis. + */ + bool found; + + /*! + * This method constructs an Explanation instance. + */ + Explanation() {found = false;} + + /*! + * This method destructs an Explanation instance. + */ + ~Explanation() {} + }; + + /*! @class Explanations + * + * This class defines a set of Explanation instances. + */ + class Explanations { + + public: + + /*! + * This member variable contains a list of Explanation instances. + */ + std::map<std::string, Explanation> set; + + /*! + * This method constructs an Explanations instance. + */ + Explanations(); + + /*! + * This method destructs an Explanations instance. + */ + ~Explanations(); + + /*! + * This methods loads the explanation information from the + * specified file. + * + * @param[in] explanations specifies the file name containing + * the explanation information + */ + void load( + const char* const explanations + ); + + /*! + * This method returns the explanation associated with the + * specified starting line number. + * + * @param[in] start specifies the starting line number for + * which to search + */ + const Explanation *lookupExplanation( + std::string& start + ); + + /*! + * This method writes a file that contains a list of any + * explanations that were not looked up. + * + * @param[in] fileName specifies the name of the file to write + */ + void writeNotFound( + const char* const fileName + ); + + }; + +} + +#endif |