Public Member Functions | Private Attributes | List of all members
ecl::NullaryFreeFunction< R > Class Template Reference

Nullary function object for void global/static functions. More...

#include <function_objects.hpp>

Inheritance diagram for ecl::NullaryFreeFunction< R >:
Inheritance graph
[legend]

Public Member Functions

 NullaryFreeFunction (R(*function)())
 Nullary function object constructor for global/static functions with no args. More...
 
operator() ()
 This ensures any children objects are deleted correctly. More...
 
virtual ~NullaryFreeFunction ()
 
- Public Member Functions inherited from ecl::NullaryFunction< R >
virtual ~NullaryFunction ()
 

Private Attributes

R(* free_function )()
 

Additional Inherited Members

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

Detailed Description

template<typename R = void>
class ecl::NullaryFreeFunction< R >

Nullary function object for void global/static functions.

Creates a function object from a void global/static function.

Template Parameters
R: the return type.
See also
ecl::utilities::NullaryFreeFunction<void>, generateFunctionObject, FunctionObjects.

Definition at line 126 of file function_objects.hpp.

Constructor & Destructor Documentation

template<typename R = void>
ecl::NullaryFreeFunction< R >::NullaryFreeFunction ( R(*)()  function)
inline

Nullary function object constructor for global/static functions with no args.

Accepts a global/static function with no args and builds the function object around it.

Parameters
function: the global/static function.

Definition at line 136 of file function_objects.hpp.

template<typename R = void>
virtual ecl::NullaryFreeFunction< R >::~NullaryFreeFunction ( )
inlinevirtual

Definition at line 137 of file function_objects.hpp.

Member Function Documentation

template<typename R = void>
R ecl::NullaryFreeFunction< R >::operator() ( )
inlinevirtual

This ensures any children objects are deleted correctly.

A nullary function object call.

Redirects the nullary function object call to the composited global/static function.

Returns
R : the function's return value.

Implements ecl::NullaryFunction< R >.

Definition at line 146 of file function_objects.hpp.

Member Data Documentation

template<typename R = void>
R(* ecl::NullaryFreeFunction< R >::free_function) ()
private

Definition at line 149 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 Jun 10 2019 13:08:28