#include <Configuration.h>
Public Member Functions | |
Configuration () | |
Configuration (std::string filename) | |
Configuration (std::string filename, const std::string content) | |
template<typename T > | |
T | get (const char *path,...) |
template<typename T > | |
boost::shared_ptr< std::vector < T > > | getAll (const char *path,...) |
boost::shared_ptr< std::vector < std::string > > | getNames (const char *path,...) |
boost::shared_ptr< std::vector < std::string > > | getSections (const char *path,...) |
void | load (std::string filename) |
void | load (std::string filename, boost::shared_ptr< std::istream > content, bool create, bool replace) |
std::string | serialize () |
template<typename T > | |
void | set (T value, const char *path,...) |
void | store () |
void | store (std::string filename) |
template<typename T > | |
T | tryGet (T d, const char *path,...) |
template<typename T > | |
boost::shared_ptr< std::vector < T > > | tryGetAll (T d, const char *path,...) |
boost::shared_ptr< std::vector < std::string > > | tryGetNames (std::string d, const char *path,...) |
boost::shared_ptr< std::vector < std::string > > | tryGetSections (std::string d, const char *path,...) |
Protected Member Functions | |
void | collect (ConfigNode *node, std::vector< std::string > *params, size_t offset, std::vector< ConfigNode * > *result) |
void | collectSections (ConfigNode *node, std::vector< std::string > *params, size_t offset, std::vector< ConfigNode * > *result) |
template<typename Target > | |
Target | convert (std::string value) |
std::string | pathNotFound (std::vector< std::string > *params) |
void | serialize_internal (std::ostringstream *ss, ConfigNode *node) |
Protected Attributes | |
ConfigNodePtr | configRoot |
std::string | filename |
Definition at line 168 of file Configuration.h.
Definition at line 21 of file Configuration.cpp.
castor::Configuration::Configuration | ( | std::string | filename | ) |
Definition at line 26 of file Configuration.cpp.
castor::Configuration::Configuration | ( | std::string | filename, |
const std::string | content | ||
) |
Definition at line 32 of file Configuration.cpp.
void castor::Configuration::collect | ( | ConfigNode * | node, |
std::vector< std::string > * | params, | ||
size_t | offset, | ||
std::vector< ConfigNode * > * | result | ||
) | [protected] |
Definition at line 256 of file Configuration.cpp.
void castor::Configuration::collectSections | ( | ConfigNode * | node, |
std::vector< std::string > * | params, | ||
size_t | offset, | ||
std::vector< ConfigNode * > * | result | ||
) | [protected] |
Definition at line 281 of file Configuration.cpp.
Target castor::Configuration::convert | ( | std::string | value | ) | [inline, protected] |
Definition at line 179 of file Configuration.h.
T castor::Configuration::get | ( | const char * | path, |
... | |||
) | [inline] |
Definition at line 216 of file Configuration.h.
boost::shared_ptr<std::vector<T> > castor::Configuration::getAll | ( | const char * | path, |
... | |||
) | [inline] |
Definition at line 232 of file Configuration.h.
boost::shared_ptr< std::vector< std::string > > castor::Configuration::getNames | ( | const char * | path, |
... | |||
) |
Definition at line 381 of file Configuration.cpp.
boost::shared_ptr< std::vector< std::string > > castor::Configuration::getSections | ( | const char * | path, |
... | |||
) |
Definition at line 347 of file Configuration.cpp.
void castor::Configuration::load | ( | std::string | filename | ) | [inline] |
Definition at line 206 of file Configuration.h.
void castor::Configuration::load | ( | std::string | filename, |
boost::shared_ptr< std::istream > | content, | ||
bool | create, | ||
bool | replace | ||
) |
Definition at line 38 of file Configuration.cpp.
std::string castor::Configuration::pathNotFound | ( | std::vector< std::string > * | params | ) | [protected] |
Definition at line 325 of file Configuration.cpp.
std::string castor::Configuration::serialize | ( | ) |
Definition at line 248 of file Configuration.cpp.
void castor::Configuration::serialize_internal | ( | std::ostringstream * | ss, |
ConfigNode * | node | ||
) | [protected] |
Definition at line 204 of file Configuration.cpp.
void castor::Configuration::set | ( | T | value, |
const char * | path, | ||
... | |||
) | [inline] |
Definition at line 296 of file Configuration.h.
void castor::Configuration::store | ( | ) |
Definition at line 231 of file Configuration.cpp.
void castor::Configuration::store | ( | std::string | filename | ) |
Definition at line 238 of file Configuration.cpp.
T castor::Configuration::tryGet | ( | T | d, |
const char * | path, | ||
... | |||
) | [inline] |
Definition at line 255 of file Configuration.h.
boost::shared_ptr<std::vector<T> > castor::Configuration::tryGetAll | ( | T | d, |
const char * | path, | ||
... | |||
) | [inline] |
Definition at line 271 of file Configuration.h.
boost::shared_ptr< std::vector< std::string > > castor::Configuration::tryGetNames | ( | std::string | d, |
const char * | path, | ||
... | |||
) |
Definition at line 430 of file Configuration.cpp.
boost::shared_ptr< std::vector< std::string > > castor::Configuration::tryGetSections | ( | std::string | d, |
const char * | path, | ||
... | |||
) |
Definition at line 404 of file Configuration.cpp.
ConfigNodePtr castor::Configuration::configRoot [protected] |
Definition at line 174 of file Configuration.h.
std::string castor::Configuration::filename [protected] |
Definition at line 172 of file Configuration.h.