OverSim
XmlRpcThread.h
Go to the documentation of this file.
1 #ifndef _XMLRPCTHREAD_H_
2 #define _XMLRPCTHREAD_H_
3 //
4 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
5 //
6 
12 #if defined(_MSC_VER)
13 # pragma warning(disable:4786) // identifier was truncated in debug info
14 #endif
15 
16 namespace XmlRpc {
17 
20  public:
22  virtual void run() = 0;
23  }; // class XmlRpcRunnable
24 
25 
27  class XmlRpcThread {
28  public:
31 
33  XmlRpcThread(XmlRpcRunnable* runnable) : _runner(runnable), _pThread(0) {}
34 
36  ~XmlRpcThread();
37 
40  void start();
41 
43  void join();
44 
46  XmlRpcRunnable* getRunnable() const { return _runner; }
47 
50 
51  private:
52 
54  static unsigned int __stdcall runInThread(void* pThread);
55 
58 
60  void* _pThread;
61 
62  }; // class XmlRpcThread
63 
64 } // namespace XmlRpc
65 
66 #endif // _XMLRPCTHREAD_H_