summaryrefslogtreecommitdiff
path: root/tester/covoar/ConfigFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'tester/covoar/ConfigFile.h')
-rw-r--r--tester/covoar/ConfigFile.h86
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