Public Member Functions | Private Attributes
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]

List of all members.

Public Member Functions

operator() (A a)
 This ensures any children objects are deleted correctly.
 UnaryFreeFunction (R(*function)(A))
 Unary function object constructor for global/static functions.
virtual ~UnaryFreeFunction ()

Private Attributes

R(* free_function )(A)

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 200 of file function_objects.hpp.


Constructor & Destructor Documentation

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 211 of file function_objects.hpp.

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

Definition at line 213 of file function_objects.hpp.


Member Function Documentation

template<typename A, typename R = void>
R ecl::UnaryFreeFunction< A, R >::operator() ( A  a) [inline, virtual]

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, R >.

Definition at line 222 of file function_objects.hpp.


Member Data Documentation

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

Definition at line 225 of file function_objects.hpp.


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


ecl_utilities
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:12:21