blob: 0339c127b5f480a1e668383cd14c277baac86ed7 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*! @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 std::string& file );
bool setOption(
const char* const option,
const char* const value
);
const char *getOption(
const char* const option
);
void printOptions();
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
|