XmlRpcThread.h

Go to the documentation of this file.
00001 #ifndef _XMLRPCTHREAD_H_
00002 #define _XMLRPCTHREAD_H_
00003 //
00004 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
00005 //
00006 
00012 #if defined(_MSC_VER)
00013 # pragma warning(disable:4786)    // identifier was truncated in debug info
00014 #endif
00015 
00016 namespace XmlRpc {
00017 
00019   class XmlRpcRunnable {
00020   public:
00022       virtual void run() = 0;
00023   };  // class XmlRpcRunnable
00024 
00025 
00027   class XmlRpcThread {
00028   public:
00030     XmlRpcThread() : _runner(0), _pThread(0) {}
00031 
00033     XmlRpcThread(XmlRpcRunnable* runnable) : _runner(runnable), _pThread(0) {}
00034 
00036     ~XmlRpcThread();
00037 
00040     void start();
00041 
00043     void join();
00044 
00046     XmlRpcRunnable* getRunnable() const { return _runner; }
00047 
00049     void setRunnable(XmlRpcRunnable* r) { _runner = r; }
00050 
00051   private:
00052 
00054     static unsigned int __stdcall runInThread(void* pThread);
00055 
00057     XmlRpcRunnable* _runner;
00058 
00060     void* _pThread;
00061 
00062   };  // class XmlRpcThread
00063 
00064 }  // namespace XmlRpc
00065 
00066 #endif  //  _XMLRPCTHREAD_H_
Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3