Logo Search packages:      
Sourcecode: scummvm version File versions

void Common::EventDispatcher::registerObserver ( EventObserver obs,
uint  priority,
bool  autoFree 

Registers a new EventObserver with the Dispatcher.

Definition at line 100 of file EventDispatcher.cpp.

References Common::List< t_T >::insert(), and Common::List< t_T >::push_back().

      ObserverEntry newEntry;

      newEntry.observer = obs;
      newEntry.priority = priority;
      newEntry.autoFree = autoFree;

      for (Common::List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) {
            if (i->priority < priority) {
                  _observers.insert(i, newEntry);


Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index