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/ConfigFile.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/ConfigFile.h')
-rw-r--r-- | tester/covoar/ConfigFile.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/tester/covoar/ConfigFile.h b/tester/covoar/ConfigFile.h new file mode 100644 index 0000000..88da81b --- /dev/null +++ b/tester/covoar/ConfigFile.h @@ -0,0 +1,86 @@ + + +/*! @file ConfigFile.h + * @brief Configuration File Reader Specification + * + * This file contains the specification of the FileReader class. + */ + +#ifndef __CONFIGURATION_FILE_H__ +#define __CONFIGURATION_FILE_H__ + +namespace Configuration { + + /*! + * + * This structure contains the configuration parameter + * name and value pair. + */ + typedef struct { + const char *option; + const char *value; + } Options_t; + + + /*! @class FileReader + * + * This is the specification of the FileReader base class. + * All FileReader implementations inherit from this class. + */ + class FileReader { + + public: + + /*! + * This method constructs a FileReader instance. + * + * @param[in] options is the set of options + */ + FileReader( + Options_t *options + ); + + /*! + * This method destructs a FileReader instance. + */ + virtual ~FileReader(); + + /*! + * This method processes the configuratino information from the input + * @a file. + * + * @param[in] file is the coverage file to process + * + * @return Returns TRUE if the method succeeded and FALSE if it failed. + */ + virtual bool processFile( + const char* const file + ); + + bool setOption( + const char* const option, + const char* const value + ); + + const char *getOption( + const char* const option + ); + + void printOptions(void); + + private: + /*! + * This method processes the configuratino information from the input + * @a file. + * + * @param[in] option is the name of the option + * @param[in] value is the associated value + * + * @return Returns TRUE if the method succeeded and FALSE if it failed. + */ + Options_t *options_m; + + }; + +} +#endif |