Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 4:51:08 AM (15 years ago)
Author:
landauf
Message:

Fixed an issue with the new event-system: even states which weren't declared are not loaded. While this is normally fine, it is a problem in EventDispatcher and EventTarget which have to pipe events to other objects and therefore have to support any state, not just the native ones.

File:
1 edited

Legend:

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

    r5882 r5887  
    172172            /** @brief Returns the indentation of the debug output in the Loader. @return The indentation */
    173173            inline const std::string& getLoaderIndentation() const { return this->loaderIndentation_; }
     174           
     175            static void loadAllEventStates(Element& xmlelement, XMLPort::Mode mode, BaseObject* object, Identifier* identifier);
    174176
    175177        protected:
     178            void addEventState(const std::string& name, EventState* container);
     179            EventState* getEventState(const std::string& name) const;
     180
     181            std::string name_;                                 //!< The name of the object
     182            std::string oldName_;                              //!< The old name of the object
     183            mbool       bActive_;                              //!< True = the object is active
     184            mbool       bVisible_;                             //!< True = the object is visible
     185            std::string mainStateName_;
     186            Functor*    mainStateFunctor_;
     187
     188        private:
    176189            /** @brief Adds an object which listens to the events of this object. */
    177190            inline void registerEventListener(BaseObject* object)
     
    181194                { this->eventListeners_.erase(object); }
    182195
    183             void addEventState(const std::string& name, EventState* container);
    184             EventState* getEventState(const std::string& name) const;
    185 
    186             std::string name_;                                 //!< The name of the object
    187             std::string oldName_;                              //!< The old name of the object
    188             mbool       bActive_;                              //!< True = the object is active
    189             mbool       bVisible_;                             //!< True = the object is visible
    190             std::string mainStateName_;
    191             Functor*    mainStateFunctor_;
    192 
    193         private:
    194196            void setXMLName(const std::string& name);
    195197            Template* getTemplate(unsigned int index) const;
Note: See TracChangeset for help on using the changeset viewer.