presage
0.9.1
|
#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 |
![]() | |
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 | |
![]() | |
Observable () | |
Definition at line 32 of file variable.h.
Variable::Variable | ( | const char * | variable | ) |
Definition at line 28 of file variable.cpp.
References m_name, m_name_vector, and string_to_vector().
Variable::Variable | ( | const std::string & | variable | ) |
Definition at line 34 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 40 of file variable.cpp.
References m_name, m_name_vector, and vector_to_string().
Variable::~Variable | ( | ) |
Definition at line 46 of file variable.cpp.
|
virtual |
std::vector< std::string > Variable::get_name_vector | ( | ) | const |
Definition at line 56 of file variable.cpp.
References m_name_vector.
|
virtual |
Implements Observable.
Definition at line 61 of file variable.cpp.
References m_value.
Referenced by PredictorRegistry::addPredictor(), ProfileManager::refresh_config(), and ProfileManager::~ProfileManager().
|
inline |
Definition at line 66 of file variable.h.
void Variable::set_value | ( | std::string | value | ) |
Definition at line 66 of file variable.cpp.
References m_value, and Observable::notify().
Referenced by Configuration::insert().
|
inline |
Definition at line 64 of file variable.h.
|
static |
Tokenize string on '.' char
foo.bar.foobar
|foo|bar|foobar|
Definition at line 81 of file variable.cpp.
Referenced by Profile::read_from_configuration(), and Variable().
|
static |
Definition at line 106 of file variable.cpp.
Referenced by Variable(), and Profile::visit_node().
|
private |
Definition at line 73 of file variable.h.
Referenced by get_name(), and Variable().
|
private |
Definition at line 74 of file variable.h.
Referenced by get_name_vector(), and Variable().
|
private |
Definition at line 75 of file variable.h.
Referenced by get_value(), and set_value().