presage
0.9.2~beta
|
#include <variable.h>
Public Member Functions | |
Variable (const char *variable) | |
Variable (const std::string &variable) | |
Variable (const std::vector< std::string > &variable) | |
~Variable () | |
std::string | get_name () const |
std::vector< std::string > | get_name_vector () const |
std::string | get_value () const |
void | set_value (std::string value) |
size_t | size () const |
bool | operator< (const Variable &other) const |
Public Member Functions inherited from Observable | |
virtual | ~Observable () |
virtual void | attach (Observer *observer) |
virtual void | detach (Observer *observer) |
virtual void | notify () |
Static Public Member Functions | |
static std::vector< std::string > | string_to_vector (const std::string &str) |
static std::string | vector_to_string (const std::vector< std::string > &var) |
Private Attributes | |
std::string | m_name |
std::vector< std::string > | m_name_vector |
std::string | m_value |
Additional Inherited Members | |
Protected Member Functions inherited from Observable | |
Observable () | |
Definition at line 33 of file variable.h.
Variable::Variable | ( | const char * | variable | ) |
Definition at line 29 of file variable.cpp.
References m_name, m_name_vector, and string_to_vector().
Variable::Variable | ( | const std::string & | variable | ) |
Definition at line 35 of file variable.cpp.
References m_name, m_name_vector, and string_to_vector().
Variable::Variable | ( | const std::vector< std::string > & | variable | ) |
Definition at line 41 of file variable.cpp.
References m_name, m_name_vector, and vector_to_string().
Variable::~Variable | ( | ) |
Definition at line 47 of file variable.cpp.
|
virtual |
Implements Observable.
Definition at line 52 of file variable.cpp.
References m_name.
Referenced by operator<().
std::vector< std::string > Variable::get_name_vector | ( | ) | const |
Definition at line 57 of file variable.cpp.
References m_name_vector.
|
virtual |
Implements Observable.
Definition at line 62 of file variable.cpp.
References m_value.
Referenced by PredictorRegistry::addPredictor(), ProfileManager::refresh_config(), and ProfileManager::~ProfileManager().
|
inline |
Definition at line 48 of file variable.h.
References get_name().
void Variable::set_value | ( | std::string | value | ) |
Definition at line 67 of file variable.cpp.
References m_value, and Observable::notify().
Referenced by Configuration::insert().
|
inline |
Definition at line 46 of file variable.h.
References m_name_vector.
|
static |
Tokenize string on '.' char
foo.bar.foobar
|foo|bar|foobar|
Definition at line 82 of file variable.cpp.
Referenced by Profile::read_from_configuration(), and Variable().
|
static |
Definition at line 107 of file variable.cpp.
Referenced by Variable(), and Profile::visit_node().
|
private |
Definition at line 55 of file variable.h.
Referenced by get_name(), and Variable().
|
private |
Definition at line 56 of file variable.h.
Referenced by get_name_vector(), size(), and Variable().
|
private |
Definition at line 57 of file variable.h.
Referenced by get_value(), and set_value().