Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 3, 2009, 6:32:05 PM (15 years ago)
Author:
landauf
Message:

some cleanup in the eventsystem. not sure if everything still works, but there are more changes to come.

Location:
code/branches/core5/src/modules/objects/eventsystem
Files:
4 edited

Legend:

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

    r5738 r5866  
    7878        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
    7979            if (it->getName() == this->eventName_)
    80                 this->registerAsListener(*it);
     80                this->addEventSource(*it, "");
    8181    }
    8282
     
    8787
    8888        if (object->getName() == this->eventName_)
    89             this->registerAsListener(object);
    90     }
    91 
    92     void EventListener::registerAsListener(BaseObject* object)
    93     {
    94         object->registerEventListener(this, "");
     89            this->addEventSource(object, "");
    9590    }
    9691}
  • code/branches/core5/src/modules/objects/eventsystem/EventListener.h

    r5738 r5866  
    5454        private:
    5555            virtual void loadedNewXMLName(BaseObject* object);
    56             void registerAsListener(BaseObject* object);
    5756
    5857            std::string eventName_;
  • code/branches/core5/src/modules/objects/eventsystem/EventTarget.cc

    r5738 r5866  
    4949        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
    5050            if (it->getName() == this->getName())
    51                 this->addAsEvent(*it);
     51                this->addEventTarget(*it);
    5252    }
    5353
     
    5858
    5959        if (object->getName() == this->getName())
    60             this->addAsEvent(object);
     60            this->addEventTarget(object);
    6161    }
    6262
    63     void EventTarget::addAsEvent(BaseObject* object)
     63    void EventTarget::addEventTarget(BaseObject* object)
    6464    {
    6565        if (object != static_cast<BaseObject*>(this))
    66             object->addEvent(this, "");
     66            object->addEventSource(this, "");
    6767    }
    6868}
  • code/branches/core5/src/modules/objects/eventsystem/EventTarget.h

    r5738 r5866  
    4747        private:
    4848            virtual void loadedNewXMLName(BaseObject* object);
    49             void addAsEvent(BaseObject* object);
     49            void addEventTarget(BaseObject* object);
    5050    };
    5151}
Note: See TracChangeset for help on using the changeset viewer.