Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2008, 6:39:31 PM (17 years ago)
Author:
landauf
Message:

added events but not yet connected with triggers

File:
1 edited

Legend:

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

    r2019 r2063  
    4242#include "OrxonoxClass.h"
    4343#include "XMLIncludes.h"
     44#include "Event.h"
    4445
    4546namespace orxonox
     
    110111            virtual inline void changedGametype() {}
    111112
     113            void fireEvent();
     114            void fireEvent(bool activate);
     115
     116            virtual void processEvent(Event& event);
     117
     118            void addEvent(BaseObject* event, const std::string& sectionname);
     119            BaseObject* getEvent(unsigned int index) const;
     120
     121            void addEventContainer(const std::string& sectionname, EventContainer* container);
     122            EventContainer* getEventContainer(const std::string& sectionname) const;
     123
    112124            /** @brief Sets the indentation of the debug output in the Loader. @param indentation The indentation */
    113125            inline void setLoaderIndentation(const std::string& indentation) { this->loaderIndentation_ = indentation; }
     
    124136            Template* getTemplate(unsigned int index) const;
    125137
    126             bool                bInitialized_;         //!< True if the object was initialized (passed the object registration)
    127             const XMLFile*      file_;                 //!< The XMLFile that loaded this object
    128             std::string         loaderIndentation_;    //!< Indentation of the debug output in the Loader
    129             Namespace*          namespace_;
    130             BaseObject*         creator_;
    131             Scene*              scene_;
    132             Gametype*           gametype_;
    133             Gametype*           oldGametype_;
    134             std::set<Template*> templates_;
     138            bool                  bInitialized_;         //!< True if the object was initialized (passed the object registration)
     139            const XMLFile*        file_;                 //!< The XMLFile that loaded this object
     140            std::string           loaderIndentation_;    //!< Indentation of the debug output in the Loader
     141            Namespace*            namespace_;
     142            BaseObject*           creator_;
     143            Scene*                scene_;
     144            Gametype*             gametype_;
     145            Gametype*             oldGametype_;
     146            std::set<Template*>   templates_;
     147            std::set<std::pair<std::string, BaseObject*> > eventListeners_;
     148            std::map<std::string, EventContainer*> eventContainers_;
    135149    };
    136150
     
    138152    SUPER_FUNCTION(2, BaseObject, changedActivity, false);
    139153    SUPER_FUNCTION(3, BaseObject, changedVisibility, false);
     154    SUPER_FUNCTION(4, BaseObject, processEvent, false);
    140155}
    141156
Note: See TracChangeset for help on using the changeset viewer.