This class implements a variant design pattern to handle basic types in Command. More...
#include <dynamic-graph/value.h>
Public Types | |
| enum | Type { NONE , BOOL , UNSIGNED , UNSIGNEDLONGINT , INT , LONGINT , FLOAT , DOUBLE , STRING , VECTOR , MATRIX , MATRIX4D , VALUES , NB_TYPES } |
Public Member Functions | |
| 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. | |
| Value (const Values &value) | |
| Value (const Vector &value) | |
| 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. | |
| std::uint64_t | unsignedlongintValue () const |
| std::uint32_t | unsignedValue () const |
| const EitherType | value () const |
| Values | valuesValue () const |
| Vector | vectorValue () const |
Static Public Member Functions | |
| static std::string | typeName (Type type) |
| Return the name of the type. | |
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. | |
This class implements a variant design pattern to handle basic types in Command.
| const EitherType 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.