Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
z
+
Functions
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
z
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
+
Typedefs
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
e
i
n
o
p
r
u
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Typedefs
a
b
c
d
e
f
g
i
m
n
o
p
r
s
t
v
Enumerations
+
Enumerator
a
b
c
e
f
i
n
p
r
s
t
u
Properties
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
a
c
d
e
f
h
i
l
m
o
p
r
s
t
u
w
+
Variables
_
a
c
d
g
h
i
l
m
n
o
p
r
s
u
Typedefs
Enumerations
Enumerator
+
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
src
lib
coil
common
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
coil::Guard::m_mutex
M & m_mutex
Definition:
Guard.h:92
coil::Guard::Guard
Guard(M &mutex)
Constructor.
Definition:
Guard.h:64
coil::Guard::~Guard
~Guard()
Destructor.
Definition:
Guard.h:84
coil::Guard::operator=
Guard & operator=(const Guard &)
Guard
Definition:
GuardTests.cpp:40
coil
Common Object Interface Layer.
Definition:
ace/coil/Condition.cpp:22
openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:43