Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 24, 2010, 4:56:37 PM (14 years ago)
Author:
landauf
Message:

re-implemented Functor - without macros!

File:
1 edited

Legend:

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

    r7203 r7212  
    163163            MultiType parse(T* object, const std::string& params, bool* success = 0, const std::string& delimiter = " ") const
    164164            {
    165                 const typename FunctorMember<T>::Objects& objects = this->functorMember_->getObjects();
     165                T* oldobject = this->functorMember_->getObject();
    166166
    167167                this->functorMember_->setObject(object);
    168168                const MultiType& result = this->Executor::parse(params, success, delimiter);
    169                 this->functorMember_->setObjects(objects);
     169                this->functorMember_->setObject(oldobject);
    170170
    171171                return result;
     
    174174            MultiType parse(const T* object, const std::string& params, bool* success = 0, const std::string& delimiter = " ") const
    175175            {
    176                 const typename FunctorMember<T>::Objects& objects = this->functorMember_->getObjects();
     176                T* oldobject = this->functorMember_->getObject();
    177177
    178178                this->functorMember_->setObject(object);
    179179                const MultiType& result = this->Executor::parse(params, success, delimiter);
    180                 this->functorMember_->setObjects(objects);
     180                this->functorMember_->setObjects(oldobject);
    181181
    182182                return result;
Note: See TracChangeset for help on using the changeset viewer.