17#ifndef __albaAgentEventQueue_h
18#define __albaAgentEventQueue_h
140 class EventQueueItem;
141 struct InternalEventQueue;
long albaID
type for IDs inside ALBA
Base class for managing event queueing and synchronized dispatching.
bool GetDispatched()
Get/Set the Dispatched flag.
virtual int PopEvent(albaEventBase *&event)
bool PushEvent(albaID event_id, void *sender, void *data=NULL)
albaTypeMacro(albaAgentEventQueue, albaAgent)
void SetPushMode(int mode)
Set the Push modality.
void SetDequeueModeToSingleEvent()
bool PushEvent(albaEventBase &event)
Push an event in the queue (FIFO)
void SetDispatched(bool value=true)
virtual bool PushEvent(albaEventBase *event)
virtual ~albaAgentEventQueue()
InternalEventQueue * m_EventQueue
virtual void RequestForDispatching()
Internal function used to request the dispatching.
void SetDequeueMode(int mode)
Set the dequeuing modality during dispatching.
void SetDequeueModeToMultipleEvent()
bool IsQueueEmpty()
return false if there are events in the queue
int PopEvent(albaEventBase &event)
int GetQueueSize()
Return event queue size.
void SetDispatchModeToBroadcast()
void SetPushModeToPolling()
albaEventBase * PeekLastEvent()
return the last event in the queue (FIFO)
void SetDispatchMode(int mode)
Set the dispatch modality, i.e.
albaEventBase * PopEvent()
return the first event of the queue (FIFO) and remove it from the queue.
albaEventBase * PeekEvent()
return the first event in the queue (FIFO)
void SetDispatchModeToSelfProcess()
void SetPushModeToDispatchEvent()
virtual bool DispatchEvents()
Dispatch events in queue;.
An agent is a computational object with a default I/O interface.
Implementation of the message object for the Subject/Observer design pattern.
Critical section locking class that can be allocated on the stack.
ALBA_ID_DEC(EVENT_DISPATCH)
This is used by queues to manage synchronization (see class description)