Mutex.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2011, SRI International (R)
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
20 #ifndef __OpenKarto_Mutex_h__
21 #define __OpenKarto_Mutex_h__
22 
23 #include <OpenKarto/Macros.h>
24 
25 namespace karto
26 {
27 
29 
30 
34 
35  struct MutexPrivate;
36  struct ScopedLockPrivate;
37 
44  {
45  public:
49  Mutex();
50 
54  ~Mutex();
55 
56  public:
61  {
62  public:
63  ScopedLock();
64 
69  ScopedLock(Mutex& rMutex);
70  ~ScopedLock();
71 
72  public:
77  void Acquire(Mutex& rMutex);
78 
84  bool TryAcquire( Mutex& rMutex);
85 
89  void Release();
90 
91  private:
93  };
94 
95  private:
96  // restrict the following functions
97  Mutex(const Mutex&);
98  void operator=(const Mutex&);
99 
100  private:
102  };
103 
105 
106 }
107 
108 #endif // __OpenKarto_Mutex_h__
#define KARTO_EXPORT
Definition: Macros.h:78
MutexPrivate * m_pMutexPrivate
Definition: Mutex.h:101
Definition: Any.cpp:20
ScopedLockPrivate * m_pScopedLockPrivate
Definition: Mutex.h:92


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36