LibCT 2.0
|
A TemplateVariable is a general container for holding values. More...
#include <TemplateVariable.h>
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 |
T | GetValue () const |
void | SetValue (const T &newVal) |
Set the value. | |
Protected Attributes | |
T | m_Value |
Value to store. |
A TemplateVariable is a general container for holding values.
LibCT::TemplateVariable< T >::TemplateVariable | ( | VariableContainer * | pContainer, |
const std::string & | name | ||
) | [inline] |
Constructor.
LibCT::TemplateVariable< T >::TemplateVariable | ( | const T & | val | ) | [inline, explicit] |
Constructor.
LibCT::TemplateVariable< T >::TemplateVariable | ( | const TemplateVariable< T > & | rhs | ) | [inline] |
Copy Constructor.
virtual LibCT::TemplateVariable< T >::~TemplateVariable | ( | ) | [inline, virtual] |
Destructor.
virtual VariableType LibCT::TemplateVariable< T >::GetType | ( | ) | const [inline, virtual] |
Get the type of this variable
Implements LibCT::VariableInterface.
Reimplemented in LibCT::DoubleValue, LibCT::FloatValue, LibCT::IntValue, and LibCT::StringValue.
T LibCT::TemplateVariable< T >::GetValue | ( | ) | const [inline] |
Get the value
virtual bool LibCT::TemplateVariable< T >::operator!= | ( | const VariableInterface & | rhs | ) | const [inline, virtual] |
In-equality operator
VariableException | if a type conversion isn't possible |
rhs | TemplateVariable to compare with |
Implements LibCT::VariableInterface.
virtual bool LibCT::TemplateVariable< T >::operator< | ( | const VariableInterface & | rhs | ) | const [inline, virtual] |
Less-than operator
VariableException | if a type conversion isn't possible |
rhs | TemplateVariable to compare with |
Implements LibCT::VariableInterface.
virtual bool LibCT::TemplateVariable< T >::operator<= | ( | const VariableInterface & | rhs | ) | const [inline, virtual] |
Less-than or equal operator
VariableException | if a type conversion isn't possible |
rhs | TemplateVariable to compare with |
Implements LibCT::VariableInterface.
TemplateVariable<T>& LibCT::TemplateVariable< T >::operator= | ( | const TemplateVariable< T > & | rhs | ) | [inline] |
virtual bool LibCT::TemplateVariable< T >::operator== | ( | const VariableInterface & | rhs | ) | const [inline, virtual] |
Equality operator
VariableException | if a type conversion isn't possible |
rhs | TemplateVariable to compare with |
Implements LibCT::VariableInterface.
virtual bool LibCT::TemplateVariable< T >::operator> | ( | const VariableInterface & | rhs | ) | const [inline, virtual] |
Greater-than operator
VariableException | if a type conversion isn't possible |
rhs | TemplateVariable to compare with |
Implements LibCT::VariableInterface.
virtual bool LibCT::TemplateVariable< T >::operator>= | ( | const VariableInterface & | rhs | ) | const [inline, virtual] |
Greater-than or equal operator
VariableException | if a type conversion isn't possible |
rhs | TemplateVariable to compare with |
Implements LibCT::VariableInterface.
void LibCT::TemplateVariable< T >::SetValue | ( | const T & | newVal | ) | [inline] |
Set the value.
newVal | New value to set |
T LibCT::TemplateVariable< T >::m_Value [protected] |
Value to store.