Template Class PartiallyBoundUnaryMemberFunction
Defined in File function_objects.hpp
Inheritance Relationships
Base Type
public ecl::UnaryFunction< A, void >
(Template Class UnaryFunction)
Class Documentation
-
template<typename C, typename A, typename R = void>
class PartiallyBoundUnaryMemberFunction : public ecl::UnaryFunction<A, void> Unary function object for partially bound unary member functions.
Binds the class instance but not the argument for a unary member function and uses this to construct a unary function object.
Usage:
class A { public: void f(int i) { //... } int main() { A a; PartiallyBoundUnaryMemberFunction<A,int,void> function_object(&A::f,a); function_object(1); }
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 PartiallyBoundUnaryMemberFunction(R (C::* function)(A), C &class_object)
Binds a unary member function and creates a nullary function object.
Accepts the function, class instance only (not the argument), binds them and creates a unary function object.
- Parameters:
function – : the unary global/static function.
class_object – : the member function’s class instance.
-
inline virtual ~PartiallyBoundUnaryMemberFunction()