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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes

# QBasicAtomicPointer< T > Class Template Reference

Search for all occurrences

## Detailed Description

### template<typename T>
class QBasicAtomicPointer< T >

Definition at line 131 of file qbasicatomic.h.

`#include <qbasicatomic.h>`

Inheritance diagram for QBasicAtomicPointer< T >:
[legend]

List of all members.

## Public Member Functions
bool | operator== (T *value) const
bool | operator!= (T *value) const
bool | operator! () const
| operator T * () const
T * | operator-> () const
QBasicAtomicPointer< T > & | operator= (T *value)
bool | testAndSetRelaxed (T *expectedValue, T *newValue)
bool | testAndSetAcquire (T *expectedValue, T *newValue)
bool | testAndSetRelease (T *expectedValue, T *newValue)
bool | testAndSetOrdered (T *expectedValue, T *newValue)
T * | fetchAndStoreRelaxed (T *newValue)
T * | fetchAndStoreAcquire (T *newValue)
T * | fetchAndStoreRelease (T *newValue)
T * | fetchAndStoreOrdered (T *newValue)
T * | fetchAndAddRelaxed (qptrdiff valueToAdd)
T * | fetchAndAddAcquire (qptrdiff valueToAdd)
T * | fetchAndAddRelease (qptrdiff valueToAdd)
T * | fetchAndAddOrdered (qptrdiff valueToAdd)
## Static Public Member Functions
static bool | isTestAndSetNative ()
static bool | isTestAndSetWaitFree ()
static bool | isFetchAndStoreNative ()
static bool | isFetchAndStoreWaitFree ()
static bool | isFetchAndAddNative ()
static bool | isFetchAndAddWaitFree ()
## Public Attributes
T *volatile | _q_value

## Member Function Documentation

bool operator== | ( | T * | value | ) | const `[inline]`

Definition at line 152 of file qbasicatomic.h.

        {
            return _q_value == value;
        }

bool operator!= | ( | T * | value | ) | const `[inline]`

Definition at line 157 of file qbasicatomic.h.

        {
            return !operator==(value);
        }

bool operator! | ( | void |  | ) | const `[inline]`

Definition at line 162 of file qbasicatomic.h.

        {
            return operator==(0);
        }

operator T * | ( |  | ) | const `[inline]`

Definition at line 167 of file qbasicatomic.h.

        {
            return _q_value;
        }

T* operator-> | ( | void |  | ) | const `[inline]`

Definition at line 172 of file qbasicatomic.h.

        {
            return _q_value;
        }

QBasicAtomicPointer<T>& operator= | ( | T * | value | ) | `[inline]`

Reimplemented in QAtomicPointer< T >.

Definition at line 177 of file qbasicatomic.h.

        {
    #ifdef QT_ARCH_PARISC
            this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1;
    #endif
            _q_value = value;
            return *this;
        }

Q_INLINE_TEMPLATE bool isTestAndSetNative | ( |  | ) | `[static]`

Search for all occurrences

Definition at line 80 of file qatomic_alpha.h.

    { return true; }

Q_INLINE_TEMPLATE bool isTestAndSetWaitFree | ( |  | ) | `[static]`

Search for all occurrences

Definition at line 83 of file qatomic_alpha.h.

    { return false; }

Q_INLINE_TEMPLATE bool testAndSetRelaxed | ( | T * | expectedValue,
|  | T * | newValue
| ) |  |

Search for all occurrences

Definition at line 551 of file qatomic_alpha.h.

    {
        return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0;
    }

Q_INLINE_TEMPLATE bool testAndSetAcquire | ( | T * | expectedValue,
|  | T * | newValue
| ) |  |

Search for all occurrences

Definition at line 557 of file qatomic_alpha.h.

    {
        return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0;
    }

Q_INLINE_TEMPLATE bool testAndSetRelease | ( | T * | expectedValue,
|  | T * | newValue
| ) |  |

Search for all occurrences

Definition at line 563 of file qatomic_alpha.h.

    {
        return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0;
    }

Q_INLINE_TEMPLATE bool testAndSetOrdered | ( | T * | expectedValue,
|  | T * | newValue
| ) |  |

Search for all occurrences

Definition at line 621 of file qatomic_alpha.h.

    {
        return testAndSetAcquire(expectedValue, newValue);
    }

Q_INLINE_TEMPLATE bool isFetchAndStoreNative | ( |  | ) | `[static]`

Search for all occurrences

Definition at line 89 of file qatomic_alpha.h.

    { return true; }

Q_INLINE_TEMPLATE bool isFetchAndStoreWaitFree | ( |  | ) | `[static]`

Search for all occurrences

Definition at line 92 of file qatomic_alpha.h.

    { return false; }

Q_INLINE_TEMPLATE T * fetchAndStoreRelaxed | ( | T * | newValue | ) |

Search for all occurrences

Definition at line 569 of file qatomic_alpha.h.

    {
        return reinterpret_cast<T *>(q_atomic_set_ptr(&_q_value, newValue));
    }

Q_INLINE_TEMPLATE T * fetchAndStoreAcquire | ( | T * | newValue | ) |

Search for all occurrences

Definition at line 575 of file qatomic_alpha.h.

    {
        return reinterpret_cast<T *>(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue));
    }

Q_INLINE_TEMPLATE T * fetchAndStoreRelease | ( | T * | newValue | ) |

Search for all occurrences

Definition at line 581 of file qatomic_alpha.h.

    {
        return reinterpret_cast<T *>(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue));
    }

Q_INLINE_TEMPLATE T * fetchAndStoreOrdered | ( | T * | newValue | ) |

Search for all occurrences

Definition at line 627 of file qatomic_alpha.h.

    {
        return fetchAndStoreAcquire(newValue);
    }

Q_INLINE_TEMPLATE bool isFetchAndAddNative | ( |  | ) | `[static]`

Search for all occurrences

Definition at line 98 of file qatomic_alpha.h.

    { return true; }

Q_INLINE_TEMPLATE bool isFetchAndAddWaitFree | ( |  | ) | `[static]`

Search for all occurrences

Definition at line 101 of file qatomic_alpha.h.

    { return false; }

Q_INLINE_TEMPLATE T * fetchAndAddRelaxed | ( | qptrdiff | valueToAdd | ) |

Search for all occurrences

Definition at line 587 of file qatomic_alpha.h.

    {
        return reinterpret_cast<T *>(q_atomic_fetch_and_add_ptr(&_q_value, newValue));
    }

Q_INLINE_TEMPLATE T * fetchAndAddAcquire | ( | qptrdiff | valueToAdd | ) |

Search for all occurrences

Definition at line 592 of file qatomic_alpha.h.

    {
        return reinterpret_cast<T *>(q_atomic_fetch_and_add_acquire_ptr(&_q_value, newValue));
    }

Q_INLINE_TEMPLATE T * fetchAndAddRelease | ( | qptrdiff | valueToAdd | ) |

Search for all occurrences

Definition at line 598 of file qatomic_alpha.h.

    {
        return reinterpret_cast<T *>(q_atomic_fetch_and_add_release_ptr(&_q_value, newValue));
    }

Q_INLINE_TEMPLATE T * fetchAndAddOrdered | ( | qptrdiff | valueToAdd | ) |

Search for all occurrences

Definition at line 633 of file qatomic_alpha.h.

    {
        return fetchAndAddAcquire(valueToAdd);
    }

## Member Data Documentation

T* volatile _q_value

Search for all occurrences

Definition at line 148 of file qbasicatomic.h.

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

- QtCore/qbasicatomic.h
- QtCore/qatomic_alpha.h
- QtCore/qatomic_arm.h
- QtCore/qatomic_armv6.h
- QtCore/qatomic_avr32.h
- QtCore/qatomic_bfin.h
- QtCore/qatomic_bootstrap.h
- QtCore/qatomic_generic.h
- QtCore/qatomic_i386.h
- QtCore/qatomic_ia64.h
- QtCore/qatomic_mips.h
- QtCore/qatomic_parisc.h
- QtCore/qatomic_powerpc.h
- QtCore/qatomic_s390.h
- QtCore/qatomic_sh.h
- QtCore/qatomic_sh4a.h
- QtCore/qatomic_sparc.h
- QtCore/qatomic_symbian.h
- QtCore/qatomic_vxworks.h
- QtCore/qatomic_x86_64.h