LibCT 2.0
Public Member Functions | Protected Attributes

LibCT::TemplateVariable< T > Class Template Reference

A TemplateVariable is a general container for holding values. More...

#include <TemplateVariable.h>

Inheritance diagram for LibCT::TemplateVariable< T >:
LibCT::VariableInterface

List of all members.

Public Member Functions

 TemplateVariable (VariableContainer *pContainer, const std::string &name)
 Constructor.
 TemplateVariable (const T &val)
 Constructor.
 TemplateVariable (const TemplateVariable< T > &rhs)
 Copy Constructor.
virtual ~TemplateVariable ()
 Destructor.
TemplateVariable< T > & operator= (const TemplateVariable< T > &rhs)
virtual bool operator== (const VariableInterface &rhs) const
virtual bool operator!= (const VariableInterface &rhs) const
virtual bool operator< (const VariableInterface &rhs) const
virtual bool operator<= (const VariableInterface &rhs) const
virtual bool operator> (const VariableInterface &rhs) const
virtual bool operator>= (const VariableInterface &rhs) const
virtual VariableType GetType () const
GetValue () const
void SetValue (const T &newVal)
 Set the value.

Protected Attributes

m_Value
 Value to store.

Detailed Description

template<typename T>
class LibCT::TemplateVariable< T >

A TemplateVariable is a general container for holding values.


Constructor & Destructor Documentation

template<typename T>
LibCT::TemplateVariable< T >::TemplateVariable ( VariableContainer pContainer,
const std::string &  name 
) [inline]

Constructor.

template<typename T>
LibCT::TemplateVariable< T >::TemplateVariable ( const T &  val) [inline, explicit]

Constructor.

template<typename T>
LibCT::TemplateVariable< T >::TemplateVariable ( const TemplateVariable< T > &  rhs) [inline]

Copy Constructor.

template<typename T>
virtual LibCT::TemplateVariable< T >::~TemplateVariable ( ) [inline, virtual]

Destructor.


Member Function Documentation

template<typename T>
virtual VariableType LibCT::TemplateVariable< T >::GetType ( ) const [inline, virtual]

Get the type of this variable

Returns:
VariableTypeUnknown

Implements LibCT::VariableInterface.

Reimplemented in LibCT::DoubleValue, LibCT::FloatValue, LibCT::IntValue, and LibCT::StringValue.

template<typename T>
T LibCT::TemplateVariable< T >::GetValue ( ) const [inline]

Get the value

Returns:
m_Value
template<typename T>
virtual bool LibCT::TemplateVariable< T >::operator!= ( const VariableInterface rhs) const [inline, virtual]

In-equality operator

Returns:
True if values are equal, false if not
Exceptions:
VariableExceptionif a type conversion isn't possible
Parameters:
rhsTemplateVariable to compare with

Implements LibCT::VariableInterface.

template<typename T>
virtual bool LibCT::TemplateVariable< T >::operator< ( const VariableInterface rhs) const [inline, virtual]

Less-than operator

Returns:
True if values are equal, false if not
Exceptions:
VariableExceptionif a type conversion isn't possible
Parameters:
rhsTemplateVariable to compare with

Implements LibCT::VariableInterface.

template<typename T>
virtual bool LibCT::TemplateVariable< T >::operator<= ( const VariableInterface rhs) const [inline, virtual]

Less-than or equal operator

Returns:
True if values are equal, false if not
Exceptions:
VariableExceptionif a type conversion isn't possible
Parameters:
rhsTemplateVariable to compare with

Implements LibCT::VariableInterface.

template<typename T>
TemplateVariable<T>& LibCT::TemplateVariable< T >::operator= ( const TemplateVariable< T > &  rhs) [inline]

Assignement Operator

Returns:
A referance to this
Parameters:
rhsTemplateVariable to assign from
template<typename T>
virtual bool LibCT::TemplateVariable< T >::operator== ( const VariableInterface rhs) const [inline, virtual]

Equality operator

Returns:
True if values are equal, false if not
Exceptions:
VariableExceptionif a type conversion isn't possible
Parameters:
rhsTemplateVariable to compare with

Implements LibCT::VariableInterface.

template<typename T>
virtual bool LibCT::TemplateVariable< T >::operator> ( const VariableInterface rhs) const [inline, virtual]

Greater-than operator

Returns:
True if values are equal, false if not
Exceptions:
VariableExceptionif a type conversion isn't possible
Parameters:
rhsTemplateVariable to compare with

Implements LibCT::VariableInterface.

template<typename T>
virtual bool LibCT::TemplateVariable< T >::operator>= ( const VariableInterface rhs) const [inline, virtual]

Greater-than or equal operator

Returns:
True if values are equal, false if not
Exceptions:
VariableExceptionif a type conversion isn't possible
Parameters:
rhsTemplateVariable to compare with

Implements LibCT::VariableInterface.

template<typename T>
void LibCT::TemplateVariable< T >::SetValue ( const T &  newVal) [inline]

Set the value.

Parameters:
newValNew value to set

Member Data Documentation

template<typename T>
T LibCT::TemplateVariable< T >::m_Value [protected]

Value to store.


The documentation for this class was generated from the following file: