Changeset 5866 for code/branches/core5/src/modules/objects/eventsystem
- Timestamp:
- Oct 3, 2009, 6:32:05 PM (15 years ago)
- 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 78 78 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it) 79 79 if (it->getName() == this->eventName_) 80 this-> registerAsListener(*it);80 this->addEventSource(*it, ""); 81 81 } 82 82 … … 87 87 88 88 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, ""); 95 90 } 96 91 } -
code/branches/core5/src/modules/objects/eventsystem/EventListener.h
r5738 r5866 54 54 private: 55 55 virtual void loadedNewXMLName(BaseObject* object); 56 void registerAsListener(BaseObject* object);57 56 58 57 std::string eventName_; -
code/branches/core5/src/modules/objects/eventsystem/EventTarget.cc
r5738 r5866 49 49 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it) 50 50 if (it->getName() == this->getName()) 51 this->add AsEvent(*it);51 this->addEventTarget(*it); 52 52 } 53 53 … … 58 58 59 59 if (object->getName() == this->getName()) 60 this->add AsEvent(object);60 this->addEventTarget(object); 61 61 } 62 62 63 void EventTarget::add AsEvent(BaseObject* object)63 void EventTarget::addEventTarget(BaseObject* object) 64 64 { 65 65 if (object != static_cast<BaseObject*>(this)) 66 object->addEvent (this, "");66 object->addEventSource(this, ""); 67 67 } 68 68 } -
code/branches/core5/src/modules/objects/eventsystem/EventTarget.h
r5738 r5866 47 47 private: 48 48 virtual void loadedNewXMLName(BaseObject* object); 49 void add AsEvent(BaseObject* object);49 void addEventTarget(BaseObject* object); 50 50 }; 51 51 }
Note: See TracChangeset
for help on using the changeset viewer.