Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CallbackThread Class Reference

A simple adapter to cause a callback under a new thread. More...

#include <CallbackThread.h>

Inheritance diagram for CallbackThread:

Detailed Description

A simple adapter to cause a callback under a new thread.

The constructor is designed to take just about anything, with zero or one arguments. If the functor returns a pointer type, this will be passed as the result of the run() call, accessible via join() or getReturnValue().

Definition at line 11 of file CallbackThread.h.

List of all members.

Public Member Functions

template<typename F >
 CallbackThread (const F &cb, bool autoStart=false)
 constructor, pass zero-argument callback function
template<typename F , typename C >
 CallbackThread (const F &cb, C &userdata, bool autoStart=false)
 constructor, pass the user data and single argument callback function
template<typename F , typename C >
 CallbackThread (const F &cb, const C &userdata, bool autoStart=false)
 constructor, pass the user data and single argument callback function
 ~CallbackThread ()
 destructor

Protected Member Functions

virtual void * run ()

Protected Attributes

FunctorAdapter * fun

Private Member Functions

 CallbackThread (const CallbackThread &)
 don't call
CallbackThreadoperator= (const CallbackThread &)
 don't call

Constructor & Destructor Documentation

template<typename F >
CallbackThread::CallbackThread ( const F &  cb,
bool  autoStart = false 
)

constructor, pass zero-argument callback function

Definition at line 10 of file CallbackThread.h.

template<typename F , typename C >
CallbackThread::CallbackThread ( const F &  cb,
C &  userdata,
bool  autoStart = false 
)

constructor, pass the user data and single argument callback function

Definition at line 14 of file CallbackThread.h.

template<typename F , typename C >
CallbackThread::CallbackThread ( const F &  cb,
const C &  userdata,
bool  autoStart = false 
)

constructor, pass the user data and single argument callback function

Definition at line 18 of file CallbackThread.h.

CallbackThread::~CallbackThread (  ) 

destructor

Definition at line 21 of file CallbackThread.h.

CallbackThread::CallbackThread ( const CallbackThread  )  [private]

don't call


Member Function Documentation

CallbackThread& CallbackThread::operator= ( const CallbackThread  )  [private]

don't call

virtual void* CallbackThread::run (  )  [protected, virtual]

Reimplemented from Thread.

Definition at line 88 of file CallbackThread.h.


Member Data Documentation

FunctorAdapter* CallbackThread::fun [protected]

Definition at line 92 of file CallbackThread.h.


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:05 2016 by Doxygen 1.6.3