7 #ifndef DYNAMIC_GRAPH_VALUE_H
8 #define DYNAMIC_GRAPH_VALUE_H
10 #include <dynamic-graph/linear-algebra.h>
17 #include "dynamic-graph/dynamic-graph-api.h"
22 typedef std::vector<Value> Values;
28 operator bool()
const;
29 operator unsigned()
const;
30 operator unsigned long int()
const;
32 operator long int()
const;
33 operator float()
const;
34 operator double()
const;
35 operator std::string()
const;
36 operator Vector()
const;
37 operator Eigen::MatrixXd()
const;
38 operator Eigen::Matrix4d()
const;
39 operator Values()
const;
50 class DYNAMIC_GRAPH_DLLAPI
Value {
70 explicit Value(
const bool &value);
71 explicit Value(
const unsigned &value);
72 explicit Value(
const unsigned long int &value);
73 explicit Value(
const int &value);
74 explicit Value(
const long int &value);
75 explicit Value(
const float &value);
76 explicit Value(
const double &value);
77 explicit Value(
const std::string &value);
78 explicit Value(
const Vector &value);
79 explicit Value(
const Eigen::MatrixXd &value);
80 explicit Value(
const Eigen::Matrix4d &value);
81 explicit Value(
const Values &value);
89 bool operator==(
const Value &other)
const;
106 static std::string typeName(Type type);
109 DYNAMIC_GRAPH_DLLAPI
friend std::ostream &operator<<(std::ostream &os,
114 bool boolValue()
const;
115 unsigned unsignedValue()
const;
116 unsigned long int unsignedlongintValue()
const;
117 int intValue()
const;
118 long int longintValue()
const;
119 float floatValue()
const;
120 double doubleValue()
const;
121 std::string stringValue()
const;
122 Vector vectorValue()
const;
123 Eigen::MatrixXd matrixXdValue()
const;
124 Eigen::Matrix4d matrix4dValue()
const;
125 Values valuesValue()
const;
126 const Values &constValuesValue()
const;
128 const void *
const value_;
135 template <
typename T>
137 static const Value::Type TypeID;
142 #endif // DYNAMIC_GRAPH_VALUE_H