Orxonox: orxonox::ConfigFileManager Class Reference

# orxonox::ConfigFileManager Class Reference

`#include <src/core/ConfigFileManager.h>`

List of all members.

## Public Member Functions

void | clean (ConfigFileType type, bool bCleanComments=false)
void | clean (bool bCleanComments=false)
| ConfigFileManager ()
void | deleteVectorEntries (ConfigFileType type, const std::string &section, const std::string &name, unsigned int startindex=0)
const std::string & | getFilename (ConfigFileType type)
ConfigFileType | getNewConfigFileType ()
std::string | getValue (ConfigFileType type, const std::string &section, const std::string &name, unsigned int index, const std::string &fallback, bool bString)
std::string | getValue (ConfigFileType type, const std::string &section, const std::string &name, const std::string &fallback, bool bString)
unsigned int | getVectorSize (ConfigFileType type, const std::string &section, const std::string &name)
void | load (ConfigFileType type)
void | load ()
void | save (ConfigFileType type)
void | save ()
void | saveAs (ConfigFileType type, const std::string &saveFilename)
void | setFilename (ConfigFileType type, const std::string &filename)
void | setValue (ConfigFileType type, const std::string &section, const std::string &name, unsigned int index, const std::string &value, bool bString)
void | setValue (ConfigFileType type, const std::string &section, const std::string &name, const std::string &value, bool bString)
void | updateConfigValues (ConfigFileType type)
void | updateConfigValues ()
| ~ConfigFileManager ()

## Static Public Member Functions

static ConfigFileManager & | getInstance ()

## Private Member Functions

| ConfigFileManager (const ConfigFileManager &)
ConfigFile * | getFile (ConfigFileType type)

## Private Attributes

std::map< ConfigFileType, ConfigFile * > | configFiles_
unsigned int | mininmalFreeType_

## Static Private Attributes

static ConfigFileManager * | singletonRef_s = 0

## Constructor & Destructor Documentation

orxonox::ConfigFileManager::ConfigFileManager | ( |  | ) |

References singletonRef_s.

orxonox::ConfigFileManager::~ConfigFileManager | ( |  | ) |

References configFiles_, and singletonRef_s.

orxonox::ConfigFileManager::ConfigFileManager | ( | const ConfigFileManager & |  | ) | `[private]`

## Member Function Documentation

void orxonox::ConfigFileManager::clean | ( | ConfigFileType | type,
|  | bool | bCleanComments = `false` |
| ) |  |  |

References orxonox::ConfigFile::clean(), and getFile().

void orxonox::ConfigFileManager::clean | ( | bool | bCleanComments = `false` | ) |

References configFiles_.

Referenced by orxonox::cleanConfig().

void orxonox::ConfigFileManager::deleteVectorEntries | ( | ConfigFileType | type,
|  | const std::string & | section,
|  | const std::string & | name,
|  | unsigned int | startindex = `0` |
| ) |  |  | `[inline]`

Referenced by orxonox::ConfigValueContainer::remove(), and orxonox::ConfigValueContainer::reset().

ConfigFile * orxonox::ConfigFileManager::getFile | ( | ConfigFileType | type | ) | `[private]`

References configFiles_, COUT, orxonox::DEFAULT_CONFIG_FILE, and setFilename().

Referenced by clean(), load(), save(), saveAs(), and updateConfigValues().

const std::string & orxonox::ConfigFileManager::getFilename | ( | ConfigFileType | type | ) |

References orxonox::BLANKSTRING, and configFiles_.

static ConfigFileManager& orxonox::ConfigFileManager::getInstance | ( |  | ) | `[inline, static]`

Referenced by orxonox::InputManager::_calibrationFileCallback(), orxonox::InputManager::_completeCalibration(), orxonox::cleanConfig(), orxonox::ConfigValueContainer::initVector(), orxonox::KeyBinder::loadBindings(), orxonox::loadCalibration(), orxonox::loadSettings(), orxonox::reloadConfig(), orxonox::ConfigValueContainer::remove(), orxonox::ConfigValueContainer::reset(), orxonox::ConfigValueContainer::set(), orxonox::Shell::Shell(), and orxonox::ConfigValueContainer::update().

ConfigFileType orxonox::ConfigFileManager::getNewConfigFileType | ( |  | ) | `[inline]`

Referenced by orxonox::KeyBinder::loadBindings(), and orxonox::Shell::Shell().

std::string orxonox::ConfigFileManager::getValue | ( | ConfigFileType | type,
|  | const std::string & | section,
|  | const std::string & | name,
|  | unsigned int | index,
|  | const std::string & | fallback,
|  | bool | bString |
| ) |  |  | `[inline]`

std::string orxonox::ConfigFileManager::getValue | ( | ConfigFileType | type,
|  | const std::string & | section,
|  | const std::string & | name,
|  | const std::string & | fallback,
|  | bool | bString |
| ) |  |  | `[inline]`

Referenced by orxonox::ConfigValueContainer::initVector(), orxonox::loadCalibration(), and orxonox::ConfigValueContainer::update().

unsigned int orxonox::ConfigFileManager::getVectorSize | ( | ConfigFileType | type,
|  | const std::string & | section,
|  | const std::string & | name |
| ) |  |  | `[inline]`

Referenced by orxonox::loadCalibration(), and orxonox::ConfigValueContainer::update().

void orxonox::ConfigFileManager::load | ( | ConfigFileType | type | ) |

References getFile(), and orxonox::ConfigFile::load().

void orxonox::ConfigFileManager::load | ( |  | ) |

References configFiles_.

Referenced by orxonox::reloadConfig(), and setFilename().

void orxonox::ConfigFileManager::save | ( | ConfigFileType | type | ) |

References getFile(), and orxonox::ConfigFile::save().

void orxonox::ConfigFileManager::save | ( |  | ) |

References configFiles_.

void orxonox::ConfigFileManager::saveAs | ( | ConfigFileType | type,
|  | const std::string & | saveFilename |
| ) |  |  |

References getFile(), and orxonox::ConfigFile::saveAs().

void orxonox::ConfigFileManager::setFilename | ( | ConfigFileType | type,
|  | const std::string & | filename |
| ) |  |  |

References configFiles_, and load().

Referenced by orxonox::InputManager::_calibrationFileCallback(), orxonox::Core::Core(), getFile(), orxonox::KeyBinder::loadBindings(), orxonox::loadSettings(), and orxonox::Shell::Shell().

void orxonox::ConfigFileManager::setValue | ( | ConfigFileType | type,
|  | const std::string & | section,
|  | const std::string & | name,
|  | unsigned int | index,
|  | const std::string & | value,
|  | bool | bString |
| ) |  |  | `[inline]`

void orxonox::ConfigFileManager::setValue | ( | ConfigFileType | type,
|  | const std::string & | section,
|  | const std::string & | name,
|  | const std::string & | value,
|  | bool | bString |
| ) |  |  | `[inline]`

Referenced by orxonox::InputManager::_completeCalibration(), orxonox::ConfigValueContainer::remove(), and orxonox::ConfigValueContainer::set().

void orxonox::ConfigFileManager::updateConfigValues | ( | ConfigFileType | type | ) |

References getFile(), and orxonox::ConfigFile::updateConfigValues().

void orxonox::ConfigFileManager::updateConfigValues | ( |  | ) |

References configFiles_.

## Member Data Documentation

std::map<ConfigFileType, ConfigFile*> orxonox::ConfigFileManager::configFiles_`[private]`

Referenced by clean(), getFile(), getFilename(), load(), save(), setFilename(), updateConfigValues(), and ~ConfigFileManager().

unsigned int orxonox::ConfigFileManager::mininmalFreeType_`[private]`

ConfigFileManager * orxonox::ConfigFileManager::singletonRef_s = 0`[static, private]`

Referenced by ConfigFileManager(), and ~ConfigFileManager().

The documentation for this class was generated from the following files:

- src/core/ConfigFileManager.h
- src/core/ConfigFileManager.cc