A single-valued container for Single, Vector or Matrix. More...
#include <keyvalue/value/Value.h>
Public Types | |
typedef ::boost::variant < Single, Vector, Matrix > | DataType_ |
Public Member Functions | |
Value () | |
Default constructor sets content to Singles's default. | |
Value (const DataType_ &data) | |
Builds and sets content. | |
template<typename Rhs > | |
Value (const Rhs &rhs) | |
Builds and sets content. | |
template<typename Rhs > | |
Value & | operator= (const Rhs &rhs) |
Assignment operator. | |
bool | operator== (const Value &rhs) const |
Comparison operator. | |
template<typename Type > | |
const Type * | get () const |
Gets content if it has a certain type. | |
template<typename Type > | |
Type * | get () |
Non const get(). | |
Private Attributes | |
DataType_ | data_ |
A single-valued container for Single, Vector or Matrix.
Value | ( | ) |
Default constructor sets content to Singles's default.
Value | ( | const DataType_ & | data | ) |
Builds and sets content.
Takes type on 1-level-down on the value hierarchy.
data | : The content. |
Value | ( | const Rhs & | rhs | ) |
Builds and sets content.
Takes type on 2-or-more-levels-down on the value hierarchy.
rhs | : The content. |
Value & operator= | ( | const Rhs & | rhs | ) |
Assignment operator.
Takes type on 2-or-more-levels-down on the value hierarchy.
rhs | : The data to be assigned. |
this
. bool operator== | ( | const Value & | rhs | ) | const |
Comparison operator.
const Type* get | ( | ) | const |
Gets content if it has a certain type.
Type | : (template parameter) The expected content's type. |
const
pointer to the content, if it is of type Type. Otherwise, a null pointer. Type* get | ( | ) |
Non const
get().