Variable Class Reference

`#include <variable.h>`

Inheritance diagram for Variable:
Collaboration diagram for Variable:

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

## Detailed Description

Definition at line 33 of file variable.h.

## Constructor & Destructor Documentation

## Variable() [1/3]

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() [2/3]

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() [3/3]

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:

## ~Variable()

Variable::~Variable | ( |  | ) |

Definition at line 47 of file variable.cpp.

## Member Function Documentation

## get_name()

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:

## get_name_vector()

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

Definition at line 57 of file variable.cpp.

References m_name_vector.

## get_value()

std::string Variable::get_value | ( |  | ) | const

virtual

Implements Observable.

Definition at line 62 of file variable.cpp.

References m_value.

Referenced by PredictorRegistry::addPredictor(), Presage::config(), ProfileManager::refresh_config(), and ProfileManager::~ProfileManager().

Here is the caller graph for this function:

## operator<()

bool Variable::operator< | ( | const Variable & | other | ) | const

inline

Definition at line 48 of file variable.h.

References get_name(), string_to_vector(), and vector_to_string().

Here is the call graph for this function:

## set_value()

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

size_t Variable::size | ( |  | ) | const

inline

Definition at line 46 of file variable.h.

References m_name_vector.

## string_to_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 operator<(), Profile::read_from_configuration(), and Variable().

Here is the caller graph for this function:

## vector_to_string()

std::string Variable::vector_to_string | ( | const std::vector< std::string > & | var | ) |

static

Definition at line 107 of file variable.cpp.

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

Here is the caller graph for this function:

## Member Data Documentation

## m_name

std::string Variable::m_name

private

Definition at line 55 of file variable.h.

Referenced by get_name(), and Variable().

## m_name_vector

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

## m_value

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:

- /build/presage-1beMKb/presage-0.9.1/src/lib/core/variable.h
- /build/presage-1beMKb/presage-0.9.1/src/lib/core/variable.cpp