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

Specialisation for bound void unary functions. More...

#include <function_objects.hpp>

Inheritance diagram for ecl::BoundUnaryFreeFunction< A, void >:
Inheritance graph
[legend]

Public Member Functions

 BoundUnaryFreeFunction (void(*function)(A), A a)
 Binds a unary function and creates a nullary function object. More...
 
void operator() ()
 This ensures any children objects are deleted correctly. More...
 
virtual ~BoundUnaryFreeFunction ()
 
- Public Member Functions inherited from ecl::NullaryFunction< void >
virtual ~NullaryFunction ()
 

Private Attributes

argument
 
void(* free_function )(A)
 

Additional Inherited Members

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

Detailed Description

template<typename A>
class ecl::BoundUnaryFreeFunction< A, void >

Specialisation for bound void unary functions.

Specialises BoundUnaryFreeFunction for functions with no return type.

Template Parameters
A: the type of the argument to be bound.
See also
ecl::utilities::BoundUnaryFreeFunction, generateFunctionObject, FunctionObjects.

Definition at line 329 of file function_objects.hpp.

Constructor & Destructor Documentation

◆ BoundUnaryFreeFunction()

template<typename A >
ecl::BoundUnaryFreeFunction< A, void >::BoundUnaryFreeFunction ( void(*)(A)  function,
a 
)
inline

Binds a unary function and creates a nullary function object.

Accepts both the function and a value for its single argument, binds them and creates a nullary function object.

Parameters
function: the unary global/static function.
a: the argument to bind.

Definition at line 340 of file function_objects.hpp.

◆ ~BoundUnaryFreeFunction()

template<typename A >
virtual ecl::BoundUnaryFreeFunction< A, void >::~BoundUnaryFreeFunction ( )
inlinevirtual

Definition at line 341 of file function_objects.hpp.

Member Function Documentation

◆ operator()()

template<typename A >
void ecl::BoundUnaryFreeFunction< A, void >::operator() ( )
inlinevirtual

This ensures any children objects are deleted correctly.

A nullary function object call.

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

Returns
void : the function's return value.

Implements ecl::NullaryFunction< void >.

Definition at line 349 of file function_objects.hpp.

Member Data Documentation

◆ argument

template<typename A >
A ecl::BoundUnaryFreeFunction< A, void >::argument
private

Definition at line 353 of file function_objects.hpp.

◆ free_function

template<typename A >
void(* ecl::BoundUnaryFreeFunction< A, void >::free_function) (A)
private

Definition at line 352 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