Task #1118
Updated by Junxiao Shi almost 11 years ago
Develop a lightweight event emitter, based of list of callbacks.
The event emitter is added as a field in the event source, and supports only one type of event.
Multiple events require multiple event emitters on the event source class.
Zero or more listeners can be registered on the event emitter.
To unregister a listener, the original `function<void(...)>` object must be passed.
The event could be triggered with zero or more arguments.
Type of arguments are determined by template arguments of the event emitter.
When the event is triggered, all listeners are invoked.
If there is zero event listener, nothing happens.