cconfigreader.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __CCONFIGREADER_H
00017 #define __CCONFIGREADER_H
00018
00019 #include "simkerneldefs.h"
00020
00021 NAMESPACE_BEGIN
00022
00023 class cConfiguration;
00024
00033 class cConfigurationReader
00034 {
00035 public:
00039 class KeyValue {
00040 public:
00041 virtual ~KeyValue() {}
00042 virtual const char *getKey() const = 0;
00043 virtual const char *getValue() const = 0;
00044 virtual const char *getBaseDirectory() const = 0;
00045 virtual const char *getFileName() const = 0;
00046 virtual int getLineNumber() const = 0;
00047 };
00048
00049 public:
00053 virtual ~cConfigurationReader() {}
00054
00061 virtual void initializeFrom(cConfiguration *bootConfig) = 0;
00062
00067 virtual const char *getFileName() const = 0;
00068
00075 virtual const char *getDefaultBaseDirectory() const = 0;
00076
00080 virtual int getNumSections() const = 0;
00081
00086 virtual const char *getSectionName(int sectionId) const = 0;
00087
00092 virtual int getNumEntries(int sectionId) const = 0;
00093
00099 virtual const KeyValue& getEntry(int sectionId, int entryId) const = 0;
00100
00105 virtual void dump() const = 0;
00106 };
00107
00108 NAMESPACE_END
00109
00110 #endif
00111
00112