DGtal
0.6.devel
|
#include <CowPtr.h>
Public Types | |
typedef T | element_type |
Public Member Functions | |
CowPtr (T *p=0) throw () | |
CowPtr (const CowPtr &r) throw () | |
CowPtr (const CountedPtr< T > &r) | |
CowPtr & | operator= (const CowPtr &r) |
const T & | operator* () const throw () |
const T * | operator-> () const throw () |
const T * | get () const throw () |
T & | operator* () |
T * | operator-> () |
T * | get () |
unsigned int | count () const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Member Functions | |
void | copy () |
Private Attributes | |
CountedPtr< T > | myPtr |
Aim: Copy on write shared pointer.
Description of template class 'CowPtr'
Use reference counting as long as the pointed object is not modified. When it is about to be modified, copy it and modify the copy.
typedef T DGtal::CowPtr< T >::element_type |
|
inlineexplicit |
|
inline |
|
inline |
|
inlineprivate |
Definition at line 110 of file CowPtr.h.
Referenced by DGtal::CowPtr< TImageContainer >::get(), DGtal::CowPtr< TImageContainer >::operator*(), and DGtal::CowPtr< TImageContainer >::operator->().
|
inline |
|
inline |
|
inline |
|
inline |
Checks the validity/consistency of the object.
Definition at line 64 of file CowPtr.ih.
Referenced by DGtal::Image< TImageContainer >::isValid().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 106 of file CowPtr.h.
Referenced by DGtal::CowPtr< TImageContainer >::copy(), DGtal::CowPtr< TImageContainer >::count(), DGtal::CowPtr< TImageContainer >::get(), DGtal::CowPtr< TImageContainer >::operator*(), DGtal::CowPtr< TImageContainer >::operator->(), and DGtal::CowPtr< TImageContainer >::operator=().