Template Class BoundUnaryMemberFunction
Defined in File function_objects.hpp
Inheritance Relationships
Base Type
public ecl::NullaryFunction< void >
(Template Class NullaryFunction)
Class Documentation
-
template<typename C, typename A, typename R = void>
class BoundUnaryMemberFunction : public ecl::NullaryFunction<void> Nullary function object for bound unary member functions.
Binds the class instance and argument for a unary member function and uses this to construct a nullary function object.
Usage:
class A { public: void f(int i) { //... } int main() { A a; BoundUnaryMemberFunction<A,int,void> function_object(&A::f,a,1); function_object(); }
See also
generateFunctionObject
See also
FunctionObjects.
- Template Parameters:
C – : the member function’s class type.
A – : the member function’s argument type.
R – : the return type.
Public Functions
-
inline BoundUnaryMemberFunction(R (C::* function)(A), C &class_object, A a)
Binds a unary member function and creates a nullary function object.
Accepts the function, class instance and a value for its single argument, binds them and creates a nullary function object.
- Parameters:
function – : the unary global/static function.
class_object – : the member function’s class instance.
a – : the value of the argument to bind.
-
inline virtual ~BoundUnaryMemberFunction()