This class implements a variant design pattern to handle basic types in Command. More...
#include <value.h>
Public Types | |
enum | Type { NONE, BOOL, UNSIGNED, UNSIGNEDLONGINT, INT, LONGINT, FLOAT, DOUBLE, STRING, VECTOR, MATRIX, MATRIX4D, VALUES, NB_TYPES } |
Public Member Functions | |
bool | boolValue () const |
const Values & | constValuesValue () const |
void | deleteValue () |
double | doubleValue () const |
float | floatValue () const |
std::int32_t | intValue () const |
std::int64_t | longintValue () const |
Eigen::Matrix4d | matrix4dValue () const |
Eigen::MatrixXd | matrixXdValue () const |
Value | operator= (const Value &value) |
bool | operator== (const Value &other) const |
std::string | stringValue () const |
Type | type () const |
Return the type of the value. More... | |
std::uint64_t | unsignedlongintValue () const |
std::uint32_t | unsignedValue () const |
Value () | |
const EitherType | value () const |
Value (const bool &value) | |
Value (const double &value) | |
Value (const Eigen::Matrix4d &value) | |
Value (const Eigen::MatrixXd &value) | |
Value (const float &value) | |
Value (const std::int32_t &value) | |
Value (const std::int64_t &value) | |
Value (const std::string &value) | |
Value (const std::uint32_t &value) | |
Value (const std::uint64_t &value) | |
Value (const Value &value) | |
Copy constructor. More... | |
Value (const Values &value) | |
Value (const Vector &value) | |
Values | valuesValue () const |
Vector | vectorValue () const |
~Value () | |
Static Public Member Functions | |
static std::string | typeName (Type type) |
Return the name of the type. More... | |
Public Attributes | |
Type | type_ |
const void *const | value_ |
Friends | |
class | EitherType |
DYNAMIC_GRAPH_DLLAPI friend std::ostream & | operator<< (std::ostream &os, const Value &value) |
Output in a stream. More... | |
This class implements a variant design pattern to handle basic types in Command.
dynamicgraph::command::Value::~Value | ( | ) |
Definition at line 85 of file src/command/value.cpp.
|
explicit |
Definition at line 87 of file src/command/value.cpp.
|
explicit |
Definition at line 88 of file src/command/value.cpp.
|
explicit |
Definition at line 90 of file src/command/value.cpp.
|
explicit |
Definition at line 92 of file src/command/value.cpp.
|
explicit |
Definition at line 94 of file src/command/value.cpp.
|
explicit |
Definition at line 96 of file src/command/value.cpp.
|
explicit |
Definition at line 97 of file src/command/value.cpp.
|
explicit |
Definition at line 98 of file src/command/value.cpp.
|
explicit |
Definition at line 100 of file src/command/value.cpp.
|
explicit |
Definition at line 101 of file src/command/value.cpp.
|
explicit |
Definition at line 103 of file src/command/value.cpp.
|
explicit |
Definition at line 105 of file src/command/value.cpp.
dynamicgraph::command::Value::Value | ( | const Value & | value | ) |
Copy constructor.
Definition at line 107 of file src/command/value.cpp.
|
explicit |
Definition at line 158 of file src/command/value.cpp.
bool dynamicgraph::command::Value::boolValue | ( | ) | const |
Definition at line 207 of file src/command/value.cpp.
const Values & dynamicgraph::command::Value::constValuesValue | ( | ) | const |
Definition at line 278 of file src/command/value.cpp.
void dynamicgraph::command::Value::deleteValue | ( | ) |
Definition at line 39 of file src/command/value.cpp.
double dynamicgraph::command::Value::doubleValue | ( | ) | const |
Definition at line 242 of file src/command/value.cpp.
float dynamicgraph::command::Value::floatValue | ( | ) | const |
Definition at line 234 of file src/command/value.cpp.
std::int32_t dynamicgraph::command::Value::intValue | ( | ) | const |
Definition at line 229 of file src/command/value.cpp.
std::int64_t dynamicgraph::command::Value::longintValue | ( | ) | const |
Definition at line 224 of file src/command/value.cpp.
Eigen::Matrix4d dynamicgraph::command::Value::matrix4dValue | ( | ) | const |
Definition at line 266 of file src/command/value.cpp.
Eigen::MatrixXd dynamicgraph::command::Value::matrixXdValue | ( | ) | const |
Definition at line 260 of file src/command/value.cpp.
Definition at line 160 of file src/command/value.cpp.
bool dynamicgraph::command::Value::operator== | ( | const Value & | other | ) | const |
Definition at line 170 of file src/command/value.cpp.
std::string dynamicgraph::command::Value::stringValue | ( | ) | const |
Definition at line 250 of file src/command/value.cpp.
Value::Type dynamicgraph::command::Value::type | ( | ) | const |
Return the type of the value.
Definition at line 205 of file src/command/value.cpp.
|
static |
Return the name of the type.
Definition at line 284 of file src/command/value.cpp.
std::uint64_t dynamicgraph::command::Value::unsignedlongintValue | ( | ) | const |
Definition at line 218 of file src/command/value.cpp.
std::uint32_t dynamicgraph::command::Value::unsignedValue | ( | ) | const |
Definition at line 212 of file src/command/value.cpp.
const EitherType dynamicgraph::command::Value::value | ( | ) | const |
Return the value as a castable value into the approriate type
For instance,
The first assignment will succeed, while the second one will throw an exception.
Definition at line 203 of file src/command/value.cpp.
Values dynamicgraph::command::Value::valuesValue | ( | ) | const |
Definition at line 272 of file src/command/value.cpp.
Vector dynamicgraph::command::Value::vectorValue | ( | ) | const |
Definition at line 255 of file src/command/value.cpp.
|
friend |
|
friend |
Output in a stream.
Definition at line 313 of file src/command/value.cpp.