35class vtkCallbackCommand;
99 virtual void SetName(
const char *name) {m_Name=name;}
117 static void InternalProcessVTKEvents(vtkObject* sender,
unsigned long channel,
void* clientdata,
void* calldata);
134 vtkCallbackCommand *m_EventCallbackCommand;
MCH_UP
channel used to send events up in the tree
long albaID
type for IDs inside ALBA
#define EXPORT_STL_VECTOR(declspec_, T_)
An agent is a computational object with a default I/O interface.
void InvokeEvent(albaEventBase &event, albaID channel=-1)
This function make an event to be passed to observers of this class for the specified channel.
void InvokeEvent(albaEventBase *event, albaID channel=-1)
albaAbstractTypeMacro(albaAgent, albaReferenceCounted)
virtual void OnEvent(albaEventBase *event)
Process an event: the event is processed immediately and synchronously, i.e.
virtual void InternalShutdown()
to be redefined by subclasses to define the shutdown actions
void Shutdown()
Shutdown the agent, Subclasses can redefine InternalShutdown() to customize actions for shutting down...
void AddObserver(albaObserver *listener, albaID channel=MCH_UP)
Attach/Detach this object as event source for the specified listener.
void InvokeEvent(void *sender, int id, albaID channel=MCH_UP, void *data=NULL)
void RemoveObserver(albaObserver *listener)
void GetObservers(albaID channel, std::vector< albaObserver * > &olist)
return a list of the observers on a channel
int IsInitialized()
Return true if this agent has been initialized.
virtual void SetName(const char *name)
The Agent name is used to identify the Agent in a unique way.
virtual int InternalInitialize()
This function is overridden by subclasses to perform custom initialization.
std::vector< albaEventBroadcaster * > m_Channels
bool HasObservers(albaID channel)
return true if there's an observer on the specified channel.
int Initialize()
Initialize this agent.
void RemoveAllObservers()
Implementation of the message object for the Subject/Observer design pattern.
This class inerith form albaEventSender and extends albaEventSender with the capacity of send events ...
Interface implementing the Observer of the Subject/Observer design pattern.
albaReferenceCounted - abstract base class for ALBA objects with reference counting.
albaString - performs common string operations on c-strings.
ALBA_ID_DEC(AGENT_INITIALIZE)
Event used to force initialization of this object.