1 #ifndef SimTK_SimTKCOMMON_VALUE_H_
2 #define SimTK_SimTKCOMMON_VALUE_H_
78 operator const T&()
const {
return thing; }
81 const T&
get()
const {
return thing; }
107 #endif // SimTK_SimTKCOMMON_VALUE_H_
virtual bool isCompatible(const AbstractValue &) const =0
SimTK_DOWNCAST(Value, AbstractValue)
Value & operator=(const T &t)
Definition: Value.h:77
virtual void compatibleAssign(const AbstractValue &)=0
Value()
Definition: Value.h:69
virtual String getValueAsString() const =0
T & upd()
Definition: Value.h:85
void set(const T &t)
Definition: Value.h:84
void compatibleAssign(const AbstractValue &v)
Definition: Value.h:88
AbstractValue & operator=(const AbstractValue &v)
Definition: Value.h:51
#define SimTK_THROW2(exc, a1, a2)
Definition: Exception.h:313
virtual String getTypeName() const =0
Definition: Exception.h:260
String getTypeName() const
Definition: Value.h:92
std::ostream & operator<<(std::ostream &o, const ContactForce &f)
Definition: CompliantContactSubsystem.h:387
Value & operator=(const Value &v)
Definition: Value.h:75
String getValueAsString() const
Definition: Value.h:94
SimTK::String is a plug-compatible std::string replacement (plus some additional functionality) inten...
Definition: String.h:62
Abstract base class representing an arbitrary value of self-describing type.
Definition: Value.h:41
Mandatory first inclusion for any Simbody source or header file.
virtual AbstractValue * clone() const =0
AbstractValue * clone() const
Definition: Value.h:97
T thing
Definition: Value.h:100
AbstractValue()
Definition: Value.h:43
bool isCompatible(const AbstractValue &v) const
Definition: Value.h:87
Value(const T &t)
Definition: Value.h:70
virtual ~AbstractValue()
Definition: Value.h:44
Templatized version of the abstract class, providing generic type-specific functionality that does no...
Definition: Value.h:67