Public Member Functions

ImNotifiable Class Reference
[BaseUtility - blackboard related stuff]

Clients can receive change notifications from the Blackboard via this interface. More...

#include <ImNotifiable.h>

Inherited by BaseModule, BaseUtility, SimTracer [private], and WorldUtilityStats.

List of all members.

Public Member Functions

virtual void receiveBBItem (int category, const BBItem *details, int scopeModuleId)=0
 Called by the Blackboard whenever a change of a category occurs to which this client has subscribed.
virtual ~ImNotifiable ()
 Prevent compiler complaints, but its best not to use the destructor.

Detailed Description

Clients can receive change notifications from the Blackboard via this interface.

Clients must "implement" (subclass from) this class.

See also:
Blackboard
Author:
Andras Varga
Andreas Koepke

Definition at line 58 of file ImNotifiable.h.


Member Function Documentation

virtual void ImNotifiable::receiveBBItem ( int  category,
const BBItem details,
int  scopeModuleId 
) [pure virtual]

Called by the Blackboard whenever a change of a category occurs to which this client has subscribed.

If your class is derived from a class that also is notifiable, make sure that you call it first thing you do. E.g.

BaseClass : public ImNotifiable ...

YourClass : public BaseClass ...

YourClass::receiveBBItem(category, details, scopeModuleId) { BaseClass::receiveBBItem(category, details, scopeModuleId); switch(category) { ... } }

This also implies that you should handle unknown categories gracefully -- maybe a subclass subscribed to them.

This function is called from within publishBBItem, please pay attention to race conditions that can appear. If you want to schedule messages when this function of your module is called, you have to use the Enter_Method or the Enter_Method_Silent macro.

Implemented in ChannelAccess, BaseModule, BaseUtility, MoBANLocal, BatteryStats, phyPER, SimTracer, and WorldUtilityStats.


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