Index: code/trunk/src/libraries/core/Executor.h
===================================================================
--- code/trunk/src/libraries/core/Executor.h	(revision 7176)
+++ code/trunk/src/libraries/core/Executor.h	(revision 7177)
@@ -183,24 +183,26 @@
             bool parse(T* object, const std::string& params, const std::string& delimiter = " ") const
             {
-                static_cast<FunctorMember<T>*>(this->functor_)->setObject(object);
-                if (Executor::parse(params, delimiter))
-                    return true;
-                else
-                {
-                    static_cast<FunctorMember<T>*>(this->functor_)->setObject((T*)NULL);
-                    return false;
-                }
+                FunctorMember<T>* functorMember = static_cast<FunctorMember<T>*>(this->functor_);
+
+                const typename FunctorMember<T>::Objects& objects = functorMember->getObjects();
+
+                functorMember->setObject(object);
+                bool result = Executor::parse(params, delimiter);
+                functorMember->setObjects(objects);
+
+                return result;
             }
 
             bool parse(const T* object, const std::string& params, const std::string& delimiter = " ") const
             {
-                static_cast<FunctorMember<T>*>(this->functor_)->setObject(object);
-                if (Executor::parse(params, delimiter))
-                    return true;
-                else
-                {
-                    static_cast<FunctorMember<T>*>(this->functor_)->setObject((T*)NULL);
-                    return false;
-                }
+                FunctorMember<T>* functorMember = static_cast<FunctorMember<T>*>(this->functor_);
+
+                const typename FunctorMember<T>::Objects& objects = functorMember->getObjects();
+
+                functorMember->setObject(object);
+                bool result = Executor::parse(params, delimiter);
+                functorMember->setObjects(objects);
+
+                return result;
             }
     };
Index: code/trunk/src/libraries/core/Functor.h
===================================================================
--- code/trunk/src/libraries/core/Functor.h	(revision 7176)
+++ code/trunk/src/libraries/core/Functor.h	(revision 7177)
@@ -135,7 +135,6 @@
             FunctorMember()
             {
-                constObject_ = 0;
-                object_ = 0;
-                bConstObject_ = false;
+                this->object_ = 0;
+                this->constObject_ = 0;
             }
             virtual ~FunctorMember() {}
@@ -146,44 +145,45 @@
             virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null)
             {
-                if (this->bConstObject_)
-                {
-                    if (this->constObject_)
-                        (*this)(this->constObject_, param1, param2, param3, param4, param5);
-                    else
-                    {
-                        COUT(1) << "An error occurred in Functor.h:" << std::endl;
-                        COUT(1) << "Error: No const object set." << std::endl;
-                    }
-                }
+                if (this->object_)
+                    (*this)(this->object_, param1, param2, param3, param4, param5);
+                else if (this->constObject_)
+                    (*this)(this->constObject_, param1, param2, param3, param4, param5);
                 else
                 {
-                    if (this->object_)
-                        (*this)(this->object_, param1, param2, param3, param4, param5);
-                    else
-                    {
-                        COUT(1) << "An error occurred in Functor.h:" << std::endl;
-                        COUT(1) << "Error: No object set." << std::endl;
-                    }
+                    COUT(1) << "An error occurred in Functor.h:" << std::endl;
+                    COUT(1) << "Error: No object set." << std::endl;
                 }
             }
 
-            FunctorMember<T>* setObject(T* object)
+            inline FunctorMember<T>* setObject(T* object)
             {
-                this->bConstObject_ = false;
                 this->object_ = object;
+                this->constObject_ = 0;
                 return this;
             }
 
-            FunctorMember<T>* setObject(const T* object)
+            inline FunctorMember<T>* setObject(const T* object)
             {
-                this->bConstObject_ = true;
+                this->object_ = 0;
                 this->constObject_ = object;
                 return this;
             }
 
+            typedef std::pair<T*, const T*> Objects;
+
+            inline Objects getObjects() const
+            {
+                return Objects(this->object_, this->constObject_);
+            }
+
+            inline void setObjects(const Objects& objects)
+            {
+                this->object_ = objects.first;
+                this->constObject_ = objects.second;
+            }
+
         private:
+            T* object_;
             const T* constObject_;
-            T* object_;
-            bool bConstObject_;
     };
 
