ALBA
Public Member Functions | Protected Attributes | List of all members
albaEventSender Class Reference

#include <albaEventSender.h>

Inheritance diagram for albaEventSender:
Inheritance graph
[legend]
Collaboration diagram for albaEventSender:
Collaboration graph
[legend]

Public Member Functions

 albaEventSender ()
 
virtual void SetListener (albaObserver *o)
 
virtual albaObserverGetListener ()
 
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)
 

Protected Attributes

albaObserverm_Listener
 

Detailed Description

class acting as an interface for objects using ALBA hierarchical event communication model This object simply defines a SetListener/GetListener functions for connecting with a listener object to create a hierarchy of objects.

This allows to send events up in the hierarchy implementing what was the original ALBA event communication model: this is a unicast communication model very well suited for hierarchically organized objects. For sending events up in the tree the albaEventMacro() or the InvokeEvent() function can be use.

See also
albaObserver albaObserverCallback

Definition at line 34 of file albaEventSender.h.

Constructor & Destructor Documentation

◆ albaEventSender()

albaEventSender::albaEventSender ( )
inline

Definition at line 37 of file albaEventSender.h.

Member Function Documentation

◆ SetListener()

virtual void albaEventSender::SetListener ( albaObserver o)
inlinevirtual

Set the listener object, i.e.

the object receiving events sent by this object

Reimplemented in albaEventBroadcaster.

Definition at line 40 of file albaEventSender.h.

◆ GetListener()

virtual albaObserver * albaEventSender::GetListener ( )
inlinevirtual

Return the listener object, i.e.

the object receiving events sent by this object

Definition at line 43 of file albaEventSender.h.

◆ HasListener()

virtual bool albaEventSender::HasListener ( )
inlinevirtual

return true if this class has observers

Definition at line 46 of file albaEventSender.h.

◆ InvokeEvent() [1/3]

virtual void albaEventSender::InvokeEvent ( albaEventBase e)
inlinevirtual

invoke an event of this subject

Reimplemented in albaEventBroadcaster.

Definition at line 49 of file albaEventSender.h.

◆ InvokeEvent() [2/3]

virtual void albaEventSender::InvokeEvent ( albaEventBase e)
inlinevirtual

invoke an event of this subject

Reimplemented in albaEventBroadcaster.

Definition at line 52 of file albaEventSender.h.

◆ InvokeEvent() [3/3]

virtual void albaEventSender::InvokeEvent ( void *  sender,
albaID  id = ID_NO_EVENT,
void *  data = NULL 
)
inlinevirtual

invoke an event of this subject

Reimplemented in albaEventBroadcaster.

Definition at line 55 of file albaEventSender.h.

Member Data Documentation

◆ m_Listener

albaObserver* albaEventSender::m_Listener
protected

object to which events issued by this object are sent

Definition at line 58 of file albaEventSender.h.


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