#ifndef _CONFIG_H_ #define _CONFIG_H_ #include "list.h" class Config { public: ~Config(); bool parseFile(const char* name); void show(); const char* getParameter(const char* section, const char* name); const char* getString(const char* section, const char* name, char* def); int getInteger(const char* section, const char* name, int def); Iterator* createIterator(const char* section, const char* name); private: class Tupel : private ListEntry { public: Tupel(const char* name, const char* value); ~Tupel(); const char* name; const char* value; }; class Section : private ListEntry
{ public: class SectionIterator : public Iterator { public: SectionIterator(Section* section, const char* name); ~SectionIterator(); bool hasNext(); char* next(); void remove() {} void reset(); private: Iterator* it; Tupel* nexttup; const char* name; }; Section(const char* name); ~Section(); bool addTupel(const char* name, const char* option); const char* getTupelValue(const char* name); void show(); const char* name; List tupelList; }; Section* addSection(const char* name); Section* getSection(const char* name); List
sectionList; }; #endif // _CONFIG_H_