Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_DataValueHolder Class Reference

Class to hold a data value of any type.

List of all members.

Public Member Functions

Constructor / Destructor
 CP_DataValueHolder ()
 Constructor.
 CP_DataValueHolder (const CP_DataValueHolder &inDataValueHolder)
template<typename T>
 CP_DataValueHolder (const T &inValue)
virtual ~CP_DataValueHolder ()
 Destructor.
Getters
CP_DataValueGetDataValuePtr () const
template<typename T>
bool Get (T &inDataValue) const
template<typename T>
const T & Get () const
const std::type_info & type () const
operators
CP_DataValueHolderoperator= (const CP_DataValueHolder &inHolder)
template<typename T>
CP_DataValueHolderoperator= (const T &inHolder)
Misc
CP_DataValueHolderswap (CP_DataValueHolder &inHolder)

Private Attributes

CP_DataValuefDataValuePtr


Constructor & Destructor Documentation

CP_DataValueHolder::CP_DataValueHolder  ) 
 

Constructor.

CP_DataValueHolder::CP_DataValueHolder const CP_DataValueHolder inDataValueHolder  ) 
 

template<typename T>
CP_DataValueHolder::CP_DataValueHolder const T &  inValue  ) 
 

Constructor from the passed in template value.

Parameters:
inValue Template value to assign to our data value member.

virtual CP_DataValueHolder::~CP_DataValueHolder  )  [virtual]
 

Destructor.


Member Function Documentation

CP_DataValue* CP_DataValueHolder::GetDataValuePtr  )  const
 

Returns the CP_DataValue pointer to the data value we are holding.

Returns:
CP_DataValue Returns a pointer to the data value.

template<typename T>
bool CP_DataValueHolder::Get T &  inDataValue  )  const
 

Returns a bool value if the data value is of type T.

Returns:
bool Returns true if the value if of type T.

template<typename T>
const T& CP_DataValueHolder::Get  )  const
 

Returns the data value as a type T. Throws std::bad_cast if the cast was unsuccessful.

Returns:
T Returns data value as a type T.

const std::type_info& CP_DataValueHolder::type  )  const
 

Returns the type of our data value as a std::type_info.

Returns:
std::type_info Returns the type of our data value.

CP_DataValueHolder& CP_DataValueHolder::operator= const CP_DataValueHolder inHolder  ) 
 

Assignment operator. Copies the value from the passed in data value holder to this object. Template version.

Returns:
CP_DataValueHolder Returns a reference to ourselves.

template<typename T>
CP_DataValueHolder& CP_DataValueHolder::operator= const T &  inHolder  ) 
 

Assignment operator. Copies the value from the passed in data value holder to this object. Template version.

Returns:
CP_DataValueHolder Returns a reference to ourselves.

CP_DataValueHolder& CP_DataValueHolder::swap CP_DataValueHolder inHolder  ) 
 

Swaps our data value with that of the passed in data value holder.

Returns:
CP_DataValueHolder& Returns a reference to ourselves.


Member Data Documentation

CP_DataValue* CP_DataValueHolder::fDataValuePtr [private]
 


The documentation for this class was generated from the following file:
Generated on Sat Sep 17 20:01:27 2005 for CPLAT by  doxygen 1.4.0