source: rtems-tools/tester/covoar/ConfigFile.h @ f9a4b2c

5
Last change on this file since f9a4b2c 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: 1.7 KB
Line 
1
2
3/*! @file ConfigFile.h
4 *  @brief Configuration File Reader Specification
5 *
6 *  This file contains the specification of the FileReader class.
7 */
8
9#ifndef __CONFIGURATION_FILE_H__
10#define __CONFIGURATION_FILE_H__
11
12namespace Configuration {
13
14  /*!
15   * 
16   *  This structure contains the configuration parameter
17   *  name and value pair.
18   */
19  typedef struct {
20    const char *option;
21    const char *value;
22  } Options_t;
23
24
25  /*! @class FileReader
26   *
27   *  This is the specification of the FileReader base class.
28   *  All FileReader implementations inherit from this class.
29   */
30  class FileReader {
31
32  public:
33
34    /*!
35     *  This method constructs a FileReader instance.
36     *
37     *  @param[in] options is the set of options
38     */
39    FileReader(
40      Options_t *options
41    );
42
43    /*!
44     *  This method destructs a FileReader instance.
45     */
46    virtual ~FileReader();
47
48    /*!
49     *  This method processes the configuratino information from the input
50     *  @a file.
51     *
52     *  @param[in] file is the coverage file to process
53     *
54     *  @return Returns TRUE if the method succeeded and FALSE if it failed.
55     */
56    virtual bool processFile(
57      const char* const     file
58    );
59
60    bool setOption(
61      const char* const option,
62      const char* const value
63    );
64
65    const char *getOption(
66      const char* const option
67    );
68
69    void printOptions(void);
70
71  private:
72    /*!
73     *  This method processes the configuratino information from the input
74     *  @a file.
75     *
76     *  @param[in] option is the name of the option
77     *  @param[in] value is the associated value
78     *
79     *  @return Returns TRUE if the method succeeded and FALSE if it failed.
80     */
81    Options_t *options_m;
82
83  };
84
85}
86#endif
Note: See TracBrowser for help on using the repository browser.