# RakNet::Functor Class Reference

`#include <FunctionThread.h>`

Inheritance diagram for RakNet::Functor:

List of all members.

## Public Member Functions
virtual void | Process (void *context)=0
virtual void | HandleResult (bool wasCancelled, void *context)=0

## Detailed Description

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.

## Member Function Documentation

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

Parameters:

  `[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.

Parameters:

  `[in]` | context | pointer passed to FunctionThread::Push::context

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

- C:/RakNet/Source/FunctionThread.h