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

Creates a unary function from a reference wrapper. More...

#include <function_objects.hpp>

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

Public Member Functions

Result operator() (T t)
 This ensures any children objects are deleted correctly. More...
 
 UnaryFunctionReference (const ReferenceWrapper< FunctionObject > &wrapper)
 Creates a UnaryFunction descendant from a reference wrapper. More...
 
virtual ~UnaryFunctionReference ()
 
- Public Member Functions inherited from ecl::UnaryFunction< T, Result >
virtual ~UnaryFunction ()
 

Private Attributes

FunctionObject & function_object
 

Additional Inherited Members

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

Detailed Description

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

Creates a unary function from a reference wrapper.

Takes a reference wrapper containing a unary function (strictly by definition) object reference and creates a UnaryFunction descendant. This is useful in utilising the inheritance from UnaryFunction (needed for slots and similar classes).

Template Parameters
FunctionObject: type of the function object to be referenced.
Result: the return type of the unary function.
See also
UnaryFunctionReference<FunctionObject,void>, FunctionObjects.

Definition at line 1096 of file function_objects.hpp.

Constructor & Destructor Documentation

template<typename FunctionObject , typename T , typename Result = void>
ecl::UnaryFunctionReference< FunctionObject, T, Result >::UnaryFunctionReference ( const ReferenceWrapper< FunctionObject > &  wrapper)
inlineexplicit

Creates a UnaryFunction descendant from a reference wrapper.

Creates a UnaryFunction descendant by reference (not copying).

Parameters
wrapper: the reference wrapper holding the unary function object to be referenced.

Definition at line 1106 of file function_objects.hpp.

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

Definition at line 1110 of file function_objects.hpp.

Member Function Documentation

template<typename FunctionObject , typename T , typename Result = void>
Result ecl::UnaryFunctionReference< FunctionObject, T, Result >::operator() ( t)
inlinevirtual

This ensures any children objects are deleted correctly.

The unary function object call.

Redirects the call to the referenced unary function object call.

Returns
R : the function's return value.

Implements ecl::UnaryFunction< T, Result >.

Definition at line 1118 of file function_objects.hpp.

Member Data Documentation

template<typename FunctionObject , typename T , typename Result = void>
FunctionObject& ecl::UnaryFunctionReference< FunctionObject, T, Result >::function_object
private

Definition at line 1121 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:29