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

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends

# Basic< T > Class Template Reference

Search for all occurrences

## Detailed Description

### template<class T>
class QtSharedPointer::Basic< T >

Definition at line 122 of file qsharedpointer_impl.h.

`#include <qsharedpointer_impl.h>`

Inheritance diagram for Basic< T >:
[legend]

List of all members.

## Public Types
typedef T | Type
typedef T | element_type
typedef T | value_type
typedef value_type * | pointer
typedef const value_type * | const_pointer
typedef value_type & | reference
typedef const value_type & | const_reference
typedef qptrdiff | difference_type
## Public Member Functions
T * | data () const
bool | isNull () const
| operator RestrictedBool () const
bool | operator! () const
T & | operator* () const
T * | operator-> () const
## Protected Member Functions
| Basic (T *ptr=0)
| Basic (Qt::Initialization)
void | internalConstruct (T *ptr)
## Protected Attributes
Type * | value
## Friends
template<class X >
class | QT_PREPEND_NAMESPACE (QWeakPointer)

## Member Typedef Documentation

typedef T Type

Search for all occurrences

Definition at line 128 of file qsharedpointer_impl.h.

typedef T element_type

Search for all occurrences

Definition at line 129 of file qsharedpointer_impl.h.

typedef T value_type

Search for all occurrences

Definition at line 130 of file qsharedpointer_impl.h.

typedef value_type* pointer

Search for all occurrences

Definition at line 131 of file qsharedpointer_impl.h.

typedef const value_type* const_pointer

Search for all occurrences

Definition at line 132 of file qsharedpointer_impl.h.

typedef value_type& reference

Search for all occurrences

Definition at line 133 of file qsharedpointer_impl.h.

typedef const value_type& const_reference

Search for all occurrences

Definition at line 134 of file qsharedpointer_impl.h.

typedef qptrdiff difference_type

Search for all occurrences

Definition at line 135 of file qsharedpointer_impl.h.

## Constructor & Destructor Documentation

Basic | ( | T * | ptr = `0` | ) | `[inline, protected]`

Definition at line 149 of file qsharedpointer_impl.h.

    : value(ptr) { }

Basic | ( | Qt::Initialization |  | ) | `[inline, protected]`

Definition at line 150 of file qsharedpointer_impl.h.

    { }

## Member Function Documentation

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

Search for all occurrences

Definition at line 137 of file qsharedpointer_impl.h.

    { return value; }

bool isNull | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 138 of file qsharedpointer_impl.h.

    { return !data(); }

operator RestrictedBool | ( |  | ) | const `[inline]`

Definition at line 140 of file qsharedpointer_impl.h.

    { return isNull() ? 0 : &Basic::value; }

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

Definition at line 144 of file qsharedpointer_impl.h.

    { return isNull(); }

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

Definition at line 145 of file qsharedpointer_impl.h.

    { return *data(); }

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

Definition at line 146 of file qsharedpointer_impl.h.

    { return data(); }

void internalConstruct | ( | T * | ptr | ) | `[inline, protected]`

Search for all occurrences

Reimplemented in ExternalRefCount< T >, and ExternalRefCount< mudbox::BrushOperation >.

Definition at line 153 of file qsharedpointer_impl.h.

            {
                value = ptr;
            }

## Friends And Related Function Documentation

class QT_PREPEND_NAMESPACE | ( | QWeakPointer |  | ) | `[friend]`

Search for all occurrences

Reimplemented in ExternalRefCount< T >, and ExternalRefCount< mudbox::BrushOperation >.

## Member Data Documentation

Type* value `[protected]`

Search for all occurrences

Definition at line 164 of file qsharedpointer_impl.h.

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

- QtCore/qsharedpointer_impl.h