Utils::Memory::SharedDataPointer Class Reference

#include <SharedData.h> [code]

Collaboration diagram for Utils::Memory::SharedDataPointer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Pointer to implicitly shared data.

R1 Store a pointer to implicitly shared data. The pointer should automatically detach itself form the shared data and make a copy if the shared data is used in non-const context.

U1 You need a pointer to automatically manage reference counting for your SharedData derived class.

Declare a member of class SharedDataPointer in your base class and initize it with a pointer to a private object passed from the derived class. You don't need to implement copy ctor or assignment operator for your class.

Definition at line 100 of file SharedData.h.

Public Member Functions

void detach ()
SharedDataoperator * ()
const SharedDataoperator * () const
SharedDataoperator-> ()
const SharedDataoperator-> () const
 operator SharedData * ()
 operator const SharedData * () const
SharedDatadata ()
const SharedDatadata () const
const SharedDataconstData () const
bool operator== (const SharedDataPointer &other) const
bool operator!= (const SharedDataPointer &other) const
 SharedDataPointer ()
 ~SharedDataPointer ()
 SharedDataPointer (SharedData *data)
 SharedDataPointer (const SharedDataPointer &o)
SharedDataPointeroperator= (const SharedDataPointer &o)
SharedDataPointeroperator= (SharedData *o)
bool operator! () const

Private Member Functions

void detach_helper ()

Private Attributes

SharedDatad


Constructor & Destructor Documentation

Utils::Memory::SharedDataPointer::SharedDataPointer  )  [inline]
 

Definition at line 117 of file SharedData.h.

Utils::Memory::SharedDataPointer::~SharedDataPointer  )  [inline]
 

Definition at line 118 of file SharedData.h.

Utils::Memory::SharedDataPointer::SharedDataPointer SharedData data  )  [inline, explicit]
 

Definition at line 151 of file SharedData.h.

Utils::Memory::SharedDataPointer::SharedDataPointer const SharedDataPointer o  )  [inline]
 

Definition at line 121 of file SharedData.h.


Member Function Documentation

const SharedData* Utils::Memory::SharedDataPointer::constData  )  const [inline]
 

Definition at line 112 of file SharedData.h.

const SharedData* Utils::Memory::SharedDataPointer::data  )  const [inline]
 

Definition at line 111 of file SharedData.h.

SharedData* Utils::Memory::SharedDataPointer::data  )  [inline]
 

Definition at line 110 of file SharedData.h.

void Utils::Memory::SharedDataPointer::detach  )  [inline]
 

Definition at line 103 of file SharedData.h.

void Utils::Memory::SharedDataPointer::detach_helper  )  [inline, private]
 

Definition at line 154 of file SharedData.h.

const SharedData& Utils::Memory::SharedDataPointer::operator *  )  const [inline]
 

Definition at line 105 of file SharedData.h.

SharedData& Utils::Memory::SharedDataPointer::operator *  )  [inline]
 

Definition at line 104 of file SharedData.h.

Utils::Memory::SharedDataPointer::operator const SharedData *  )  const [inline]
 

Definition at line 109 of file SharedData.h.

Utils::Memory::SharedDataPointer::operator SharedData *  )  [inline]
 

Definition at line 108 of file SharedData.h.

bool Utils::Memory::SharedDataPointer::operator!  )  const [inline]
 

Definition at line 143 of file SharedData.h.

bool Utils::Memory::SharedDataPointer::operator!= const SharedDataPointer other  )  const [inline]
 

Definition at line 115 of file SharedData.h.

const SharedData* Utils::Memory::SharedDataPointer::operator->  )  const [inline]
 

Definition at line 107 of file SharedData.h.

SharedData* Utils::Memory::SharedDataPointer::operator->  )  [inline]
 

Definition at line 106 of file SharedData.h.

SharedDataPointer& Utils::Memory::SharedDataPointer::operator= SharedData o  )  [inline]
 

Definition at line 132 of file SharedData.h.

SharedDataPointer& Utils::Memory::SharedDataPointer::operator= const SharedDataPointer o  )  [inline]
 

Definition at line 122 of file SharedData.h.

bool Utils::Memory::SharedDataPointer::operator== const SharedDataPointer other  )  const [inline]
 

Definition at line 114 of file SharedData.h.


Member Data Documentation

SharedData* Utils::Memory::SharedDataPointer::d [private]
 

Definition at line 148 of file SharedData.h.


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