Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 2:14:46 AM (16 years ago)
Author:
landauf
Message:

forgot some changes in r5882. EventDispatcher now really supports all kinds of objects in the "targets" section.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/objects/eventsystem/EventDispatcher.cc

    r5882 r5886  
    3232#include "core/EventIncludes.h"
    3333#include "core/XMLPort.h"
    34 #include "EventTarget.h"
    3534
    3635namespace orxonox
     
    4645    {
    4746        if (this->isInitialized())
    48             for (std::list<EventTarget*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
     47            for (std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
    4948                (*it)->destroy();
    5049    }
     
    5958    void EventDispatcher::processEvent(Event& event)
    6059    {
    61         for (std::list<EventTarget*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
     60        for (std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
    6261            (*it)->processEvent(event);
    6362    }
    6463
    65     void EventDispatcher::addTarget(EventTarget* target)
     64    void EventDispatcher::addTarget(BaseObject* target)
    6665    {
    6766        this->targets_.push_back(target);
    6867    }
    6968
    70     EventTarget* EventDispatcher::getTarget(unsigned int index) const
     69    BaseObject* EventDispatcher::getTarget(unsigned int index) const
    7170    {
    7271        unsigned int i = 0;
    73         for (std::list<EventTarget*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
     72        for (std::list<BaseObject*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
    7473        {
    7574            if (i == index)
Note: See TracChangeset for help on using the changeset viewer.