Example #1
0
 void EventManager::DoEvent(typeEventID theEventID,void* theContext)
 {
   std::map<const typeEventID, IEvent*>::const_iterator anIter =
     mList.find(theEventID);
   if (anIter != mList.end())
   {
     // Get the event to execute
     IEvent* anEvent = anIter->second;
     // Now call DoEvent for this event with theContext provided
     anEvent->DoEvent(theContext);
   }
 }
Example #2
0
  void EventManager::DoEvents(void* theContext)
  {
    std::map<const typeEventID, IEvent*>::const_iterator anIter =
      mList.begin();
    while(anIter != mList.end())
    {
      // Get the event to execute
      IEvent* anEvent = anIter->second;

      // Iterate to the next event
      anIter++;

      // Now call DoEvent for this event with theContext provided
      anEvent->DoEvent(theContext);
    }
  }