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

- Class List
- Class Hierarchy
- Class Members

Public Types | Static Public Member Functions | Public Attributes

# ExternalRefCountWithContiguousData< T > Struct Template Reference

Search for all occurrences

## Detailed Description

### template<class T>
struct QtSharedPointer::ExternalRefCountWithContiguousData< T >

Definition at line 277 of file qsharedpointer_impl.h.

`#include <qsharedpointer_impl.h>`

Inheritance diagram for ExternalRefCountWithContiguousData< T >:
[legend]

List of all members.

## Public Types
typedef ExternalRefCountWithDestroyFn | Parent
## Static Public Member Functions
static void | deleter (ExternalRefCountData *self)
static void | safetyCheckDeleter (ExternalRefCountData *self)
static ExternalRefCountData * | create (T **ptr)
## Public Attributes
T | data

## Member Typedef Documentation

typedef ExternalRefCountWithDestroyFn Parent

Search for all occurrences

Definition at line 279 of file qsharedpointer_impl.h.

## Member Function Documentation

static void deleter | ( | ExternalRefCountData * | self | ) | `[inline, static]`

Search for all occurrences

Definition at line 282 of file qsharedpointer_impl.h.

            {
                ExternalRefCountWithContiguousData *that =
                        static_cast<ExternalRefCountWithContiguousData *>(self);
                that->data.~T();
            }

static void safetyCheckDeleter | ( | ExternalRefCountData * | self | ) | `[inline, static]`

Search for all occurrences

Definition at line 288 of file qsharedpointer_impl.h.

            {
                internalSafetyCheckRemove2(self);
                deleter(self);
            }

static ExternalRefCountData* create | ( | T ** | ptr | ) | `[inline, static]`

Search for all occurrences

Definition at line 294 of file qsharedpointer_impl.h.

            {
    # ifdef QT_SHAREDPOINTER_TRACK_POINTERS
                DestroyerFn destroy = &safetyCheckDeleter;
    # else
                DestroyerFn destroy = &deleter;
    # endif
                ExternalRefCountWithContiguousData *d =
                    static_cast<ExternalRefCountWithContiguousData *>(::operator new(sizeof(ExternalRefCountWithContiguousData)));

                // initialize the d-pointer sub-object
                // leave d->data uninitialized
                new (d) Parent(destroy); // can't throw

                *ptr = &d->data;
                return d;
            }

## Member Data Documentation

T data

Search for all occurrences

Definition at line 280 of file qsharedpointer_impl.h.

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

- QtCore/qsharedpointer_impl.h