#include <FunctionThread.h>
Inherited by InlineFunctor.
Public Member Functions | |
Functor () | |
virtual | ~Functor () |
virtual void | Process (void *context)=0 |
Do whatever processing you want. | |
virtual void | HandleResult (bool wasCancelled, void *context)=0 |
Called from FunctionThread::CallResultHandlers with wasCancelled false OR Called from FunctionThread::StopThread or FunctionThread::~FunctionThread with wasCancelled true. |
A functor is a single unit of processing to send to the Function thread. Derive from it, add your data, and implement the processing function.
Definition at line 77 of file FunctionThread.h.
RakNet::Functor::Functor | ( | ) | [inline] |
Definition at line 80 of file FunctionThread.h.
virtual RakNet::Functor::~Functor | ( | ) | [inline, virtual] |
Definition at line 81 of file FunctionThread.h.
virtual void RakNet::Functor::HandleResult | ( | bool | wasCancelled, | |
void * | context | |||
) | [pure virtual] |
Called from FunctionThread::CallResultHandlers with wasCancelled false OR Called from FunctionThread::StopThread or FunctionThread::~FunctionThread with wasCancelled true.
[in] | wasCancelledTrue | if CallResultHandlers was called, false if StopThreads or CancelInputWithContext was called before Functor::Process() |
[in] | context | pointer passed to FunctionThread::Push::context |
Implemented in InlineFunctor.
virtual void RakNet::Functor::Process | ( | void * | context | ) | [pure virtual] |
Do whatever processing you want.
[in] | context | pointer passed to FunctionThread::Push::context |