|
| albaAbstractTypeMacro (albaAgent, albaReferenceCounted) |
|
| ALBA_ID_DEC (AGENT_INITIALIZE) |
|
void | AddObserver (albaObserver *listener, albaID channel=MCH_UP) |
|
void | RemoveObserver (albaObserver *listener) |
|
void | RemoveAllObservers () |
|
virtual void | OnEvent (albaEventBase *event) |
|
bool | HasObservers (albaID channel) |
|
void | GetObservers (albaID channel, std::vector< albaObserver * > &olist) |
|
int | Initialize () |
|
void | Shutdown () |
|
int | IsInitialized () |
|
virtual void | SetName (const char *name) |
|
const char * | GetName () |
|
| albaReferenceCounted () |
|
virtual | ~albaReferenceCounted () |
|
| albaAbstractTypeMacro (albaReferenceCounted, albaObject) |
|
virtual void | Delete () |
|
void | Register (void *obj) |
|
virtual void | UnRegister (void *obj) |
|
int | GetReferenceCount () |
|
void | SetReferenceCount (int) |
|
| albaObject () |
|
virtual | ~albaObject () |
|
virtual void | Delete () |
|
virtual const char * | GetTypeName () const |
|
virtual bool | IsA (const char *type_name) const |
|
virtual bool | IsA (const albaTypeID &type_id) const |
|
virtual albaObject * | NewObjectInstance () const =0 |
|
virtual const albaTypeID & | GetTypeId () const |
|
virtual void | Print (std::ostream &os, const int indent=0) const |
|
| albaObject (const albaObject &c) |
|
| albaObserver () |
|
virtual | ~albaObserver () |
|
virtual void | OnEvent (albaEventBase *e)=0 |
|
| albaEventBroadcaster (void *owner=NULL) |
|
virtual | ~albaEventBroadcaster () |
|
| albaEventBroadcaster (const albaEventBroadcaster &c) |
|
void | AddObserver (albaObserver *obj) |
|
void | AddObserver (albaObserver &obj) |
|
albaObserverCallback * | AddObserverCallback (void(*f)(void *sender, albaID eid, void *clientdata, void *calldata)) |
|
bool | RemoveObserver (albaObserver *obj) |
|
void | RemoveAllObservers () |
|
bool | IsObserver (albaObserver *obj) |
|
bool | HasObservers () |
|
void | GetObservers (std::vector< albaObserver * > &olist) |
|
void | InvokeEvent (albaEventBase &e) |
|
void | InvokeEvent (albaEventBase *e) |
|
void | InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL) |
|
void | SetChannel (albaID ch) |
|
albaID | GetChannel () |
|
virtual void | SetListener (albaObserver *o) |
|
| albaEventSender () |
|
virtual void | SetListener (albaObserver *o) |
|
virtual albaObserver * | GetListener () |
|
virtual bool | HasListener () |
|
virtual void | InvokeEvent (albaEventBase &e) |
|
virtual void | InvokeEvent (albaEventBase *e) |
|
virtual void | InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL) |
|
An agent is a computational object with a default I/O interface.
An agent is a computational object with a conventional events I/O interface, processing its input events, taking some action and producing output events toward other agents. An agent is a albaObserver, thus an object able to listen to ALBA events coming from other objects and extends the idea of channels keeping an internal dynamic array of channels: this was an agent can be attached as observer of events on any channel of other events, allowing the creation of a network of agents. This class support also bridging of events coming from VTK: a albaAgent can be set as observer of VTK events which are tunneled inside ALBA events.
- See also
- albaEventBase albaAgent albaAgentEventQueue albaAgentThreaded
Definition at line 49 of file albaAgent.h.
Process an event: the event is processed immediately and synchronously, i.e.
the function doesn't return until the event is processed by someone. If the class cannot manage the event it is passed to its listeners on the same channel and so on, until it's processed.
Implements albaObserver.
Reimplemented in albaAction, albaAgentThreaded, albaAvatar, albaAvatar2D, albaAvatar3D, albaDevice, albaDeviceButtonsPadMouse, albaDeviceButtonsPadTracker, albaDeviceManager, albaDeviceSet, albaInteractor, albaInteractor2DDistance, albaInteractor2DMeasure, albaInteractor6DOFCameraMove, albaInteractorCameraMove, albaInteractorCameraPicker, albaInteractorCompositorMouse, albaInteractorCompositorMouseFloatVME, albaInteractorDICOMImporter, albaInteractorGeneric6DOF, albaInteractorPER, albaInteractorPERBrushFeedback, albaInteractorPERScalarInformation, albaInteractorPicker, albaInteractorSegmentationPicker, albaInteractorSlider, and mmiInfoImage.