ConfigManager Class Reference
[Utilities]

#include <ConfigManager.h>

Collaboration diagram for ConfigManager:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::map< std::string,
ConfigSection
SectionMap
 (name, section)-pairs

Public Member Functions

 ConfigManager (std::string filename)
void save ()
 save to file
void load ()
 load from file
bool hasSection (std::string name)
ConfigSectiongetSection (std::string name)
ConfigSectiongetSectionSilent (std::string name)
void setSection (std::string name, ConfigSection &section)
void addEmptySection (std::string name)
SectionMap::iterator begin ()
SectionMap::iterator end ()


Detailed Description

Manager for config sections (which itself hold config items)

Definition at line 10 of file ConfigManager.h.


Member Typedef Documentation

typedef std::map<std::string, ConfigSection> ConfigManager::SectionMap

(name, section)-pairs

Definition at line 14 of file ConfigManager.h.


Constructor & Destructor Documentation

ConfigManager::ConfigManager ( std::string  filename  ) 

Constructor

Parameters:
filename file to save/load

Definition at line 7 of file ConfigManager.cpp.


Member Function Documentation

void ConfigManager::addEmptySection ( std::string  name  ) 

add an empty section

Parameters:
name the name of the section

Definition at line 44 of file ConfigManager.cpp.

SectionMap::iterator ConfigManager::begin (  )  [inline]

Returns:
iterator to the beginning of section map

Definition at line 59 of file ConfigManager.h.

SectionMap::iterator ConfigManager::end (  )  [inline]

Returns:
iterator to the end of section map

Definition at line 63 of file ConfigManager.h.

ConfigSection & ConfigManager::getSection ( std::string  name  ) 

get section with name "name", may throw an exception!

Parameters:
name the name of the section
Returns:
the section with name "name"

Definition at line 12 of file ConfigManager.cpp.

ConfigSection & ConfigManager::getSectionSilent ( std::string  name  ) 

get section with name "name", create section if not existant

Parameters:
name the name of the section
Returns:
the section with name "name"

Definition at line 24 of file ConfigManager.cpp.

bool ConfigManager::hasSection ( std::string  name  )  [inline]

Test if config has a section named "name"

Parameters:
name name of the section
Returns:
true, if section with name "name" exists

Definition at line 31 of file ConfigManager.h.

void ConfigManager::load (  ) 

load from file

Definition at line 69 of file ConfigManager.cpp.

void ConfigManager::save (  ) 

save to file

Definition at line 58 of file ConfigManager.cpp.

void ConfigManager::setSection ( std::string  name,
ConfigSection section 
)

sets section with name "name" to "section". May overwrite existing sections!

Parameters:
name the name of the section
section the section to store

Definition at line 34 of file ConfigManager.cpp.


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

Generated on Sun Nov 30 23:45:40 2008 for Modular Motion Processor by  doxygen 1.5.7.1