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

Unary function object for global/static functions. More...

#include <function_objects.hpp>

Inheritance diagram for ecl::UnaryFreeFunction< A, R >:
Inheritance graph
[legend]

Public Member Functions

operator() (A a)
 This ensures any children objects are deleted correctly. More...
 
 UnaryFreeFunction (R(*function)(A))
 Unary function object constructor for global/static functions. More...
 
virtual ~UnaryFreeFunction ()
 
- Public Member Functions inherited from ecl::UnaryFunction< A, void >
virtual ~UnaryFunction ()
 

Private Attributes

R(* free_function )(A)
 

Additional Inherited Members

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

Detailed Description

template<typename A, typename R = void>
class ecl::UnaryFreeFunction< A, R >

Unary function object for global/static functions.

Creates a function object from a global/static function with a single argument.

See also
generateFunctionObject
Template Parameters
A: the argument type.
R: the return type.
See also
FunctionObjects.

Definition at line 206 of file function_objects.hpp.

Constructor & Destructor Documentation

◆ UnaryFreeFunction()

template<typename A , typename R = void>
ecl::UnaryFreeFunction< A, R >::UnaryFreeFunction ( R(*)(A)  function)
inline

Unary function object constructor for global/static functions.

Accepts a global/static function with a single argument and builds the function object around it.

Parameters
function: a global/static function with a single argument.

Definition at line 217 of file function_objects.hpp.

◆ ~UnaryFreeFunction()

template<typename A , typename R = void>
virtual ecl::UnaryFreeFunction< A, R >::~UnaryFreeFunction ( )
inlinevirtual

Definition at line 219 of file function_objects.hpp.

Member Function Documentation

◆ operator()()

template<typename A , typename R = void>
R ecl::UnaryFreeFunction< A, R >::operator() ( a)
inlinevirtual

This ensures any children objects are deleted correctly.

A unary function object call.

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

Returns
R : the function's return value.

Implements ecl::UnaryFunction< A, void >.

Definition at line 228 of file function_objects.hpp.

Member Data Documentation

◆ free_function

template<typename A , typename R = void>
R(* ecl::UnaryFreeFunction< A, R >::free_function) (A)
private

Definition at line 231 of file function_objects.hpp.


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


ecl_utilities
Author(s): Daniel Stonier
autogenerated on Sun Aug 2 2020 03:12:13