Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 10, 2008, 6:44:38 PM (17 years ago)
Author:
landauf
Message:

console command 'cleanConfig' is now implemented: it drops all not-existing classes and variables and all comments from the config file

File:
1 edited

Legend:

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

    r1025 r1027  
    6565            virtual const std::string& getValue() const = 0;
    6666            virtual const std::string& getName() const = 0;
     67            virtual void setComment(const std::string& comment) = 0;
    6768            virtual unsigned int getIndex() const { return 0; }
    6869            virtual std::string getFileEntry() const = 0;
     
    8182            inline virtual const std::string& getName() const
    8283                { return this->name_; }
     84
     85            inline virtual void setComment(const std::string& comment)
     86                { this->additionalComment_ = comment; }
    8387
    8488            inline virtual void setValue(const std::string& value)
     
    133137                { return this->comment_; }
    134138
     139            inline virtual void setComment(const std::string& comment)
     140                { this->comment_ = comment; }
     141
    135142            inline virtual void setValue(const std::string& value)
    136143                {}
     
    159166            inline const std::string& getName() const
    160167                { return this->name_; }
     168
     169            inline void setComment(const std::string& comment)
     170                { this->additionalComment_ = comment; }
    161171
    162172            inline void setValue(const std::string& name, const std::string& value)
     
    204214            ~ConfigFile();
    205215
    206             void load();
     216            void load(bool bCreateIfNotExisting = true);
    207217            void save() const;
    208218            void clean();
     
    236246            static ConfigFileManager* getSingleton();
    237247
    238             void setFile(ConfigFileType type, const std::string& filename);
    239 
    240             void load();
     248            void setFile(ConfigFileType type, const std::string& filename, bool bCreateIfNotExisting = true);
     249
     250            void load(bool bCreateIfNotExisting = true);
    241251            void save();
    242252            void clean();
    243253
    244             void load(ConfigFileType type);
     254            void load(ConfigFileType type, bool bCreateIfNotExisting = true);
    245255            void save(ConfigFileType type);
    246256            void clean(ConfigFileType type);
Note: See TracChangeset for help on using the changeset viewer.