Next: Classes
Up: listener
Previous: Recommandations
Contents
- Listeners support the notion of priority. When two listeners are
connected to a same event type, they are called according to their
priority. The priority can be changed at any time if necessary. When
Listeners have the same priority, the are called in the order
of registration. This priority is set to 0 by default, and can be
specified by the igs_connect method (last parameter).
- Listener and Subscriber
supports EventFilter and can have more than one
- Subscribers can:
- Inherit from Listener, and override the virtual functions
- Use listeners with the add_listener() method
with a igs::Function connected to.
- Source of the event (Publisher) available when:
- Receiving an event. The Event class has the
appropriate method.
- A member function of a Subscriber is called due to an
event. The Publisher is, in that case, available only
within the function scope.
- Pluggable EventFilters for:
- Listener
- Subscriber
- Block/unblock events from sending/receiving for:
- Listener (sending)
- Publisher (sending)
- Subscriber (receiving)
- Auto unregistration of:
- Subscribers and their associated Listeners when deleted
- Listeners when a Publisher is deleted
- Auto deletion of:
- Events after posting
- EventFilters when they are not used anymore
- Listeners when a Subscriber is deleted
- Auto listening of methods of type myevent(EVENT*)
Next: Classes
Up: listener
Previous: Recommandations
Contents
Frantz Maerten
2006-01-30