Odyssey::Variable Class Reference

The Variable is a generic data component with built-in conversions. More...

#include <variable.h>

List of all members.

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.
Variableoperator= (const Variable &rhs)
Variableoperator= (const Odyssey::Any &rhs)
Variableoperator= (const Odyssey::String &rhs)
template<class T, class U>
Variableoperator= (const Local< T, U > &rhs)
template<class T>
Variableoperator= (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...


Detailed Description

The Variable is a generic data component with built-in conversions.

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:


Member Typedef Documentation

typedef boost::shared_ptr<VariableHolder> Odyssey::Variable::VariableHolderPtr
 


Constructor & Destructor Documentation

Odyssey::Variable::Variable  ) 
 

Constructs an empty Variable.

Odyssey::Variable::Variable VariableHolderPtr  ptr  ) 
 

Construct a new Variable.

Odyssey::Variable::Variable const Variable rhs  ) 
 

Contructs a variable that is a copy of the given.


Member Function Documentation

Odyssey::Any Odyssey::Variable::_toAny  )  const [inline]
 

Odyssey::String Odyssey::Variable::_toString  )  const [inline]
 

const std::type_info& Odyssey::Variable::getTypeInfo  )  const
 

Get the type info of the held type.

bool Odyssey::Variable::isEmpty  )  const
 

Returns true of the Variable is empty.

bool Odyssey::Variable::isLocked  )  const [inline]
 

Returns true of the variable is locked.

void Odyssey::Variable::lock  ) 
 

Locks the variable from writing.

template<class T>
Odyssey::Variable::operator T  )  const [inline]
 

template<class T>
Variable& Odyssey::Variable::operator= t  )  [inline]
 

template<class T, class U>
Variable& Odyssey::Variable::operator= const Local< T, U > &  rhs  )  [inline]
 

Variable& Odyssey::Variable::operator= const Odyssey::String rhs  ) 
 

Variable& Odyssey::Variable::operator= const Odyssey::Any rhs  ) 
 

Variable& Odyssey::Variable::operator= const Variable rhs  ) 
 

void Odyssey::Variable::reset  ) 
 

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.

template<class Archive>
void Odyssey::Variable::serialize Archive &  ar,
const unsigned int  version
[inline]
 

Serializer.

void Odyssey::Variable::unlock  ) 
 

Unlocks the variable for writing.


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 01:18:53 2007 for Odyssey Meta-Engine by  doxygen 1.4.6-NO