QCAD
Open Source 2D CAD
|
Copyright (c) 2011-2018 by Andrew Mustun. More...
#include <RLockedFile.h>
Public Types | |
enum | LockMode { NoLock = 0, ReadLock, WriteLock } |
Public Member Functions | |
bool | isLocked () const |
bool | lock (LockMode mode, bool block=true) |
Copyright (c) 2011-2018 by Andrew Mustun. More... | |
LockMode | lockMode () const |
bool | open (OpenMode mode) |
RLockedFile () | |
Copyright (c) 2011-2018 by Andrew Mustun. More... | |
RLockedFile (const QString &name) | |
bool | unlock () |
~RLockedFile () | |
Private Attributes | |
LockMode | m_lock_mode |
Copyright (c) 2011-2018 by Andrew Mustun.
All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.
RLockedFile::RLockedFile | ( | ) |
Copyright (c) 2011-2018 by Andrew Mustun.
All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.
RLockedFile::RLockedFile | ( | const QString & | name | ) |
RLockedFile::~RLockedFile | ( | ) |
bool RLockedFile::isLocked | ( | ) | const |
bool RLockedFile::lock | ( | LockMode | mode, |
bool | block = true |
||
) |
Copyright (c) 2011-2018 by Andrew Mustun.
All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.
RLockedFile::LockMode RLockedFile::lockMode | ( | ) | const |
bool RLockedFile::open | ( | OpenMode | mode | ) |
bool RLockedFile::unlock | ( | ) |
|
private |