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