XmlRpc::XmlRpcThread Class Reference

#include <XmlRpcThread.h>

List of all members.


Detailed Description

A simple platform-independent thread API implemented for posix and windows.

Public Member Functions

 XmlRpcThread ()
 Construct a thread object. Not usable until setRunnable() has been called.
 XmlRpcThread (XmlRpcRunnable *runnable)
 Construct a thread object.
 ~XmlRpcThread ()
 Destructor. Does not perform a join() (ie, the thread may continue to run).
void start ()
 Execute the run method of the runnable object in a separate thread.
void join ()
 Waits until the thread exits.
XmlRpcRunnablegetRunnable () const
 Access the runnable.
void setRunnable (XmlRpcRunnable *r)
 Set the runnable.

Static Private Member Functions

static unsigned int __stdcall runInThread (void *pThread)
 Start the runnable going in a thread.

Private Attributes

XmlRpcRunnable_runner
 Code to be executed.
void * _pThread
 Native thread object.

Constructor & Destructor Documentation

XmlRpc::XmlRpcThread::XmlRpcThread (  )  [inline]

Construct a thread object. Not usable until setRunnable() has been called.

00024 : _runner(0), _pThread(0) {}

XmlRpc::XmlRpcThread::XmlRpcThread ( XmlRpcRunnable runnable  )  [inline]

Construct a thread object.

00027 : _runner(runnable), _pThread(0) {}

XmlRpc::XmlRpcThread::~XmlRpcThread (  ) 

Destructor. Does not perform a join() (ie, the thread may continue to run).


Member Function Documentation

void XmlRpc::XmlRpcThread::start (  ) 

Execute the run method of the runnable object in a separate thread.

Returns immediately in the calling thread.

Referenced by XmlRpc::XmlRpcThreadedServer::Worker::Worker().

void XmlRpc::XmlRpcThread::join (  ) 

Waits until the thread exits.

XmlRpcRunnable* XmlRpc::XmlRpcThread::getRunnable (  )  const [inline]

Access the runnable.

00040 { return _runner; }

void XmlRpc::XmlRpcThread::setRunnable ( XmlRpcRunnable r  )  [inline]

Set the runnable.

Referenced by XmlRpc::XmlRpcThreadedServer::Worker::Worker().

00043 { _runner = r; }

static unsigned int __stdcall XmlRpc::XmlRpcThread::runInThread ( void *  pThread  )  [static, private]

Start the runnable going in a thread.


Member Data Documentation

Code to be executed.

Referenced by getRunnable(), and setRunnable().

Native thread object.


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

Generated on Fri Sep 19 13:05:09 2008 for ITM OverSim by  doxygen 1.5.5