OpenRTM-aist
1.2.1
総合概要
名前空間
クラス
ファイル
ファイル一覧
ファイルメンバ
coil
include
coil
Guard.h
[詳解]
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::Guard
Guard(M &mutex)
コンストラクタ
Definition:
Guard.h:64
Mutex.h
coil::Guard::~Guard
~Guard()
デストラクタ
Definition:
Guard.h:84
coil::Guard
Guard テンプレートクラス
Definition:
Guard.h:41
coil
Common Object Interface Layer.
Definition:
Affinity.h:28
構築:
1.8.11