7 #ifndef EVENTGENERATOR_H_
8 #define EVENTGENERATOR_H_
22 void addListener(EventListener *listener) {
23 listeners.push_back(listener);
26 void removeListener(EventListener *listener) {
27 listeners.remove(listener);
30 bool hasListeners()
const {
31 return listeners.size();
38 void notify(
const EventType &event) {
39 for (
typename std::list<EventListener *>::const_iterator it =
40 listeners.begin(); it != listeners.end(); ++it) {
std::list< EventListener * > listeners
the list of listeners
Definition: eventgenerator.h:20
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
void notify(const EventType &event)
Notifies all listeners of a specific event.
Definition: eventgenerator.h:38
A generic event generator, for listeners of type EventListener and events of type EventType...
Definition: eventgenerator.h:18