Public Member Functions | Private Attributes | List of all members
ecl::NullaryMemberFunction< C, void > Class Template Reference

Specialisation of the unary function object for void member functions without arguments. More...

#include <function_objects.hpp>

Inheritance diagram for ecl::NullaryMemberFunction< C, void >:
Inheritance graph
[legend]

Public Member Functions

 NullaryMemberFunction (void(C::*function)())
 Unary function object constructor for void member functions. More...
 
void operator() (C &class_object)
 This ensures any children objects are deleted correctly. More...
 
virtual ~NullaryMemberFunction ()
 
- Public Member Functions inherited from ecl::UnaryFunction< C &, void >
virtual ~UnaryFunction ()
 

Private Attributes

void(C::* member_function )()
 

Additional Inherited Members

- Public Types inherited from ecl::UnaryFunction< C &, void >
typedef C & argument_type
 The first argument type. More...
 
typedef void result_type
 The result type. More...
 

Detailed Description

template<typename C>
class ecl::NullaryMemberFunction< C, void >

Specialisation of the unary function object for void member functions without arguments.

Specialisation for a function object from a void member function without arguments (note, the single argument to this unary function object is the class instance itself).

Template Parameters
C: the member function's class type type.
See also
ecl::utilities::NullaryMemberFunction, generateFunctionObject, FunctionObjects.

Definition at line 438 of file function_objects.hpp.

Constructor & Destructor Documentation

◆ NullaryMemberFunction()

template<typename C >
ecl::NullaryMemberFunction< C, void >::NullaryMemberFunction ( void(C::*)()  function)
inline

Unary function object constructor for void member functions.

Accepts a void member function without arguments, and builds the function object around it.

Parameters
function: a void member function.

Definition at line 448 of file function_objects.hpp.

◆ ~NullaryMemberFunction()

template<typename C >
virtual ecl::NullaryMemberFunction< C, void >::~NullaryMemberFunction ( )
inlinevirtual

Definition at line 449 of file function_objects.hpp.

Member Function Documentation

◆ operator()()

template<typename C >
void ecl::NullaryMemberFunction< C, void >::operator() ( C &  class_object)
inlinevirtual

This ensures any children objects are deleted correctly.

A unary function object call.

Uses the specified class instance to redirect the function call to the void member function.

Parameters
class_object: the member function's class instance.

Implements ecl::UnaryFunction< C &, void >.

Definition at line 459 of file function_objects.hpp.

Member Data Documentation

◆ member_function

template<typename C >
void(C::* ecl::NullaryMemberFunction< C, void >::member_function) ()
private

Definition at line 463 of file function_objects.hpp.


The documentation for this class was generated from the following file:


ecl_utilities
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:32