Public Member Functions | Private Attributes | List of all members
ecl::NullaryFunctionCopy< FunctionObject, Result > Class Template Reference

Create a NullaryFunction object composited from an existing function object. More...

#include <function_objects.hpp>

Inheritance diagram for ecl::NullaryFunctionCopy< FunctionObject, Result >:
Inheritance graph
[legend]

Public Member Functions

 NullaryFunctionCopy (const FunctionObject &f_o)
 NullaryFunction child constructor for nullary function objects. More...
 
Result operator() ()
 This ensures any children objects are deleted correctly. More...
 
virtual ~NullaryFunctionCopy ()
 
- Public Member Functions inherited from ecl::NullaryFunction< Result >
virtual ~NullaryFunction ()
 

Private Attributes

FunctionObject function_object
 

Additional Inherited Members

- Public Types inherited from ecl::NullaryFunction< Result >
typedef Result result_type
 The result type. More...
 

Detailed Description

template<typename FunctionObject, typename Result = void>
class ecl::NullaryFunctionCopy< FunctionObject, Result >

Create a NullaryFunction object composited from an existing function object.

Takes a nullary function object (strictly by definition) and creates a NullaryFunction child object. This is useful in utilising the inheritance from NullaryFunction (needed for slots and similar classes).

Template Parameters
FunctionObject: type of the function object to be wrapped.
R: the return type.
See also
FunctionObjects.

Definition at line 855 of file function_objects.hpp.

Constructor & Destructor Documentation

◆ NullaryFunctionCopy()

template<typename FunctionObject, typename Result = void>
ecl::NullaryFunctionCopy< FunctionObject, Result >::NullaryFunctionCopy ( const FunctionObject &  f_o)
inline

NullaryFunction child constructor for nullary function objects.

Creates a child of the NullaryFunction class by copying a nullary function object (one that is purely by definition).

Parameters
f_o: the function object to be assigned to the NullaryFunction child.

Definition at line 866 of file function_objects.hpp.

◆ ~NullaryFunctionCopy()

template<typename FunctionObject, typename Result = void>
virtual ecl::NullaryFunctionCopy< FunctionObject, Result >::~NullaryFunctionCopy ( )
inlinevirtual

Definition at line 869 of file function_objects.hpp.

Member Function Documentation

◆ operator()()

template<typename FunctionObject, typename Result = void>
Result ecl::NullaryFunctionCopy< FunctionObject, Result >::operator() ( )
inlinevirtual

This ensures any children objects are deleted correctly.

The nullary function object call.

Redirects the call to the composited nullary function object call.

Returns
R : the function's return value.

Implements ecl::NullaryFunction< Result >.

Definition at line 878 of file function_objects.hpp.

Member Data Documentation

◆ function_object

template<typename FunctionObject, typename Result = void>
FunctionObject ecl::NullaryFunctionCopy< FunctionObject, Result >::function_object
private

Definition at line 881 of file function_objects.hpp.


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


ecl_utilities
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:18:41