Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

rtini.h

Go to the documentation of this file.
00001 /*
00002  * rtini.h
00003  * 
00004  * Copyright (c) 2000-2004 by Florian Fischer (florianfischer@gmx.de)
00005  * and Martin Trautmann (martintrautmann@gmx.de) 
00006  * 
00007  * This file may be distributed and/or modified under the terms of the 
00008  * GNU General Public License version 2 as published by the Free Software 
00009  * Foundation. 
00010  * 
00011  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013  * 
00014  */
00015 
00023 #ifndef __LRT_INI__
00024 #define __LRT_INI__
00025 
00026 #include "rtmap.h"
00027 
00028 namespace lrt {
00029 
00035 class IniSection : public StringMap<String> {
00036 public:
00038         IniSection() : StringMap<String>(false) {}
00039 
00041         IniSection(const IniSection& is) : StringMap<String>(is) {}
00042 
00043         virtual ~IniSection() {}
00044 };
00045 
00056 class IniFile {
00057 public:
00058         typedef StringMap<IniSection>::Iterator Iterator;
00059 
00061         IniFile();
00065         IniFile(const String& filename);
00066 
00068         bool hasSection(const String& name) const;
00069         
00075         IniSection& getSection(const String& name);
00076 
00080         const IniSection& getSectionConst(const String& name) const;
00081         
00087         void addSection(const String& name, const IniSection& section);
00088 
00092         bool removeSection(const String& name);
00093 
00097         Iterator begin();
00098 
00100         Iterator begin() const;
00101 
00105         bool read(const String& filename);
00106 
00111         bool write(const String& filename);
00112 
00113 private:
00114         StringMap<IniSection> data;
00115 };
00116 
00117 } // namespace
00118 
00119 #endif
00120 

This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer