AndroMeta  2.0.0
AndroMeta/include/AndroMeta/MMutex.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009-2012 AndroMeta LLC. All rights reserved.
00003  *
00004  * AndroMeta LLC retains all intellectual property and proprietary 
00005  * rights to this software and related documentation and any modifications 
00006  * thereto.  Any use, reproduction, disclosure, or distribution of this 
00007  * software and related documentation without an express license agreement 
00008  * from AndroMeta LLC is strictly prohibited.
00009  * 
00010  */
00011 
00018 #ifndef ANDROMETA_M_MUTEX_H
00019 #define ANDROMETA_M_MUTEX_H
00020 
00021 #include <AndroMeta/MTime.h>
00022 
00023 namespace Meta{
00024   
00031   class MMutex{
00032   public:
00033     
00037     MMutex();
00038     
00042     ~MMutex();
00043     
00047     void lock();
00048     
00055     bool lock(const mtime& timeout);
00056     
00063     bool tryLock();
00064     
00068     void unlock();
00069     
00070     friend class MMutex_;
00071     
00072   private:  
00073     MMutex(const MMutex&);
00074     MMutex& operator=(const MMutex&);
00075     
00076     class MMutex_* x_;
00077   };
00078   
00079 } // end namespace Meta
00080 
00081 #endif // ANDROMETA_M_MUTEX_H