#include <ConfigSection.h>
Public Member Functions | |
~ConfigSection () | |
destructor | |
void | unsetItem (std::string name) |
ConfigItem & | getItem (std::string name) |
template<typename T > | |
T | get (std::string name) |
Vector3d | getVector3d (std::string name) |
Matrix< double > | getMatrixDouble (std::string name) |
void | save (std::ofstream &file) |
void | load (std::string &content) |
template<typename T > | |
void | setItem (std::string name, T value) |
void | setVector3d (std::string name, Vector3d &value) |
void | setMatrixDouble (std::string name, Matrix< double > &matrix) |
void | setItem (std::string name, std::string value) |
Definition at line 13 of file ConfigSection.h.
ConfigSection::~ConfigSection | ( | ) |
T ConfigSection::get | ( | std::string | name | ) | [inline] |
name | name of the variable |
Definition at line 36 of file ConfigSection.h.
ConfigItem & ConfigSection::getItem | ( | std::string | name | ) |
name | name of the variable |
Definition at line 14 of file ConfigSection.cpp.
Matrix< double > ConfigSection::getMatrixDouble | ( | std::string | name | ) |
explicit get for Matrix<double>
name | name of the variable |
Definition at line 87 of file ConfigSection.cpp.
Vector3d ConfigSection::getVector3d | ( | std::string | name | ) |
explicit get for Vector3d
name | name of the variable |
Definition at line 61 of file ConfigSection.cpp.
void ConfigSection::load | ( | std::string & | content | ) |
loads section from file
content | buffer with variable information |
Definition at line 43 of file ConfigSection.cpp.
void ConfigSection::save | ( | std::ofstream & | file | ) |
saves section in file
file | the file to save in |
Definition at line 36 of file ConfigSection.cpp.
void ConfigSection::setItem | ( | std::string | name, | |
std::string | value | |||
) |
shortcut for string values
name | the name of the variable | |
value | the value ot the variable |
Definition at line 26 of file ConfigSection.cpp.
void ConfigSection::setItem | ( | std::string | name, | |
T | value | |||
) | [inline] |
insert or modify item
name | the name of the variable | |
value | the value of the variable |
Definition at line 69 of file ConfigSection.h.
void ConfigSection::setMatrixDouble | ( | std::string | name, | |
Matrix< double > & | matrix | |||
) |
explicit set for Matrix<double>
name | the name of the variable | |
matrix | the matrix to set |
Definition at line 122 of file ConfigSection.cpp.
void ConfigSection::setVector3d | ( | std::string | name, | |
Vector3d & | value | |||
) |
explicit set for Vector3d
name | the name of the variable | |
value | the vector to set |
Definition at line 78 of file ConfigSection.cpp.
void ConfigSection::unsetItem | ( | std::string | name | ) |
deletes a variable from this section if exists
name | name of the variable |
Definition at line 9 of file ConfigSection.cpp.