#include <variable.h>
Public Types | |
| typedef boost::shared_ptr< VariableHolder > | VariableHolderPtr |
Public Member Functions | |
| Variable () | |
| Constructs an empty Variable. | |
| Variable (VariableHolderPtr ptr) | |
| Construct a new Variable. | |
| Variable (const Variable &rhs) | |
| Contructs a variable that is a copy of the given. | |
| const std::type_info & | getTypeInfo () const |
| Get the type info of the held type. | |
| bool | isEmpty () const |
| Returns true of the Variable is empty. | |
| void | reset () |
| Resets the variable to empty for re-assignment. | |
| void | lock () |
| Locks the variable from writing. | |
| void | unlock () |
| Unlocks the variable for writing. | |
| bool | isLocked () const |
| Returns true of the variable is locked. | |
| Variable & | operator= (const Variable &rhs) |
| Variable & | operator= (const Odyssey::Any &rhs) |
| Variable & | operator= (const Odyssey::String &rhs) |
| template<class T, class U> | |
| Variable & | operator= (const Local< T, U > &rhs) |
| template<class T> | |
| Variable & | operator= (T t) |
| template<class T> | |
| operator T () const | |
| Odyssey::Any | _toAny () const |
| Odyssey::String | _toString () const |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serializer. | |
Classes | |
| struct | extract |
| class | VariableHolder |
| This class is the interface for accessing the generic data. More... | |
| class | VariableHolderImpl |
| This is the concrete implementation that holds the data. More... | |
| class | VariableHolderRefImpl |
| This is the concrete implementation that holds referenced data. More... | |
A Variable is a generic data component. It is able to hold any type that that meets a few key criteria. This type (T) must satisfy the following conditions:
|
|
|
|
|
Constructs an empty Variable.
|
|
|
Construct a new Variable.
|
|
|
Contructs a variable that is a copy of the given.
|
|
|
|
|
|
|
|
|
Get the type info of the held type.
|
|
|
Returns true of the Variable is empty.
|
|
|
Returns true of the variable is locked.
|
|
|
Locks the variable from writing.
|
|
|||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Resets the variable to empty for re-assignment. This function may be called to set the Variable back to empty. In an empty state, assignments will set the type of the Variable held. When not empty, assignments do a copy, with possible conversion. To force a re-typing, you must reset first. |
|
||||||||||||||||
|
Serializer.
|
|
|
Unlocks the variable for writing.
|
1.4.6-NO