Public Member Functions | Protected Member Functions | Protected Attributes

InlineFunctorProcessor Class Reference

A base class that will allow you to call YieldOnFunctor() from within a function, and continue with that function when the asynchronous processing has completed. More...

#include <InlineFunctor.h>

Collaboration diagram for InlineFunctorProcessor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 InlineFunctorProcessor ()
 ~InlineFunctorProcessor ()
void StartThreads (int numThreads)
void StopThreads (bool blockOnCurrentProcessing)
void YieldOnFunctor (InlineFunctor *inlineFunctor)
bool UpdateIFP (void)
void Pop (int threadCallDepth)

Protected Member Functions

unsigned GetCallDepth (void) const
 Returns the number of functors that were passed to the system.

Protected Attributes

RakNet::FunctionThread functionThread
 Used to create a thread that processes functors.
DataStructures::List< bool > completedThreads
 Tracks which threads have been completed.

Detailed Description

A base class that will allow you to call YieldOnFunctor() from within a function, and continue with that function when the asynchronous processing has completed.

Definition at line 22 of file InlineFunctor.h.


Constructor & Destructor Documentation

InlineFunctorProcessor::InlineFunctorProcessor (  ) 

Definition at line 10 of file InlineFunctor.cpp.

InlineFunctorProcessor::~InlineFunctorProcessor (  ) 

Definition at line 14 of file InlineFunctor.cpp.

Here is the call graph for this function:


Member Function Documentation

unsigned InlineFunctorProcessor::GetCallDepth ( void   )  const [protected]

Returns the number of functors that were passed to the system.

Definition at line 48 of file InlineFunctor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void InlineFunctorProcessor::Pop ( int  threadCallDepth  ) 

Definition at line 44 of file InlineFunctor.cpp.

Here is the caller graph for this function:

void InlineFunctorProcessor::StartThreads ( int  numThreads  ) 

Start the threads. Should call this first

Parameters:
[in] numThreads How many worker threads to start
Note:
If only one thread is started, then the calls to YieldOnFunctor will process in that order

Definition at line 19 of file InlineFunctor.cpp.

Here is the call graph for this function:

void InlineFunctorProcessor::StopThreads ( bool  blockOnCurrentProcessing  ) 

Stop the threads

Parameters:
[in] blockOnCurrentProcessing Wait for the current processing to finish?

Definition at line 23 of file InlineFunctor.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool InlineFunctorProcessor::UpdateIFP ( void   ) 

Definition at line 34 of file InlineFunctor.cpp.

Here is the call graph for this function:

void InlineFunctorProcessor::YieldOnFunctor ( InlineFunctor inlineFunctor  ) 

Yield processing in the current function, continuing with the function implemented by CallYieldFunction When the functor completes, this function will return and the caller will continue processing

Parameters:
[in] inlineFunctor A class that implements Functor::Process() to perform processing that can work asynchronously, such as loading a file or doing a database call

Definition at line 27 of file InlineFunctor.cpp.

Here is the call graph for this function:


Member Data Documentation

Tracks which threads have been completed.

Definition at line 60 of file InlineFunctor.h.

Used to create a thread that processes functors.

Definition at line 57 of file InlineFunctor.h.


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