Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2008, 7:36:33 PM (16 years ago)
Author:
nicolasc
Message:

just a test - don't morge this

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gcc43/src/core/ConfigFileManager.h

    r1505 r1634  
    8282    {
    8383        public:
    84             inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : name_(name), value_(value), bString_(bString), additionalComment_(additionalComment) {}
    85             inline virtual ~ConfigFileEntryValue() {}
    86 
    87             inline virtual const std::string& getName() const
     84            ConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : name_(name), value_(value), bString_(bString), additionalComment_(additionalComment) {}
     85            virtual ~ConfigFileEntryValue() {}
     86
     87            virtual const std::string& getName() const
    8888                { return this->name_; }
    8989
    90             inline virtual void setComment(const std::string& comment)
     90            virtual void setComment(const std::string& comment)
    9191                { this->additionalComment_ = comment; }
    9292
     
    9494            virtual std::string getValue() const;
    9595
    96             inline bool isString() const
     96            bool isString() const
    9797                { return this->bString_; }
    98             inline void setString(bool bString)
     98            void setString(bool bString)
    9999                { this->bString_ = bString; }
    100100
     
    115115    {
    116116        public:
    117             inline ConfigFileEntryVectorValue(const std::string& name, unsigned int index, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : ConfigFileEntryValue(name, value, bString, additionalComment), index_(index) {}
    118             inline virtual ~ConfigFileEntryVectorValue() {}
    119 
    120             inline virtual unsigned int getIndex() const
     117            ConfigFileEntryVectorValue(const std::string& name, unsigned int index, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : ConfigFileEntryValue(name, value, bString, additionalComment), index_(index) {}
     118            virtual ~ConfigFileEntryVectorValue() {}
     119
     120            virtual unsigned int getIndex() const
    121121                { return this->index_; }
    122122
     
    134134    {
    135135        public:
    136             inline ConfigFileEntryComment(const std::string& comment) : comment_(comment) {}
    137             inline virtual ~ConfigFileEntryComment() {}
    138 
    139             inline virtual const std::string& getName() const
     136            ConfigFileEntryComment(const std::string& comment) : comment_(comment) {}
     137            virtual ~ConfigFileEntryComment() {}
     138
     139            virtual const std::string& getName() const
    140140                { return this->comment_; }
    141141
    142             inline virtual void setComment(const std::string& comment)
     142            virtual void setComment(const std::string& comment)
    143143                { this->comment_ = comment; }
    144144
    145             inline virtual void setValue(const std::string& value)
     145            virtual void setValue(const std::string& value)
    146146                {}
    147             inline virtual std::string getValue() const
     147            virtual std::string getValue() const
    148148                { return this->comment_; }
    149149
    150             inline void setString(bool bString) {}
    151 
    152             inline virtual std::string getFileEntry() const
     150            void setString(bool bString) {}
     151
     152            virtual std::string getFileEntry() const
    153153                { return this->comment_; }
    154154
     
    166166
    167167        public:
    168             inline ConfigFileSection(const std::string& name, const std::string& additionalComment = "") : name_(name), additionalComment_(additionalComment), bUpdated_(false) {}
     168            ConfigFileSection(const std::string& name, const std::string& additionalComment = "") : name_(name), additionalComment_(additionalComment), bUpdated_(false) {}
    169169            ~ConfigFileSection();
    170170
    171             inline const std::string& getName() const
     171            const std::string& getName() const
    172172                { return this->name_; }
    173173
    174             inline void setComment(const std::string& comment)
     174            void setComment(const std::string& comment)
    175175                { this->additionalComment_ = comment; }
    176176
    177             inline void setValue(const std::string& name, const std::string& value, bool bString)
     177            void setValue(const std::string& name, const std::string& value, bool bString)
    178178                { this->getEntry(name, value, bString)->setValue(value); }
    179             inline std::string getValue(const std::string& name, const std::string& fallback, bool bString)
     179            std::string getValue(const std::string& name, const std::string& fallback, bool bString)
    180180                { return this->getEntry(name, fallback, bString)->getValue(); }
    181181
    182             inline void setValue(const std::string& name, unsigned int index, const std::string& value, bool bString)
     182            void setValue(const std::string& name, unsigned int index, const std::string& value, bool bString)
    183183                { this->getEntry(name, index, value, bString)->setValue(value); }
    184             inline std::string getValue(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
     184            std::string getValue(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
    185185                { return this->getEntry(name, index, fallback, bString)->getValue(); }
    186186
     
    201201            std::list<ConfigFileEntry*>::iterator getEntryIterator(const std::string& name, unsigned int index, const std::string& fallback, bool bString);
    202202
    203             inline ConfigFileEntry* getEntry(const std::string& name, const std::string& fallback, bool bString)
     203            ConfigFileEntry* getEntry(const std::string& name, const std::string& fallback, bool bString)
    204204                { return (*this->getEntryIterator(name, fallback, bString)); }
    205             inline ConfigFileEntry* getEntry(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
     205            ConfigFileEntry* getEntry(const std::string& name, unsigned int index, const std::string& fallback, bool bString)
    206206                { return (*this->getEntryIterator(name, index, fallback, bString)); }
    207207
     
    219219    {
    220220        public:
    221             inline ConfigFile(const std::string& filename) : filename_(filename), bUpdated_(false) {}
     221            ConfigFile(const std::string& filename) : filename_(filename), bUpdated_(false) {}
    222222            ~ConfigFile();
    223223
     
    227227            void clean(bool bCleanComments = false);
    228228
    229             inline void setValue(const std::string& section, const std::string& name, const std::string& value, bool bString)
     229            void setValue(const std::string& section, const std::string& name, const std::string& value, bool bString)
    230230                { this->getSection(section)->setValue(name, value, bString); this->save(); }
    231             inline std::string getValue(const std::string& section, const std::string& name, const std::string& fallback, bool bString)
     231            std::string getValue(const std::string& section, const std::string& name, const std::string& fallback, bool bString)
    232232                { std::string output = this->getSection(section)->getValue(name, fallback, bString); this->saveIfUpdated(); return output; }
    233233
    234             inline void setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)
     234            void setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)
    235235                { this->getSection(section)->setValue(name, index, value, bString); this->save(); }
    236             inline std::string getValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)
     236            std::string getValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)
    237237                { std::string output = this->getSection(section)->getValue(name, index, fallback, bString); this->saveIfUpdated(); return output; }
    238238
    239             inline void deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex = 0)
     239            void deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex = 0)
    240240                { this->getSection(section)->deleteVectorEntries(name, startindex); }
    241             inline unsigned int getVectorSize(const std::string& section, const std::string& name)
     241            unsigned int getVectorSize(const std::string& section, const std::string& name)
    242242                { return this->getSection(section)->getVectorSize(name); }
    243243
     
    271271            void clean(ConfigFileType type, bool bCleanComments = false);
    272272
    273             inline void setValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& value, bool bString)
     273            void setValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& value, bool bString)
    274274                { this->getFile(type)->setValue(section, name, value, bString); }
    275             inline std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& fallback, bool bString)
     275            std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, const std::string& fallback, bool bString)
    276276                { return this->getFile(type)->getValue(section, name, fallback, bString); }
    277277
    278             inline void setValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)
     278            void setValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString)
    279279                { this->getFile(type)->setValue(section, name, index, value, bString); }
    280             inline std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)
     280            std::string getValue(ConfigFileType type, const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString)
    281281                { return this->getFile(type)->getValue(section, name, index, fallback, bString); }
    282282
    283             inline void deleteVectorEntries(ConfigFileType type, const std::string& section, const std::string& name, unsigned int startindex = 0)
     283            void deleteVectorEntries(ConfigFileType type, const std::string& section, const std::string& name, unsigned int startindex = 0)
    284284                { this->getFile(type)->deleteVectorEntries(section, name, startindex); }
    285             inline unsigned int getVectorSize(ConfigFileType type, const std::string& section, const std::string& name)
     285            unsigned int getVectorSize(ConfigFileType type, const std::string& section, const std::string& name)
    286286                { return this->getFile(type)->getVectorSize(section, name); }
    287287
Note: See TracChangeset for help on using the changeset viewer.