Public Member Functions | Private Attributes
ecl::NullaryFunctionReference< FunctionObject, Result > Class Template Reference

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

#include <function_objects.hpp>

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

List of all members.

Public Member Functions

 NullaryFunctionReference (const ReferenceWrapper< FunctionObject > &wrapper)
 Creates a NullaryFunction descendant from a reference wrapper.
Result operator() ()
 This ensures any children objects are deleted correctly.
virtual ~NullaryFunctionReference ()

Private Attributes

FunctionObject & function_object

Detailed Description

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

Creates a nullary function from a reference wrapper.

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

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

Definition at line 873 of file function_objects.hpp.


Constructor & Destructor Documentation

template<typename FunctionObject, typename Result = void>
ecl::NullaryFunctionReference< FunctionObject, Result >::NullaryFunctionReference ( const ReferenceWrapper< FunctionObject > &  wrapper) [inline, explicit]

Creates a NullaryFunction descendant from a reference wrapper.

Creates a NullaryFunction descendant by reference (not copying).

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

Definition at line 883 of file function_objects.hpp.

template<typename FunctionObject, typename Result = void>
virtual ecl::NullaryFunctionReference< FunctionObject, Result >::~NullaryFunctionReference ( ) [inline, virtual]

Definition at line 886 of file function_objects.hpp.


Member Function Documentation

template<typename FunctionObject, typename Result = void>
Result ecl::NullaryFunctionReference< FunctionObject, Result >::operator() ( ) [inline, virtual]

This ensures any children objects are deleted correctly.

The nullary function object call.

Redirects the call to the referenced nullary function object call.

Returns:
R : the function's return value.

Implements ecl::NullaryFunction< Result >.

Definition at line 895 of file function_objects.hpp.


Member Data Documentation

template<typename FunctionObject, typename Result = void>
FunctionObject& ecl::NullaryFunctionReference< FunctionObject, Result >::function_object [private]

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