Embedded Template Library 1.0
function

Classes

class  etl::ifunction< TParameter >
 
class  etl::ifunction< void >
 
class  etl::function< TObject, TParameter >
 
class  etl::function< TObject, void >
 
class  etl::function< void, TParameter >
 
class  etl::function< void, void >
 
class  etl::function_mp< TObject, TParameter, Function >
 
class  etl::function_mv< TObject, Function >
 
class  etl::function_imp< TObject, TParameter, Instance, Function >
 
class  etl::function_imv< TObject, Instance, Function >
 
class  etl::function_fp< TParameter, Function >
 
class  etl::function_fv< Function >
 

Detailed Description

A set of wrapper templates to allow a member or static function to be called without the caller having to know the specific details of the callee. This template class may be used to link interrupt vectors to specific member functions of a handler class.


Class Documentation

◆ etl::ifunction

class etl::ifunction
template<typename TParameter>
class etl::ifunction< TParameter >

The base interface template for function template specialisations.

Template Parameters
TParameterThe parameter type expected by the function.

Public Types

typedef TParameter parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

virtual void operator() (TParameter) const =0
 The function operator that will be overridden. More...
 

Member Function Documentation

◆ operator()()

◆ etl::ifunction< void >

class etl::ifunction< void >

The base interface template for functions taking void parameters.

Public Types

typedef void parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

virtual void operator() () const =0
 The function operator that will be overridden. More...
 

Member Function Documentation

◆ operator()()

virtual void etl::ifunction< void >::operator() ( ) const
pure virtual

◆ etl::function

class etl::function
template<typename TObject, typename TParameter>
class etl::function< TObject, TParameter >

A derived function template that takes an object type and parameter type.

Template Parameters
TObjectThe object type that contains the member function.
TParameterThe parameter type accepted by the member function.

Public Types

typedef TObject object_type
 The type of object.
 
typedef TParameter parameter_type
 The type of parameter sent to the function.
 
- Public Types inherited from etl::ifunction< TParameter >
typedef TParameter parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

 function (TObject &object_, void(TObject::*p_function_)(TParameter))
 
virtual void operator() (TParameter data) const ETL_OVERRIDE
 
virtual void operator() (TParameter) const =0
 The function operator that will be overridden. More...
 

Constructor & Destructor Documentation

◆ function()

template<typename TObject , typename TParameter >
etl::function< TObject, TParameter >::function ( TObject &  object_,
void(TObject::*)(TParameter)  p_function_ 
)
inline

Constructor.

Parameters
objectReference to the object
p_functionPointer to the member function

Member Function Documentation

◆ operator()()

template<typename TObject , typename TParameter >
virtual void etl::function< TObject, TParameter >::operator() ( TParameter  data) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< TParameter >.

◆ etl::function< TObject, void >

class etl::function< TObject, void >
template<typename TObject>
class etl::function< TObject, void >

A derived function template that takes a parameter type.

Template Parameters
TObjectThe object type that contains the member function.

Public Member Functions

 function (TObject &object_, void(TObject::*p_function_)(void))
 
virtual void operator() () const ETL_OVERRIDE
 The function operator that calls the destination function. More...
 
virtual void operator() () const =0
 The function operator that will be overridden. More...
 

Additional Inherited Members

- Public Types inherited from etl::ifunction< void >
typedef void parameter_type
 The type of parameter sent to the function.
 

Constructor & Destructor Documentation

◆ function()

template<typename TObject >
etl::function< TObject, void >::function ( TObject &  object_,
void(TObject::*)(void)  p_function_ 
)
inline

Constructor.

Parameters
objectReference to the object
p_functionPointer to the member function

Member Function Documentation

◆ operator()()

template<typename TObject >
virtual void etl::function< TObject, void >::operator() ( ) const
inlinevirtual

The function operator that calls the destination function.

Implements etl::ifunction< void >.

◆ etl::function< void, TParameter >

class etl::function< void, TParameter >
template<typename TParameter>
class etl::function< void, TParameter >

Specialisation for static or global functions that takes a parameter.

Public Member Functions

 function (void(*p_function_)(TParameter))
 
virtual void operator() (TParameter data) const ETL_OVERRIDE
 
virtual void operator() (TParameter) const =0
 The function operator that will be overridden. More...
 

Additional Inherited Members

- Public Types inherited from etl::ifunction< TParameter >
typedef TParameter parameter_type
 The type of parameter sent to the function.
 

Constructor & Destructor Documentation

◆ function()

template<typename TParameter >
etl::function< void, TParameter >::function ( void(*)(TParameter)  p_function_)
inlineexplicit

Constructor.

Parameters
p_functionPointer to the function

Member Function Documentation

◆ operator()()

template<typename TParameter >
virtual void etl::function< void, TParameter >::operator() ( TParameter  data) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< TParameter >.

◆ etl::function< void, void >

class etl::function< void, void >

Specialisation static functions taking void parameter.

Public Member Functions

 function (void(*p_function_)(void))
 
virtual void operator() () const ETL_OVERRIDE
 The function operator that calls the destination function. More...
 
virtual void operator() () const =0
 The function operator that will be overridden. More...
 

Additional Inherited Members

- Public Types inherited from etl::ifunction< void >
typedef void parameter_type
 The type of parameter sent to the function.
 

Constructor & Destructor Documentation

◆ function()

etl::function< void, void >::function ( void(*)(void)  p_function_)
inlineexplicit

Constructor.

Parameters
p_functionPointer to the function.

Member Function Documentation

◆ operator()()

virtual void etl::function< void, void >::operator() ( ) const
inlinevirtual

The function operator that calls the destination function.

Implements etl::ifunction< void >.

◆ etl::function_mp

class etl::function_mp
template<typename TObject, typename TParameter, void(TObject::*)(TParameter) Function>
class etl::function_mp< TObject, TParameter, Function >

A derived function template that takes an object type and parameter type.

Template Parameters
TObjectThe object type that contains the member function.
TParameterThe parameter type accepted by the member function.

Public Types

typedef TObject object_type
 The type of object.
 
typedef TParameter parameter_type
 The type of parameter sent to the function.
 
- Public Types inherited from etl::ifunction< TParameter >
typedef TParameter parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

 function_mp (TObject &object_)
 
virtual void operator() (TParameter data) const ETL_OVERRIDE
 
virtual void operator() (TParameter) const =0
 The function operator that will be overridden. More...
 

Constructor & Destructor Documentation

◆ function_mp()

template<typename TObject , typename TParameter , void(TObject::*)(TParameter) Function>
etl::function_mp< TObject, TParameter, Function >::function_mp ( TObject &  object_)
inlineexplicit

Constructor.

Parameters
objectReference to the object

Member Function Documentation

◆ operator()()

template<typename TObject , typename TParameter , void(TObject::*)(TParameter) Function>
virtual void etl::function_mp< TObject, TParameter, Function >::operator() ( TParameter  data) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< TParameter >.

◆ etl::function_mv

class etl::function_mv
template<typename TObject, void(TObject::*)(void) Function>
class etl::function_mv< TObject, Function >

A derived function template that takes an object type and parameter type.

Template Parameters
TObjectThe object type that contains the member function.
TParameterThe parameter type accepted by the member function.

Public Types

typedef TObject object_type
 The type of object.
 
typedef void parameter_type
 The type of parameter sent to the function.
 
- Public Types inherited from etl::ifunction< void >
typedef void parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

 function_mv (TObject &object_)
 
virtual void operator() () const ETL_OVERRIDE
 
virtual void operator() () const =0
 The function operator that will be overridden. More...
 

Constructor & Destructor Documentation

◆ function_mv()

template<typename TObject , void(TObject::*)(void) Function>
etl::function_mv< TObject, Function >::function_mv ( TObject &  object_)
inlineexplicit

Constructor.

Parameters
objectReference to the object

Member Function Documentation

◆ operator()()

template<typename TObject , void(TObject::*)(void) Function>
virtual void etl::function_mv< TObject, Function >::operator() ( ) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< void >.

◆ etl::function_imp

class etl::function_imp
template<typename TObject, typename TParameter, TObject & Instance, void(TObject::*)(TParameter) Function>
class etl::function_imp< TObject, TParameter, Instance, Function >

A derived function template that takes an object type and parameter type.

Template Parameters
TObjectThe object type that contains the member function.
TParameterThe parameter type accepted by the member function.

Public Types

typedef TObject object_type
 The type of object.
 
typedef TParameter parameter_type
 The type of parameter sent to the function.
 
- Public Types inherited from etl::ifunction< TParameter >
typedef TParameter parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

virtual void operator() (TParameter data) const ETL_OVERRIDE
 
virtual void operator() (TParameter) const =0
 The function operator that will be overridden. More...
 

Member Function Documentation

◆ operator()()

template<typename TObject , typename TParameter , TObject & Instance, void(TObject::*)(TParameter) Function>
virtual void etl::function_imp< TObject, TParameter, Instance, Function >::operator() ( TParameter  data) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< TParameter >.

◆ etl::function_imv

class etl::function_imv
template<typename TObject, TObject & Instance, void(TObject::*)(void) Function>
class etl::function_imv< TObject, Instance, Function >

A derived function template that takes an object type and parameter type.

Template Parameters
TObjectThe object type that contains the member function.
TParameterThe parameter type accepted by the member function.

Public Types

typedef TObject object_type
 The type of object.
 
typedef void parameter_type
 The type of parameter sent to the function.
 
- Public Types inherited from etl::ifunction< void >
typedef void parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

virtual void operator() () const ETL_OVERRIDE
 
virtual void operator() () const =0
 The function operator that will be overridden. More...
 

Member Function Documentation

◆ operator()()

template<typename TObject , TObject & Instance, void(TObject::*)(void) Function>
virtual void etl::function_imv< TObject, Instance, Function >::operator() ( ) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< void >.

◆ etl::function_fp

class etl::function_fp
template<typename TParameter, void(*)(TParameter) Function>
class etl::function_fp< TParameter, Function >

A derived function template that takes a parameter type.

Template Parameters
TParameterThe parameter type accepted by the member function.

Public Types

typedef TParameter parameter_type
 The type of parameter sent to the function.
 
- Public Types inherited from etl::ifunction< TParameter >
typedef TParameter parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

 function_fp ()
 
virtual void operator() (TParameter data) const ETL_OVERRIDE
 
virtual void operator() (TParameter) const =0
 The function operator that will be overridden. More...
 

Constructor & Destructor Documentation

◆ function_fp()

template<typename TParameter , void(*)(TParameter) Function>
etl::function_fp< TParameter, Function >::function_fp ( )
inline

Constructor.

Parameters
objectReference to the object
p_functionPointer to the member function

Member Function Documentation

◆ operator()()

template<typename TParameter , void(*)(TParameter) Function>
virtual void etl::function_fp< TParameter, Function >::operator() ( TParameter  data) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< TParameter >.

◆ etl::function_fv

class etl::function_fv
template<void(*)(void) Function>
class etl::function_fv< Function >

A derived function template that takes a parameter type.

Template Parameters
TParameterThe parameter type accepted by the member function.

Public Types

typedef void parameter_type
 The type of parameter sent to the function.
 
- Public Types inherited from etl::ifunction< void >
typedef void parameter_type
 The type of parameter sent to the function.
 

Public Member Functions

 function_fv ()
 
virtual void operator() () const ETL_OVERRIDE
 
virtual void operator() () const =0
 The function operator that will be overridden. More...
 

Constructor & Destructor Documentation

◆ function_fv()

template<void(*)(void) Function>
etl::function_fv< Function >::function_fv ( )
inline

Constructor.

Parameters
objectReference to the object
p_functionPointer to the member function

Member Function Documentation

◆ operator()()

template<void(*)(void) Function>
virtual void etl::function_fv< Function >::operator() ( ) const
inlinevirtual

The function operator that calls the destination function.

Parameters
dataThe data to pass to the function.

Implements etl::ifunction< void >.