#include <VariableTableInstance.h>
Inheritance diagram for green::VariableTableInstance:
Public Member Functions | |
VariableTableInstance (boost::shared_ptr< VariableTableInstance > copy) | |
VariableTableInstance (Key templ) | |
Key | GetTemplate () const |
void | SetTemplate (Key templ) |
virtual void | CopyFrom (boost::shared_ptr< VariableTableInstance > copy) |
virtual | ~VariableTableInstance () |
default destructor declared as virtual | |
ID | GetID () const |
get the instance's unique ID | |
void | SetID (ID newID) |
set the instance's unique ID | |
virtual void | AddVariable (Variable::Value value) |
size_t | GetNumVariables () const |
virtual Variable::Value | GetVariable (Key key) const |
virtual void | SetVariable (Key key, Variable::Value value) |
Protected Member Functions | |
VariableTableInstance () | |
You must use the VariableTableInstance(shared_ptr<templateType>) constructor. | |
Protected Attributes | |
ID | mID |
The unique ID associated with this instance. | |
std::vector< Variable::Value > | mVariables |
Variable table. | |
Key | mTemplate |
The template for this instance. |
green::VariableTableInstance::VariableTableInstance | ( | boost::shared_ptr< VariableTableInstance > | copy | ) | [inline] |
Copy constructor for shared_ptr of VariableTableInstance
green::VariableTableInstance::VariableTableInstance | ( | Key | templ | ) | [inline] |
Constructor that sets the template key, but nothing else
Key green::VariableTableInstance::GetTemplate | ( | ) | const [inline] |
Gets the template key for this instance.
void green::VariableTableInstance::SetTemplate | ( | Key | templ | ) | [inline] |
Set the template key for this instance
templ | The new template Key for this instance |
virtual void green::VariableTableInstance::CopyFrom | ( | boost::shared_ptr< VariableTableInstance > | copy | ) | [inline, virtual] |
This = operator will copy the contents of another instance into this one
virtual void green::VariableTableInstance::AddVariable | ( | Variable::Value | value | ) | [inline, virtual] |
Add a value to the end of the table
value | the type and value of the variable |
size_t green::VariableTableInstance::GetNumVariables | ( | ) | const [inline] |
Get the number of values in the instance.
virtual Variable::Value green::VariableTableInstance::GetVariable | ( | Key | key | ) | const [inline, virtual] |
Get a value, if it exists. Throws an Error if the variable name does not exist.
key | the key of the variable to get |
virtual void green::VariableTableInstance::SetVariable | ( | Key | key, | |
Variable::Value | value | |||
) | [inline, virtual] |
Set a variable to a certain value. Throws an Error if the key is not a value variable in the table.
name | The name of the variable. | |
value | The new value of the variable. |