Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skExecutable Class Reference

This class gives an interface for the Interpreter to call into. More...

#include <skExecutable.h>

Inheritance diagram for skExecutable:

skInterpreter skNull skTest skTreeNodeObject skTreeNodeObjectEnumerator skXMLElementObject skXMLElementObjectEnumerator skScriptedExecutable skXMLExecutable List of all members.

Public Methods

 skExecutable ()
 Default Constructor.

virtual ~skExecutable ()
 Destructor.

virtual int executableType () const
 this method returns the type of the object. More...

virtual int intValue () const
 returns an integer equivalent of this object.

virtual bool boolValue () const
 returns a boolean equivalent of this object.

virtual char charValue () const
 returns a character equivalent of this object.

virtual skString strValue () const
 returns a String equivalent of this object.

virtual float floatValue () const
 returns a float equivalent of this object.

virtual bool setValue (const skString& field_name,const skString& attribute,const skRValue& value)
 requests the object to set a field to the given value. More...

virtual bool setValueAt (const skRValue& array_index,const skString& attribute,const skRValue& value)
 requests the object to set an item in its collection to a certain value. More...

virtual bool getValue (const skString& field_name,const skString& attribute,skRValue& value)
 requests the object to return a field's value. More...

virtual bool getValueAt (const skRValue& array_index,const skString& attribute,skRValue& value)
 requests the object to return an object from its collection. More...

virtual bool method (const skString& method_name,skRValueArray& arguments,skRValue& return_value)
 Requests that the object execute the given method. More...

virtual bool equals (skExecutable * other_object) const
 This method compares this object with another object. More...


Detailed Description

This class gives an interface for the Interpreter to call into.


Member Function Documentation

bool skExecutable::equals ( skExecutable * other_object ) const [virtual]
 

This method compares this object with another object.

The default implementation checks object pointers.

int skExecutable::executableType ( ) const [virtual]
 

this method returns the type of the object.

By default this is UNDEFINED_TYPE. Define your own value if you want to check the type of your object at run-time

Reimplemented in skTreeNodeObject, and skXMLElementObject.

bool skExecutable::getValue ( const skString & s,
const skString & attribute,
skRValue & return_value ) [virtual]
 

requests the object to return a field's value.

Parameters:
field_name   - the name of the field name to get
attribute   - the attribute name to get (may be blank)
value   - the value to receive the value of the field
Returns:
true if the field was changed, false if the field could not be get or found

Reimplemented in skTest, skTreeNodeObject, and skXMLElementObject.

bool skExecutable::getValueAt ( const skRValue & array_index,
const skString & attribute,
skRValue & value ) [virtual]
 

requests the object to return an object from its collection.

Parameters:
array_index   - the identifier of the item - this might be a string, integer or any other legal value
attribute   - the attribute name to get (may be blank)
value   - the value to receive the value of the field
Returns:
true if the field was changed, false if the field could not be get or found

Reimplemented in skTreeNodeObject, and skXMLElementObject.

bool skExecutable::method ( const skString & name,
skRValueArray & args,
skRValue & ret ) [virtual]
 

Requests that the object execute the given method.

Parameters:
method_name   - the name of the method to execute
arguments   - an array of RValue objects, which are the arguments to the method
return_value   - an object to receive the return value of the method
return   true if the method could be executed, or false if the method is not supported

Reimplemented in skTest, skTreeNodeObject, skTreeNodeObjectEnumerator, skXMLElementObject, and skXMLElementObjectEnumerator.

bool skExecutable::setValue ( const skString & s,
const skString & attribute,
const skRValue & return_value ) [virtual]
 

requests the object to set a field to the given value.

Parameters:
field_name   - the name of the field name to set
attribute   - the attribute name to set (may be blank)
value   - the value to be set
Returns:
true if the field was changed, false if the field could not be set or found

Reimplemented in skInterpreter, skTreeNodeObject, and skXMLElementObject.

bool skExecutable::setValueAt ( const skRValue & array_index,
const skString & attribute,
const skRValue & value ) [virtual]
 

requests the object to set an item in its collection to a certain value.

Parameters:
array_index   - the identifier of the item - this might be a string, integer or any other legal value
attribute   - the attribute name to set (may be blank)
value   - the value to be set
Returns:
true if the field was changed, false if the field could not be set or found

Reimplemented in skTreeNodeObject, and skXMLElementObject.


The documentation for this class was generated from the following files:
Generated at Mon May 14 08:43:08 2001 for Simkin by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000