#define _SIGC_FUNCTORS_MACROS_MEM_FUNHM4_
#include <sigc++/type_traits.h>
#include <sigc++/functors/functor_trait.h>
+#include <sigc++/limit_reference.h>
namespace sigc {
function_type func_ptr_;
};
+
/** bound_mem_functor0 encapsulates a method with 0 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor0.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor0( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor0 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor0( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @return The return value of the method invocation.
*/
T_return operator()() const
- { return (obj_ptr_->*(this->func_ptr_))(); }
+ { return (obj_.invoke().*(this->func_ptr_))(); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor0<T_return, T_obj>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_mem_functor1 encapsulates a method with 1 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor1.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor1( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor1 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor1( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_mem_functor2 encapsulates a method with 2 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor2.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor2( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor2 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor2( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_mem_functor3 encapsulates a method with 3 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor3.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor3( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor3 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor3( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_mem_functor4 encapsulates a method with 4 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor4.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor4( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor4 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor4( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_mem_functor5 encapsulates a method with 5 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor5.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor5( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor5 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor5( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_mem_functor6 encapsulates a method with 6 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor6.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor6( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor6 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor6( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_mem_functor7 encapsulates a method with 7 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_mem_functor7.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor7( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_mem_functor7 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_mem_functor7( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_mem_functor performs a functor
* on the object instance stored in the sigc::bound_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor0 encapsulates a const method with 0 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor0.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor0(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor0 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor0(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @return The return value of the method invocation.
*/
T_return operator()() const
- { return (obj_ptr_->*(this->func_ptr_))(); }
+ { return (obj_.invoke().*(this->func_ptr_))(); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor0<T_return, T_obj>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor1 encapsulates a const method with 1 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor1.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor1(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor1 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor1(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor2 encapsulates a const method with 2 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor2.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor2(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor2 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor2(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor3 encapsulates a const method with 3 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor3.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor3(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor3 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor3(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor4 encapsulates a const method with 4 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor4.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor4(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor4 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor4(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor5 encapsulates a const method with 5 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor5.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor5(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor5 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor5(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor6 encapsulates a const method with 6 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor6.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor6(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor6 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor6(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_mem_functor7 encapsulates a const method with 7 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_mem_functor7.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor7(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_mem_functor7 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_mem_functor7(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor0 encapsulates a volatile method with 0 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor0.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor0( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor0 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor0( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @return The return value of the method invocation.
*/
T_return operator()() const
- { return (obj_ptr_->*(this->func_ptr_))(); }
+ { return (obj_.invoke().*(this->func_ptr_))(); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor0<T_return, T_obj>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor1 encapsulates a volatile method with 1 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor1.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor1( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor1 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor1( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor2 encapsulates a volatile method with 2 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor2.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor2( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor2 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor2( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor3 encapsulates a volatile method with 3 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor3.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor3( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor3 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor3( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor4 encapsulates a volatile method with 4 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor4.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor4( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor4 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor4( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor5 encapsulates a volatile method with 5 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor5.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor5( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor5 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor5( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor6 encapsulates a volatile method with 6 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor6.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor6( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor6 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor6( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_volatile_mem_functor7 encapsulates a volatile method with 7 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor7.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor7( T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_volatile_mem_functor7 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_volatile_mem_functor7( T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
//protected:
- /// Pointer to stored object instance.
- T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor0 encapsulates a const volatile method with 0 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor0.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor0(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor0 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor0(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @return The return value of the method invocation.
*/
T_return operator()() const
- { return (obj_ptr_->*(this->func_ptr_))(); }
+ { return (obj_.invoke().*(this->func_ptr_))(); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor0<T_return, T_obj>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor1 encapsulates a const volatile method with 1 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor1.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor1(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor1 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor1(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor2 encapsulates a const volatile method with 2 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor2.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor2(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor2 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor2(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor3 encapsulates a const volatile method with 3 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor3.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor3(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor3 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor3(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor4 encapsulates a const volatile method with 4 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor4.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor4(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor4 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor4(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor5 encapsulates a const volatile method with 5 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor5.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor5(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor5 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor5(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor6 encapsulates a const volatile method with 6 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor6.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor6(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor6 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor6(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}
+
/** bound_const_volatile_mem_functor7 encapsulates a const volatile method with 7 arguments and an object instance.
* Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor7.
*
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor7(const T_obj* _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(_A_obj) {}
+ : base_type_(_A_func),
+ obj_(*_A_obj)
+ {}
/** Constructs a bound_const_volatile_mem_functor7 object that wraps the passed method.
* @param _A_obj Reference to instance the method will operate on.
* @param _A_func Pointer to method will be invoked from operator()().
*/
bound_const_volatile_mem_functor7(const T_obj& _A_obj, function_type _A_func)
- : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+ : base_type_(_A_func),
+ obj_(_A_obj)
+ {}
/** Execute the wrapped method operating on the stored instance.
* @param _A_a1 Argument to be passed on to the method.
* @return The return value of the method invocation.
*/
T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
- { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+ { return (obj_.invoke().*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
//protected:
- /// Pointer to stored object instance.
- const T_obj *obj_ptr_;
+ // Reference to stored object instance.
+ // This is the handler object, such as TheObject in void TheObject::signal_handler().
+ const_volatile_limit_reference<T_obj> obj_;
};
+//template specialization of visit_each<>(action, functor):
/** Performs a functor on each of the targets of a functor.
* The function overload for sigc::bound_const_volatile_mem_functor performs a functor
* on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
void visit_each(const T_action& _A_action,
const bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
{
- visit_each(_A_action, *_A_target.obj_ptr_);
+ sigc::visit_each(_A_action, _A_target.obj_);
}