FreeNOS
Public Member Functions | Private Types | Private Member Functions | Private Attributes
Callback< Base, ParamType > Class Template Reference

Abstraction for providing a callback function to a object instance. More...

#include <Callback.h>

Inheritance diagram for Callback< Base, ParamType >:
CallbackFunction

Public Member Functions

 Callback (Base *object, Function func)
 Constructor. More...
 
virtual void execute (void *parameter)
 Invoke the callback function on the object. More...
 

Private Types

typedef void(Base::* Function) (ParamType *param)
 Callback function prototype. More...
 

Private Member Functions

virtual void executeOnObject (ParamType *parameter)
 Execute the callback. More...
 

Private Attributes

Base * m_object
 Object instance. More...
 
Function m_function
 Function pointer. More...
 

Detailed Description

template<class Base, class ParamType>
class Callback< Base, ParamType >

Abstraction for providing a callback function to a object instance.

Definition at line 49 of file Callback.h.

Member Typedef Documentation

◆ Function

template<class Base , class ParamType >
typedef void(Base::* Callback< Base, ParamType >::Function) (ParamType *param)
private

Callback function prototype.

Definition at line 54 of file Callback.h.

Constructor & Destructor Documentation

◆ Callback()

template<class Base , class ParamType >
Callback< Base, ParamType >::Callback ( Base *  object,
Function  func 
)
inline

Constructor.

Parameters
objectObject pointer
funcCallback function

Definition at line 64 of file Callback.h.

Member Function Documentation

◆ execute()

template<class Base , class ParamType >
virtual void Callback< Base, ParamType >::execute ( void *  parameter)
inlinevirtual

Invoke the callback function on the object.

Parameters
parameterOptional parameter to pass

Implements CallbackFunction.

Definition at line 75 of file Callback.h.

◆ executeOnObject()

template<class Base , class ParamType >
virtual void Callback< Base, ParamType >::executeOnObject ( ParamType *  parameter)
inlineprivatevirtual

Execute the callback.

Parameters
parameterOne parameter which is passed to the callback function.

Definition at line 87 of file Callback.h.

Referenced by Callback< MemoryContext, Address >::execute().

Field Documentation

◆ m_function

template<class Base , class ParamType >
Function Callback< Base, ParamType >::m_function
private

◆ m_object

template<class Base , class ParamType >
Base* Callback< Base, ParamType >::m_object
private

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