QCAD
Open Source 2D CAD
RLockedFile Class Reference

Copyright (c) 2011-2015 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-2015 by Andrew Mustun. More...
 
LockMode lockMode () const
 
bool open (OpenMode mode)
 
 RLockedFile ()
 Copyright (c) 2011-2015 by Andrew Mustun. More...
 
 RLockedFile (const QString &name)
 
bool unlock ()
 
 ~RLockedFile ()
 

Private Attributes

LockMode m_lock_mode
 

Detailed Description

Copyright (c) 2011-2015 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

Enumerator
NoLock 
ReadLock 
WriteLock 

Constructor & Destructor Documentation

RLockedFile::RLockedFile ( )

Copyright (c) 2011-2015 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 ( )

Member Function Documentation

bool RLockedFile::isLocked ( ) const
bool RLockedFile::lock ( LockMode  mode,
bool  block = true 
)

Copyright (c) 2011-2015 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 ( )

Member Data Documentation

LockMode RLockedFile::m_lock_mode
private

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