XmlRpcMutex.h

Go to the documentation of this file.
00001 #ifndef _XMLRPCMUTEX_H_
00002 #define _XMLRPCMUTEX_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 XmlRpcMutex {
00020   public:
00022     XmlRpcMutex() : _pMutex(0) {}
00023 
00025     ~XmlRpcMutex();
00026 
00028     void acquire();
00029 
00031     void release();
00032 
00034     struct AutoLock {
00036       AutoLock(XmlRpcMutex& m) : _m(m) { _m.acquire(); }
00038       ~AutoLock() { _m.release(); }
00040       XmlRpcMutex& _m;
00041     };
00042 
00043   private:
00044 
00046     void* _pMutex;
00047 
00048   };  // class XmlRpcMutex
00049 
00050 }  // namespace XmlRpc
00051 
00052 #endif  //  _XMLRPCMUTEX_H_
Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3