|
| Dynamic () |
| Construct an uninitialized value. More...
|
|
| ~Dynamic () |
| Needs to be in .cpp to compile with clang, for some reason. More...
|
|
template<typename T , typename = std::enable_if_t<!std::is_same<std::decay_t<T>, Dynamic>::value>> |
| Dynamic (T &&value) |
| Contruct value from one of possible value types. More...
|
|
| Dynamic (const Dynamic &other) |
|
| Dynamic (Dynamic &&other) |
|
template<typename T , typename = std::enable_if_t<DynamicVariant::canHold<T>()>> |
Dynamic & | operator= (T &&rhs) |
| Assign one of possible value types into the value. More...
|
|
Dynamic & | operator= (const Dynamic &other) |
|
Dynamic & | operator= (Dynamic &&other) |
|
template<typename T , typename = std::enable_if_t<DynamicVariant::canHold<T>()>> |
INLINE T & | get () |
| Returns the reference to the stored value given its type. More...
|
|
template<typename T , typename = std::enable_if_t<DynamicVariant::canHold<T>()>> |
const T & | get () const |
| Returns the const reference to the stored value given its type. More...
|
|
template<typename T , typename = std::enable_if_t<DynamicVariant::canHold<T>()>> |
| operator T& () |
| Conversion operator to one of stored types. More...
|
|
template<typename T , typename = std::enable_if_t<DynamicVariant::canHold<T>()>> |
| operator const T & () const |
| Coversion operator to one of stored types, const version. More...
|
|
Float | getScalar () const |
| Converts the stored value into a single number, using one of possible conversions. More...
|
|
DynamicId | getType () const |
|
bool | empty () const |
| Checks if the value has been initialized. More...
|
|
| operator bool () const |
|
bool | operator! () const |
|
template<typename T , typename = std::enable_if_t<DynamicVariant::canHold<T>()>> |
bool | operator== (const T &value) const |
| Equality operator with one of stored types. More...
|
|
Convenient object for storing a single value of different types.
Object can currently store scalar, vector, tensor, unsigned integer and MinMaxMean. This is intended mainly for logging and output routines, as the object provides generic way to store different types and print stored values. There is no need to pass types as template arguments, so the object Value is a suitable return value or parameter of virtual functions (that cannot be templated).
Definition at line 35 of file Dynamic.h.
template<typename T , typename = std::enable_if_t<DynamicVariant::canHold<T>()>>
Returns the reference to the stored value given its type.
The stored value must indeed have a type T, checked by assert.
Definition at line 88 of file Dynamic.h.