Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 5, 2009, 5:02:25 PM (15 years ago)
Author:
landauf
Message:

More changes in the event-system: processEvent() is now locally executed in BaseObject. The event states (like activity, visibility, …) are now defined in XMLEventPort, a function which closely resembles XMLPort. This function is used to define event states and to parse event sources from XML.

Connected the main-state directly with the event-system. After a state was declared as the "main state", the Functor from the corresponding EventState-object is used to call the function. This reduces the redundancy of declaring event-states and main-states separately. Of course only boolean event-states (like activity or visibility) can be used as main-state, while memoryless states (like spawn in ParticleSpawner) and individual states which need the triggering object (like execute in QuestEffectBeacon) won't work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/Identifier.h

    r5866 r5879  
    268268
    269269
    270             //////////////////
    271             ///// Events /////
    272             //////////////////
    273             /** @brief Returns the map that stores all XMLPort events. @return The const_iterator */
    274             inline const std::map<std::string, XMLPortObjectContainer*>& getXMLPortEventMap() const { return this->xmlportEventContainers_; }
    275             /** @brief Returns a const_iterator to the beginning of the map that stores all XMLPort events. @return The const_iterator */
    276             inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortEventMapBegin() const { return this->xmlportEventContainers_.begin(); }
    277             /** @brief Returns a const_iterator to the end of the map that stores all XMLPort events. @return The const_iterator */
    278             inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortEventMapEnd() const { return this->xmlportEventContainers_.end(); }
    279 
    280             void addXMLPortEventContainer(const std::string& eventname, XMLPortObjectContainer* container);
    281             XMLPortObjectContainer* getXMLPortEventContainer(const std::string& eventname);
    282 
    283 
    284270        protected:
    285271            Identifier();
     
    342328            std::map<std::string, XMLPortParamContainer*> xmlportParamContainers_;     //!< All loadable parameters
    343329            std::map<std::string, XMLPortObjectContainer*> xmlportObjectContainers_;   //!< All attachable objects
    344             std::map<std::string, XMLPortObjectContainer*> xmlportEventContainers_;    //!< All events
    345330    };
    346331
Note: See TracChangeset for help on using the changeset viewer.