Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 21, 2010, 9:52:13 PM (14 years ago)
Author:
landauf
Message:

createFunctor() now returns a SharedPtr instead of a pointer. Adapted code that uses createFunctor() accordingly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/Event.h

    r6800 r7198  
    6767    {
    6868        public:
    69             EventState(Functor* statefunction, Identifier* subclass, bool bSink = false) : bProcessingEvent_(false), activeEvents_(0), statefunction_(statefunction), subclass_(subclass), bSink_(bSink) {}
    70             virtual ~EventState();
     69            EventState(const FunctorPtr& statefunction, Identifier* subclass, bool bSink = false) : bProcessingEvent_(false), activeEvents_(0), statefunction_(statefunction), subclass_(subclass), bSink_(bSink) {}
    7170
    7271            void process(const Event& event, BaseObject* object);
    7372
    74             Functor* getFunctor() const
     73            const FunctorPtr& getFunctor() const
    7574                { return this->statefunction_; }
    7675
     
    7877            bool        bProcessingEvent_;  //!< This becomes true while the container processes an event (used to prevent loops)
    7978            int         activeEvents_;      //!< The number of events which affect this state and are currently active
    80             Functor  statefunction_;     //!< A functor to set the state
     79            FunctorPtr  statefunction_;     //!< A functor to set the state
    8180            Identifier* subclass_;          //!< Originators must be an instance of this class (usually BaseObject, but some statefunctions allow a second argument with an originator of a specific class)
    8281            bool        bSink_;             //!< Determines whether the EventState acts as an EventSink forwarding any Event (even if the state didn't change) or in the normal manner, only processing Events that change the state.
Note: See TracChangeset for help on using the changeset viewer.