presage  0.8.7
Public Member Functions | Static Public Member Functions | Private Attributes
Variable Class Reference

#include <variable.h>

Inheritance diagram for Variable:
Inheritance graph
[legend]
Collaboration diagram for Variable:
Collaboration graph
[legend]

List of all members.

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

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

Detailed Description

Definition at line 33 of file variable.h.


Constructor & Destructor Documentation

Variable::Variable ( const char *  variable)

Definition at line 29 of file variable.cpp.

References m_name, m_name_vector, and string_to_vector().

Here is the call graph for this function:

Variable::Variable ( const std::string &  variable)

Definition at line 35 of file variable.cpp.

References m_name, m_name_vector, and string_to_vector().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Definition at line 47 of file variable.cpp.


Member Function Documentation

std::string Variable::get_name ( ) const [virtual]

Implements Observable.

Definition at line 52 of file variable.cpp.

References m_name.

Referenced by operator<().

Here is the caller graph for this function:

std::vector< std::string > Variable::get_name_vector ( ) const

Definition at line 57 of file variable.cpp.

References m_name_vector.

std::string Variable::get_value ( ) const [virtual]

Implements Observable.

Definition at line 62 of file variable.cpp.

References m_value.

Referenced by ProfileManager::refresh_config(), and ProfileManager::~ProfileManager().

Here is the caller graph for this function:

bool Variable::operator< ( const Variable other) const [inline]

Definition at line 48 of file variable.h.

References get_name().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Variable::size ( ) const [inline]

Definition at line 46 of file variable.h.

References m_name_vector.

std::vector< std::string > Variable::string_to_vector ( const std::string &  str) [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().

Here is the caller graph for this function:

std::string Variable::vector_to_string ( const std::vector< std::string > &  var) [static]

Definition at line 131 of file variable.cpp.

Referenced by Variable(), and Profile::visit_node().

Here is the caller graph for this function:


Member Data Documentation

std::string Variable::m_name [private]

Definition at line 55 of file variable.h.

Referenced by get_name(), and Variable().

std::vector<std::string> Variable::m_name_vector [private]

Definition at line 56 of file variable.h.

Referenced by get_name_vector(), size(), and Variable().

std::string Variable::m_value [private]

Definition at line 57 of file variable.h.

Referenced by get_value(), and set_value().


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