class skTreeNodeObject : public skExecutable

This class gives an skExecutable wrapper to an skTreeNode object

Inheritance:

skTreeNodeObject < skExecutable


Public Methods

skTreeNodeObject()
Default Constructor
skTreeNodeObject(const skString& location, skTreeNode * node, bool created)
Constructor providing a treenode
~skTreeNodeObject()
Destructor - will delete the associated node if the created flag is set
int executableType() const
returns the value TREENODE_TYPE to identify this as a TreeNodeObject
int intValue() const
Returns the data field of the node as an integer
float floatValue() const
Returns the data field of the node as a float
bool boolValue() const
Returns the data field of the node as a boolean
char charValue() const
Returns the first character of the data field of the node
skString strValue() const
Returns the data field of the node as a string
bool setValue(const skString& name, const skString& attribute, const skRValue& value)
Sets a value within the node
bool getValue(const skString& name, const skString& attribute, skRValue& v)
Retrieves a value from within the node
bool method(const skString& name, skRValueArray& args, skRValue& ret)
This function attempts to call a method defined within the TreeNode
skTreeNode* getNode()
This function returns the treenode wrapped by this object
void setNode(skTreeNode * node)
This function changes the node associated with this object
bool equals(skExecutable * o) const
This function tests if this object is equal to the other object

Protected Fields

skString m_Location
the location the node came from

Inherited from skExecutable:


Documentation

This class gives an skExecutable wrapper to an skTreeNode object
skTreeNodeObject()
Default Constructor

skTreeNodeObject(const skString& location, skTreeNode * node, bool created)
Constructor providing a treenode
Parameters:
location - - the location of this treenode (e.g. file or database), this is used in error messages
node - - the node itself
created - - set this to true to allow the TreeNodeObject to delete the node when it is deleted

~skTreeNodeObject()
Destructor - will delete the associated node if the created flag is set

int executableType() const
returns the value TREENODE_TYPE to identify this as a TreeNodeObject

int intValue() const
Returns the data field of the node as an integer

float floatValue() const
Returns the data field of the node as a float

bool boolValue() const
Returns the data field of the node as a boolean

char charValue() const
Returns the first character of the data field of the node

skString strValue() const
Returns the data field of the node as a string

bool setValue(const skString& name, const skString& attribute, const skRValue& value)
Sets a value within the node. The field name is matched to a child of the treenode with the same label. If a match is found, the child's data is changed.
Parameters:
name - - the name of the field
attribute - - the attribute name is ignored
value - - the value to be assigned to the child. If this is a TREENODE_TYPE object, the full treenode is copied

bool getValue(const skString& name, const skString& attribute, skRValue& v)
Retrieves a value from within the node. The field name is matched to a child of the treenode with the same label. If a match is found, a new TreeNodeObject encapsulating the child is returned.

bool method(const skString& name, skRValueArray& args, skRValue& ret)
This function attempts to call a method defined within the TreeNode. It searches for a child whose label matches the method name, and tries to execute its data as a Simkin script
Returns:
true if the method was found, otherwise false
Parameters:
name - - the name of the method
args - - the arguments to pass to the method
ret - - the RValue to receive the results of the method call

skTreeNode* getNode()
This function returns the treenode wrapped by this object

void setNode(skTreeNode * node)
This function changes the node associated with this object

bool equals(skExecutable * o) const
This function tests if this object is equal to the other object. It does this by checking the string values are equal

skString m_Location
the location the node came from


Direct child classes:
skScriptedExecutable

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de