Public Member Functions

IScriptable Class Reference

#include <IScriptable.h>

Inheritance diagram for IScriptable:
FailureManager NetworkInfo RSVP SimpleClassifier

List of all members.

Public Member Functions

virtual ~IScriptable ()
virtual void processCommand (const cXMLElement &node)=0

Detailed Description

Modules that need to be scriptable by ScenarioManager should "implement" (subclass from) this class.

See also:
ScenarioManager
Author:
Andras Varga

Definition at line 32 of file IScriptable.h.


Constructor & Destructor Documentation

virtual IScriptable::~IScriptable (  )  [inline, virtual]

Definition at line 35 of file IScriptable.h.

{}


Member Function Documentation

virtual void IScriptable::processCommand ( const cXMLElement &  node  )  [pure virtual]

Called by ScenarioManager whenever a script command needs to be carried out by the module.

The command is represented by the XML element or element tree. The command name can be obtained as:

 const char *command = node->getTagName()
 

Parameters are XML attributes, e.g. a "neighbour" parameter can be retrieved as:

 const char *attr = node->getAttribute("neighbour")
 

More complex input can be passed in child elements.

See also:
cXMLElement

Implemented in FailureManager, NetworkInfo, and RSVP.

Referenced by ScenarioManager::processModuleSpecificCommand().


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