OpenRTM
1.0.0
Main Page
Namespaces
Classes
Files
File List
File Members
tmp
binarydeb
ros-indigo-openrtm-aist-1.1.0
src
lib
coil
include
coil
Guard.h
Go to the documentation of this file.
1
// -*- C++ -*-
20
#ifndef COIL_GUARD_H
21
#define COIL_GUARD_H
22
23
#include <
coil/Mutex.h
>
24
25
namespace
coil
26
{
40
template
<
class
M>
41
class
Guard
42
{
43
public
:
44
64
Guard
(M& mutex) : m_mutex(mutex)
65
{
66
m_mutex.lock();
67
}
68
84
~Guard
()
85
{
86
m_mutex.unlock();
87
}
88
89
private
:
90
Guard
(
const
Guard
&);
91
Guard
& operator=(
const
Guard
&);
92
M& m_mutex;
93
};
94
};
95
#endif // COIL_GUARD_H
Generated on Mon Mar 13 2017 01:58:13 for OpenRTM by
1.8.4