index previous next




file name: ctrled.hpp, ctrled.cpp
classification: simulation
contents: class CControlledObject, class CApplControlledObject
the latter is derived from: class CControlledObject
use: base classes for all modules that are controlled by some other class; CApplControlledObject should be used for application modules (which are identified by a pair <nodeID, area>).


global items used by CControlledObject:


member variables of CControlledObject:

 CControllingObject *ctrl_: A pointer to the controlling object.


member functions of CControlledObject:

 CControlledObject (CControllingObject *ctrl): Stores the controlling object.

 virtual ~CControlledObject(): Empty.

 virtual void Dispose(): Empty. Should delete all dynamic members.

 virtual EBool ExecuteCommand (const SCommand& command): All supported commands return True.

All other commands are not supported, and False is returned.

 virtual void Init(): Empty. Should create and/or initialize the members that are modified during the reset.

 virtual EBool GetParameter (SParameter& param) const: Always returns False.

 virtual void ReportEvent (EModule module, EEvent eventType): Creates an event object of type SEvent, stores the data, and passes the event to the controlling object.

 virtual void ReportEvent (SEvent *event): Passes the event to the controlling object.

 virtual void Reset(): Calls Dispose(), then Init().

 virtual EBool SetParameter (const SParameter& param): Always returns False.


global items used by CApplControlledObject:


member functions of CApplControlledObject:

 CApplControlledObject (CControllingObject *ctrl): Stores the controlling object.

 virtual void ReportEvent (EModule module, EEvent eventType): Creates an event object of type SApplicationEvent, stores the data, and passes the event to the controlling object.

 virtual void ReportEvent (SEvent *event): Passes the event to the controlling object.


last modified: Fri Feb 5 18:56:09 1999