LibCT 2.0
|
VariableInterface provides a general interface for all user-defined variables. More...
#include <VariableInterface.h>
Public Member Functions | |
VariableInterface (VariableContainer *pContainer, const std::string &name) | |
Constructor. | |
virtual | ~VariableInterface () |
Destructor. | |
virtual VariableType | GetType () const =0 |
virtual std::string | ToString () const =0 |
virtual std::string | GetTypeString () const =0 |
virtual bool | operator== (const VariableInterface &rhs) const =0 |
virtual bool | operator!= (const VariableInterface &rhs) const =0 |
virtual bool | operator< (const VariableInterface &rhs) const =0 |
virtual bool | operator<= (const VariableInterface &rhs) const =0 |
virtual bool | operator> (const VariableInterface &rhs) const =0 |
virtual bool | operator>= (const VariableInterface &rhs) const =0 |
VariableContainer * | GetContainer () const |
const std::string & | GetName () const |
bool | Execute (VariableOperator oper, const VariableInterface &rhs) |
Private Attributes | |
VariableContainer * | m_pContainer |
Container that holds this variable. | |
std::string | m_Name |
Name of the variable (unique to scope) |
VariableInterface provides a general interface for all user-defined variables.
LibCT::VariableInterface::VariableInterface | ( | VariableContainer * | pContainer, |
const std::string & | name | ||
) | [inline] |
Constructor.
virtual LibCT::VariableInterface::~VariableInterface | ( | ) | [inline, virtual] |
Destructor.
bool LibCT::VariableInterface::Execute | ( | VariableOperator | oper, |
const VariableInterface & | rhs | ||
) | [inline] |
Perform an operation
oper | Operation to perform |
rhs | Other variable to perform operation with |
VariableContainer* LibCT::VariableInterface::GetContainer | ( | ) | const [inline] |
Get the container that holds this variable
const std::string& LibCT::VariableInterface::GetName | ( | ) | const [inline] |
Get the name of this variable
virtual VariableType LibCT::VariableInterface::GetType | ( | ) | const [pure virtual] |
Get the type of this variable
Implemented in LibCT::DoubleValue, LibCT::FloatValue, LibCT::IntValue, LibCT::StringValue, LibCT::TemplateVariable< T >, LibCT::TemplateVariable< double >, LibCT::TemplateVariable< std::string >, LibCT::TemplateVariable< float >, and LibCT::TemplateVariable< int >.
virtual std::string LibCT::VariableInterface::GetTypeString | ( | ) | const [pure virtual] |
Get the string version of the type
Implemented in LibCT::DoubleValue, LibCT::FloatValue, LibCT::IntValue, and LibCT::StringValue.
virtual bool LibCT::VariableInterface::operator!= | ( | const VariableInterface & | rhs | ) | const [pure virtual] |
In-equality operator
rhs | TemplateVariable to compare with |
Implemented in LibCT::TemplateVariable< T >, LibCT::TemplateVariable< double >, LibCT::TemplateVariable< std::string >, LibCT::TemplateVariable< float >, and LibCT::TemplateVariable< int >.
virtual bool LibCT::VariableInterface::operator< | ( | const VariableInterface & | rhs | ) | const [pure virtual] |
Less-than operator
rhs | TemplateVariable to compare with |
Implemented in LibCT::TemplateVariable< T >, LibCT::TemplateVariable< double >, LibCT::TemplateVariable< std::string >, LibCT::TemplateVariable< float >, and LibCT::TemplateVariable< int >.
virtual bool LibCT::VariableInterface::operator<= | ( | const VariableInterface & | rhs | ) | const [pure virtual] |
Less-than or equal operator
rhs | TemplateVariable to compare with |
Implemented in LibCT::TemplateVariable< T >, LibCT::TemplateVariable< double >, LibCT::TemplateVariable< std::string >, LibCT::TemplateVariable< float >, and LibCT::TemplateVariable< int >.
virtual bool LibCT::VariableInterface::operator== | ( | const VariableInterface & | rhs | ) | const [pure virtual] |
Equality operator
rhs | TemplateVariable to compare with |
Implemented in LibCT::TemplateVariable< T >, LibCT::TemplateVariable< double >, LibCT::TemplateVariable< std::string >, LibCT::TemplateVariable< float >, and LibCT::TemplateVariable< int >.
virtual bool LibCT::VariableInterface::operator> | ( | const VariableInterface & | rhs | ) | const [pure virtual] |
Greater-than operator
rhs | TemplateVariable to compare with |
Implemented in LibCT::TemplateVariable< T >, LibCT::TemplateVariable< double >, LibCT::TemplateVariable< std::string >, LibCT::TemplateVariable< float >, and LibCT::TemplateVariable< int >.
virtual bool LibCT::VariableInterface::operator>= | ( | const VariableInterface & | rhs | ) | const [pure virtual] |
Greater-than or equal operator
rhs | TemplateVariable to compare with |
Implemented in LibCT::TemplateVariable< T >, LibCT::TemplateVariable< double >, LibCT::TemplateVariable< std::string >, LibCT::TemplateVariable< float >, and LibCT::TemplateVariable< int >.
virtual std::string LibCT::VariableInterface::ToString | ( | ) | const [pure virtual] |
Get a string representation of the value
Implemented in LibCT::DoubleValue, LibCT::FloatValue, LibCT::IntValue, and LibCT::StringValue.
std::string LibCT::VariableInterface::m_Name [private] |
Name of the variable (unique to scope)
Container that holds this variable.