Templatized version of the abstract class, providing generic type-specific functionality that does not require specialization, with automatic conversion to the underlying type. More...
#include <Value.h>
Public Member Functions | |
Value () | |
Value (const T &t) | |
Value & | operator= (const Value &v) |
Value & | operator= (const T &t) |
operator const T & () const | |
operator T & () | |
const T & | get () const |
void | set (const T &t) |
T & | upd () |
bool | isCompatible (const AbstractValue &v) const |
void | compatibleAssign (const AbstractValue &v) |
String | getTypeName () const |
String | getValueAsString () const |
AbstractValue * | clone () const |
SimTK_DOWNCAST (Value, AbstractValue) | |
Protected Attributes | |
T | thing |
Templatized version of the abstract class, providing generic type-specific functionality that does not require specialization, with automatic conversion to the underlying type.
Note that this class requires that type T supports an output operator "<<" so that we can serialize abstract values.
Value | ( | ) | [inline] |
Referenced by Value< T >::clone().
Value | ( | const T & | t | ) | [inline, explicit] |
AbstractValue* clone | ( | ) | const [inline, virtual] |
Implements AbstractValue.
References Value< T >::Value().
void compatibleAssign | ( | const AbstractValue< T > & | v | ) | [inline] |
References AbstractValue::getTypeName(), Value< T >::getTypeName(), and SimTK_THROW2.
const T& get | ( | ) | const [inline] |
References Value< T >::thing.
String getTypeName | ( | ) | const [inline, virtual] |
Implements AbstractValue.
Referenced by Value< T >::compatibleAssign().
String getValueAsString | ( | ) | const [inline, virtual] |
Implements AbstractValue.
References Value< T >::thing.
bool isCompatible | ( | const AbstractValue< T > & | v | ) | const [inline] |
operator const T & | ( | ) | const [inline] |
References Value< T >::thing.
operator T & | ( | ) | [inline] |
References Value< T >::thing.
Value& operator= | ( | const T & | t | ) | [inline] |
References Value< T >::thing.
Reimplemented from AbstractValue.
References Value< T >::thing.
void set | ( | const T & | t | ) | [inline] |
References Value< T >::thing.
SimTK_DOWNCAST | ( | Value< T > | , | |
AbstractValue< T > | ||||
) |
T& upd | ( | ) | [inline] |
References Value< T >::thing.
T thing [protected] |