#include <src/core/ConfigFileManager.h>
Public Member Functions | |
void | clean (bool bCleanComments=false) |
void | clear () |
ConfigFile (const std::string &filename, ConfigFileType type) | |
void | deleteVectorEntries (const std::string §ion, const std::string &name, unsigned int startindex=0) |
const std::string & | getFilename () |
std::string | getValue (const std::string §ion, const std::string &name, unsigned int index, const std::string &fallback, bool bString) |
std::string | getValue (const std::string §ion, const std::string &name, const std::string &fallback, bool bString) |
unsigned int | getVectorSize (const std::string §ion, const std::string &name) |
void | load (bool bCreateIfNotExisting=true) |
void | save () const |
void | saveAs (const std::string &filename) |
void | setValue (const std::string §ion, const std::string &name, unsigned int index, const std::string &value, bool bString) |
void | setValue (const std::string §ion, const std::string &name, const std::string &value, bool bString) |
void | updateConfigValues () |
~ConfigFile () | |
Private Member Functions | |
ConfigFileSection * | getSection (const std::string §ion) |
void | saveIfUpdated () |
Private Attributes | |
bool | bUpdated_ |
std::string | filename_ |
std::list< ConfigFileSection * > | sections_ |
ConfigFileType | type_ |
orxonox::ConfigFile::ConfigFile | ( | const std::string & | filename, | |
ConfigFileType | type | |||
) | [inline] |
orxonox::ConfigFile::~ConfigFile | ( | ) |
References clear().
void orxonox::ConfigFile::clean | ( | bool | bCleanComments = false |
) |
References orxonox::Identifier::getIdentifierMap(), orxonox::Identifier::getIdentifierMapEnd(), save(), and sections_.
Referenced by orxonox::ConfigFileManager::clean().
void orxonox::ConfigFile::clear | ( | ) |
void orxonox::ConfigFile::deleteVectorEntries | ( | const std::string & | section, | |
const std::string & | name, | |||
unsigned int | startindex = 0 | |||
) | [inline] |
const std::string& orxonox::ConfigFile::getFilename | ( | ) | [inline] |
ConfigFileSection * orxonox::ConfigFile::getSection | ( | const std::string & | section | ) | [private] |
std::string orxonox::ConfigFile::getValue | ( | const std::string & | section, | |
const std::string & | name, | |||
unsigned int | index, | |||
const std::string & | fallback, | |||
bool | bString | |||
) | [inline] |
std::string orxonox::ConfigFile::getValue | ( | const std::string & | section, | |
const std::string & | name, | |||
const std::string & | fallback, | |||
bool | bString | |||
) | [inline] |
unsigned int orxonox::ConfigFile::getVectorSize | ( | const std::string & | section, | |
const std::string & | name | |||
) | [inline] |
void orxonox::ConfigFile::load | ( | bool | bCreateIfNotExisting = true |
) |
References clear(), orxonox::convertValue(), COUT, filename_, orxonox::Core::getConfigPath(), orxonox::ConfigFileSection::getEntries(), orxonox::ConfigFileSection::getEntryIterator(), orxonox::Core::getMediaPath(), orxonox::getNextCommentPosition(), orxonox::getStripped(), orxonox::isBetweenQuotes(), orxonox::isComment(), orxonox::isEmpty(), orxonox::removeTrailingWhitespaces(), save(), sections_, and updateConfigValues().
Referenced by orxonox::ConfigFileManager::load().
void orxonox::ConfigFile::save | ( | ) | const |
References COUT, filename_, orxonox::Core::getConfigPath(), and sections_.
Referenced by clean(), load(), orxonox::ConfigFileManager::save(), saveAs(), and saveIfUpdated().
void orxonox::ConfigFile::saveAs | ( | const std::string & | filename | ) |
void orxonox::ConfigFile::setValue | ( | const std::string & | section, | |
const std::string & | name, | |||
unsigned int | index, | |||
const std::string & | value, | |||
bool | bString | |||
) | [inline] |
void orxonox::ConfigFile::setValue | ( | const std::string & | section, | |
const std::string & | name, | |||
const std::string & | value, | |||
bool | bString | |||
) | [inline] |
void orxonox::ConfigFile::updateConfigValues | ( | ) |
bool orxonox::ConfigFile::bUpdated_ [private] |
Referenced by getSection(), and saveIfUpdated().
std::string orxonox::ConfigFile::filename_ [private] |
std::list<ConfigFileSection*> orxonox::ConfigFile::sections_ [private] |
Referenced by clean(), clear(), getSection(), load(), save(), and saveIfUpdated().
ConfigFileType orxonox::ConfigFile::type_ [private] |
Referenced by updateConfigValues().