LibCT 2.0
Public Member Functions | Private Attributes

LibCT::VariableInterface Class Reference

VariableInterface provides a general interface for all user-defined variables. More...

#include <VariableInterface.h>

Inheritance diagram for LibCT::VariableInterface:
LibCT::TemplateVariable< T > LibCT::TemplateVariable< double > LibCT::TemplateVariable< float > LibCT::TemplateVariable< int > LibCT::TemplateVariable< std::string > LibCT::DoubleValue LibCT::FloatValue LibCT::IntValue LibCT::StringValue

List of all members.

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
VariableContainerGetContainer () const
const std::string & GetName () const
bool Execute (VariableOperator oper, const VariableInterface &rhs)

Private Attributes

VariableContainerm_pContainer
 Container that holds this variable.
std::string m_Name
 Name of the variable (unique to scope)

Detailed Description

VariableInterface provides a general interface for all user-defined variables.


Constructor & Destructor Documentation

LibCT::VariableInterface::VariableInterface ( VariableContainer pContainer,
const std::string &  name 
) [inline]

Constructor.

virtual LibCT::VariableInterface::~VariableInterface ( ) [inline, virtual]

Destructor.


Member Function Documentation

bool LibCT::VariableInterface::Execute ( VariableOperator  oper,
const VariableInterface rhs 
) [inline]

Perform an operation

Returns:
Result of the operation
Parameters:
operOperation to perform
rhsOther variable to perform operation with
VariableContainer* LibCT::VariableInterface::GetContainer ( ) const [inline]

Get the container that holds this variable

Returns:
The VariableContainer that holds this variable
const std::string& LibCT::VariableInterface::GetName ( ) const [inline]

Get the name of this variable

Returns:
The name of the variable
virtual VariableType LibCT::VariableInterface::GetType ( ) const [pure virtual]
virtual std::string LibCT::VariableInterface::GetTypeString ( ) const [pure virtual]

Get the string version of the type

Returns:
String representation 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

Returns:
True if values are equal, false if not
Parameters:
rhsTemplateVariable 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

Returns:
True if values are equal, false if not
Parameters:
rhsTemplateVariable 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

Returns:
True if values are equal, false if not
Parameters:
rhsTemplateVariable 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

Returns:
True if values are equal, false if not
Parameters:
rhsTemplateVariable 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

Returns:
True if values are equal, false if not
Parameters:
rhsTemplateVariable 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

Returns:
True if values are equal, false if not
Parameters:
rhsTemplateVariable 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

Returns:
String representation of the value

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


Member Data Documentation

std::string LibCT::VariableInterface::m_Name [private]

Name of the variable (unique to scope)

Container that holds this variable.


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