![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/PluginFramework/service/event/ctkEventHandler.h>
Public Member Functions | |
virtual void | handleEvent (const ctkEvent &event)=0 |
virtual | ~ctkEventHandler () |
Listener for Events.
ctkEventHandler
objects are registered with the Framework service registry and are notified with an ctkEvent
object when an event is sent or posted.
ctkEventHandler
objects can inspect the received ctkEvent
object to determine its topic and properties.
ctkEventHandler
objects must be registered with a service property ctkEventConstants#EVENT_TOPIC whose value is the list of topics in which the event handler is interested.
For example:
Event Handler services can also be registered with an ctkEventConstants#EVENT_FILTER service property to further filter the events. If the syntax of this filter is invalid, then the Event Handler must be ignored by the Event Admin service. The Event Admin service should log a warning.
Security Considerations. Plugins wishing to monitor ctkEvent
objects will require ctkServicePermission[ctkEventHandler,REGISTER]
to register a ctkEventHandler
service. The plugin must also have ctkTopicPermission[topic,SUBSCRIBE]
for the topic specified in the event in order to receive the event.
Definition at line 71 of file ctkEventHandler.h.
|
inlinevirtual |
Definition at line 73 of file ctkEventHandler.h.
|
pure virtual |
Called by the ctkEventAdmin service to notify the listener of an event.
event | The event that occurred. |