- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# QWriteLocker Class Reference

Search for all occurrences

## Detailed Description

Definition at line 133 of file qreadwritelock.h.

`#include <qreadwritelock.h>`

List of all members.

## Public Member Functions
| QWriteLocker (QReadWriteLock *readWriteLock)
| ~QWriteLocker ()
void | unlock ()
void | relock ()
QReadWriteLock * | readWriteLock () const

## Constructor & Destructor Documentation

QWriteLocker | ( | QReadWriteLock * | readWriteLock | ) | `[inline]`

Definition at line 170 of file qreadwritelock.h.

        : q_val(reinterpret_cast<quintptr>(areadWriteLock))
    {
        Q_ASSERT_X((q_val & quintptr(1u)) == quintptr(0),
                   "QWriteLocker", "QReadWriteLock pointer is misaligned");
        relock();
    }

~QWriteLocker | ( |  | ) | `[inline]`

Definition at line 138 of file qreadwritelock.h.

        { unlock(); }

## Member Function Documentation

void unlock | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 141 of file qreadwritelock.h.

        {
            if (q_val) {
                if ((q_val & quintptr(1u)) == quintptr(1u)) {
                    q_val &= ~quintptr(1u);
                    readWriteLock()->unlock();
                }
            }
        }

void relock | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 151 of file qreadwritelock.h.

        {
            if (q_val) {
                if ((q_val & quintptr(1u)) == quintptr(0u)) {
                    readWriteLock()->lockForWrite();
                    q_val |= quintptr(1u);
                }
            }
        }

QReadWriteLock* readWriteLock | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 161 of file qreadwritelock.h.

        { return reinterpret_cast<QReadWriteLock *>(q_val & ~quintptr(1u)); }

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

- QtCore/qreadwritelock.h

QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker
QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker QWriteLocker