UniSet
@VERSION@
include
RunLock.h
1
/*
2
* Copyright (c) 2021 Pavel Vainerman.
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
6
* published by the Free Software Foundation, version 2.1.
7
*
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Lesser Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
// --------------------------------------------------------------------------
17
#ifndef RunLock_H_
18
#define RunLock_H_
19
// ---------------------------------------------------------------------------
20
#include <string>
21
// ---------------------------------------------------------------------------
22
namespace
uniset
{
23
// ---------------------------------------------------------------------------
27
class
RunLock
28
{
29
public
:
30
RunLock
(
const
std::string& lockfile );
31
~RunLock
();
32
33
bool
isLocked()
const
;
34
bool
lock()
const
;
35
bool
unlock()
const
;
36
bool
isLockOwner()
const
;
37
38
inline
const
std::string getLockfileName()
39
{
40
return
lockfile;
41
}
42
43
protected
:
44
const
std::string lockfile;
45
46
};
47
// ----------------------------------------------------------------------------
48
}
// end of namespace uniset
49
// ----------------------------------------------------------------------------
50
#endif
51
uniset::RunLock
Definition
RunLock.h:28
uniset
Definition
AccessConfig.h:30
Документация по UniSet. Последние изменения: Вс 1 Мар 2026 19:50:48. Создано системой
1.9.8