QCAD
Open Source 2D CAD
RLockedFile Class Reference

Copyright (c) 2011-2018 by Andrew Mustun. More...

#include <RLockedFile.h>

Inheritance diagram for RLockedFile:

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
 

Detailed Description

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.

Member Enumeration Documentation

◆ LockMode

Enumerator
NoLock 
ReadLock 
WriteLock 

Constructor & Destructor Documentation

◆ RLockedFile() [1/2]

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() [2/2]

RLockedFile::RLockedFile ( const QString &  name)

◆ ~RLockedFile()

RLockedFile::~RLockedFile ( )

Member Function Documentation

◆ isLocked()

bool RLockedFile::isLocked ( ) const

◆ lock()

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.

◆ lockMode()

RLockedFile::LockMode RLockedFile::lockMode ( ) const

◆ open()

bool RLockedFile::open ( OpenMode  mode)

◆ unlock()

bool RLockedFile::unlock ( )

Member Data Documentation

◆ m_lock_mode

LockMode RLockedFile::m_lock_mode
private

The documentation for this class was generated from the following files: