Home | Trees | Indices | Help |
|
---|
|
Various decorators to ease event dispatching.
|
|||
|
|||
|
|
|||
__package__ =
|
|
Installs a `Dispatcher` on an `AttributeCollectionBase`. This class decorator does the following: - create a `Dispatcher` and store it in `self.__dispatcher` - delegate to all methods of the dispatcher's public delegation profile - add a `self.__dispatch` method that delegates to `self.__dispatcher.dispatch` - register the `event_names` on the dispatcher Note on ctor usage: though `self.__dispatcher` already exists, the delegation to it is not yet installed. You can use `self.__dispatcher`, but you can't yet e.g. call `self.add_handler`, write `self.__dispatcher.add_handler` instead. Parameters: event_names :: (::string...) collection of events to register on the dispatcher |
Installs a `DispatcherSwitch` on an `AttributeCollectionBase`. This class decorator does the following: - create a `DispatcherSwitch` and store it in self.__dispatcher_switch - delegate to all methods of the switch's public delegation profile - add a `self.__dispatch` method that delegates to `self.__dispatcher.dispatch` Note on ctor usage: though `self.__dispatcher_switch` already exists, the delegation to it is not yet installed. You can use `self.__dispatcher_switch`, but you can't yet e.g. call `self.add_handler`, write `self.__dispatcher_switch.add_handler` instead. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Mon Jul 19 11:49:29 2010 | http://epydoc.sourceforge.net |