Main Page
Namespaces
Classes
Files
File List
File Members
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 Jun 10 2019 14:07:52