#include <Plugins/org.commontk.eventbus/ctkEventDispatcher.h>
Class name: ctkEventDispatcher This allows dispatching events coming from local application to attached observers.
Definition at line 23 of file ctkEventDispatcher.h.
◆ ctkEventDispatcher()
ctkEventBus::ctkEventDispatcher::ctkEventDispatcher |
( |
| ) |
|
◆ ~ctkEventDispatcher()
virtual ctkEventBus::ctkEventDispatcher::~ctkEventDispatcher |
( |
| ) |
|
|
virtual |
◆ addObserver()
bool ctkEventBus::ctkEventDispatcher::addObserver |
( |
ctkBusEvent & |
props | ) |
|
Add the observer to the events.
Return true if observer has beed added correctly, false otherwise. This method check before adding a new observer that it has not already been inserted into the events' Hash with the same id and callback signature.
◆ initializeGlobalEvents()
virtual void ctkEventBus::ctkEventDispatcher::initializeGlobalEvents |
( |
| ) |
|
|
protectedvirtual |
◆ isLocalSignalPresent()
bool ctkEventBus::ctkEventDispatcher::isLocalSignalPresent |
( |
const QString |
topic | ) |
const |
method used to check if the given signal has been already registered for the given id.
◆ notifyDefaultEvent
void ctkEventBus::ctkEventDispatcher::notifyDefaultEvent |
( |
| ) |
|
|
signal |
Default notification signals for default events.
◆ notifyEvent()
virtual void ctkEventBus::ctkEventDispatcher::notifyEvent |
( |
ctkBusEvent & |
event_dictionary, |
|
|
ctkEventArgumentsList * |
argList = NULL , |
|
|
QGenericReturnArgument * |
returnArg = NULL |
|
) |
| const |
|
virtual |
◆ registerSignal()
bool ctkEventBus::ctkEventDispatcher::registerSignal |
( |
ctkBusEvent & |
props | ) |
|
register custom signals use by objects to raise them events.
Return true if signal has beed added correctly, false otherwise. This method check before adding a new signal that it has not already been inserted into the events' Hash with the same id and signal signature. WARNING: due to Qt limitation you cannot use the same signal in different Topics.
◆ remoteCommunicationDone
void ctkEventBus::ctkEventDispatcher::remoteCommunicationDone |
( |
| ) |
|
|
signal |
Signal used to notify to observers that the remote communication has been terminated with success.
◆ remoteCommunicationFailed
void ctkEventBus::ctkEventDispatcher::remoteCommunicationFailed |
( |
| ) |
|
|
signal |
Signal used to notify to observers that the remote communication failed.
◆ removeEventItem()
bool ctkEventBus::ctkEventDispatcher::removeEventItem |
( |
ctkBusEvent & |
props | ) |
|
|
protected |
Interanl method used to remove the given event property.
◆ removeObserver() [1/2]
bool ctkEventBus::ctkEventDispatcher::removeObserver |
( |
const QObject * |
obj, |
|
|
const QString |
topic, |
|
|
bool |
qt_disconnect = true |
|
) |
| |
remove the callback from the observer's hash.
◆ removeObserver() [2/2]
bool ctkEventBus::ctkEventDispatcher::removeObserver |
( |
ctkBusEvent & |
props | ) |
|
remove the callback from the observer's hash.
◆ removeSignal() [1/2]
bool ctkEventBus::ctkEventDispatcher::removeSignal |
( |
const QObject * |
obj, |
|
|
const QString |
topic = "" , |
|
|
bool |
qt_disconnect = true |
|
) |
| |
Remove the signal from the signal's hash.
◆ removeSignal() [2/2]
bool ctkEventBus::ctkEventDispatcher::removeSignal |
( |
ctkBusEvent & |
props | ) |
|
Remove the signal from the signal's hash.
◆ resetHashes()
void ctkEventBus::ctkEventDispatcher::resetHashes |
( |
| ) |
|
clean the signal and callback hashes.
This method is used when the destructor is called. The destructor of the dispatcher is called by the ctkEventBusManager destructor.
◆ signalItemProperty()
ctkEventItemListType ctkEventBus::ctkEventDispatcher::signalItemProperty |
( |
const QString |
topic | ) |
const |
|
inlineprotected |
The documentation for this class was generated from the following file: