cartobase
5.0.5
|
weak_shared_ptr: increments a reference count, is told and becomes null whenever the shared object is deleted externally. More...
#include <cartobase/smart/sharedptr.h>
Public Member Functions | |
weak_shared_ptr (T *x=0, bool externalowner=false) | |
weak_shared_ptr (const weak_shared_ptr< T > &x) | |
weak_shared_ptr (const rc_ptr< T > &x) | |
weak_shared_ptr (const weak_ptr< T > &x) | |
~weak_shared_ptr () | |
T * | get () const |
bool | operator== (const T *x) const |
bool | operator== (const weak_shared_ptr< T > &x) const |
bool | operator== (const rc_ptr< T > &x) const |
bool | operator== (const weak_ptr< T > &x) const |
bool | operator!= (const T *x) const |
bool | operator!= (const weak_shared_ptr< T > &x) const |
bool | operator!= (const rc_ptr< T > &x) const |
bool | operator!= (const weak_ptr< T > &x) const |
bool | operator< (const weak_shared_ptr< T > &x) const |
bool | operator< (const rc_ptr< T > &x) const |
bool | operator< (const weak_ptr< T > &x) const |
T & | operator* () const |
T * | operator-> () const |
weak_shared_ptr< T > & | operator= (const weak_shared_ptr< T > &x) |
weak_shared_ptr< T > & | operator= (const rc_ptr< T > &x) |
weak_shared_ptr< T > & | operator= (const weak_ptr< T > &x) |
T * | release () |
void | reset (T *r=0) |
Public Member Functions inherited from carto::rc_ptr< T > | |
rc_ptr () | |
rc_ptr (T *p) | |
rc_ptr (T *p, bool externalowner) | |
template<class U > | |
rc_ptr (std::auto_ptr< U > r) | |
void | reset (T *p=NULL) |
T * | get () const |
bool | operator< (const rc_ptr< T > &other) const |
operator insipid * () const | |
Public Member Functions inherited from carto::ref< T > | |
ref () | |
ref (T *pObject) | |
ref (T *pObject, bool externalowner) | |
template<class U > | |
ref (std::auto_ptr< U > r) | |
ref (const ref< T > &other) | |
template<class R > | |
ref (const ref< R > &other) | |
~ref () | |
T * | release () |
ref< T > & | operator= (const ref< T > &other) |
T * | operator-> () const |
T & | operator* () const |
T * | pointer () const |
Public Member Functions inherited from carto::const_ref< T > | |
const_ref () | |
const_ref (const T *pObject) | |
const_ref (const T *pObject, bool externalowner) | |
template<class U > | |
const_ref (std::auto_ptr< U > r) | |
const_ref (const ref< T > &other) | |
const_ref (const const_ref< T > &other) | |
template<class R > | |
const_ref (const ref< R > &o) | |
template<class R > | |
const_ref (const const_ref< R > &other) | |
~const_ref () | |
const_ref< T > & | operator= (const ref< T > &other) |
const_ref< T > & | operator= (const const_ref< T > &other) |
bool | isNull () const |
bool | operator== (const ref< T > &other) const |
bool | operator== (const T *pointer) const |
bool | operator== (const const_ref< T > &other) const |
bool | operator!= (const ref< T > &other) const |
bool | operator!= (const const_ref< T > &other) const |
bool | operator!= (const T *pointer) const |
const T * | operator-> () const |
const T & | operator* () const |
const T * | pointer () const |
int | refCount () const |
Public Member Functions inherited from carto::RefData< T > | |
int | count () const |
Public Member Functions inherited from carto::weak_ptr< T > | |
weak_ptr (T *p=0) | |
void | reset (T *r=0) |
template<typename Y > | |
weak_ptr (const weak_ptr< Y > &r) | |
template<typename Y > | |
weak_ptr (const rc_ptr< Y > &r) | |
template<typename Y > | |
weak_ptr (const std::unique_ptr< Y > &r) | |
template<typename Y > | |
weak_ptr & | operator= (const weak_ptr< Y > &r) |
template<typename Y > | |
weak_ptr & | operator= (const rc_ptr< Y > &r) |
template<typename Y > | |
weak_ptr & | operator= (const std::unique_ptr< Y > &r) |
weak_ptr (const weak_ptr &r) | |
weak_ptr & | operator= (const weak_ptr &w) |
~weak_ptr () | |
operator InsipidProxyPointer * () const | |
T & | operator* () const |
T * | operator-> () const |
T * | get () const |
T * | release () |
bool | operator== (const weak_ptr< T > &x) const |
bool | operator== (const weak_shared_ptr< T > &x) const |
bool | operator== (const rc_ptr< T > &x) const |
bool | operator== (const shared_ptr< T > &x) const |
bool | operator!= (const weak_ptr< T > &x) const |
bool | operator!= (const weak_shared_ptr< T > &x) const |
bool | operator!= (const rc_ptr< T > &x) const |
bool | operator!= (const shared_ptr< T > &x) const |
bool | operator< (const weak_ptr< T > &x) const |
bool | operator< (const weak_shared_ptr< T > &x) const |
bool | operator< (const shared_ptr< T > &x) const |
bool | operator< (const rc_ptr< T > &x) const |
Friends | |
class | WeakObject |
class | rc_ptr_trick |
Additional Inherited Members | |
Public Types inherited from carto::ref< T > | |
typedef T | referenced_type |
Public Types inherited from carto::const_ref< T > | |
typedef T | referenced_type |
weak_shared_ptr: increments a reference count, is told and becomes null whenever the shared object is deleted externally.
When the shared counter reaches 0, the shared object is deleted (standard rc_ptr behaviour). T must inherit SharedObject.
Definition at line 94 of file sharedptr.h.
|
inlineexplicit |
Definition at line 217 of file sharedptr.h.
|
inline |
Definition at line 231 of file sharedptr.h.
References carto::weak_shared_ptr< T >::get().
|
inline |
Definition at line 245 of file sharedptr.h.
References carto::rc_ptr< T >::get().
|
inline |
Definition at line 259 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 273 of file sharedptr.h.
References carto::rc_ptr< T >::reset().
|
inline |
Definition at line 103 of file sharedptr.h.
References carto::weak_ptr< T >::get().
Referenced by carto::shared_ptr< T >::operator!=(), carto::weak_ptr< T >::operator!=(), carto::shared_ptr< T >::operator==(), carto::weak_ptr< T >::operator==(), carto::shared_ptr< T >::shared_ptr(), and carto::weak_shared_ptr< T >::weak_shared_ptr().
|
inline |
Definition at line 113 of file sharedptr.h.
|
inline |
Definition at line 115 of file sharedptr.h.
References carto::weak_ptr< T >::operator!=().
|
inline |
Definition at line 117 of file sharedptr.h.
References carto::rc_ptr< T >::get().
|
inline |
Definition at line 119 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 127 of file sharedptr.h.
References carto::weak_ptr< T >::operator*().
|
inline |
Definition at line 129 of file sharedptr.h.
References carto::weak_ptr< T >::operator->(), and carto::SharedObject::operator=().
|
inline |
Definition at line 121 of file sharedptr.h.
References carto::weak_ptr< T >::operator<().
|
inline |
Definition at line 123 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 125 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 292 of file sharedptr.h.
References carto::weak_ptr< T >::operator=(), and carto::ref< T >::operator=().
|
inline |
Definition at line 314 of file sharedptr.h.
References carto::weak_shared_ptr< T >::reset().
weak_shared_ptr<T>& carto::weak_shared_ptr< T >::operator= | ( | const weak_ptr< T > & | x | ) |
|
inline |
Definition at line 105 of file sharedptr.h.
|
inline |
Definition at line 107 of file sharedptr.h.
References carto::weak_ptr< T >::operator==().
|
inline |
Definition at line 109 of file sharedptr.h.
References carto::rc_ptr< T >::get().
|
inline |
Definition at line 111 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 324 of file sharedptr.h.
References carto::weak_ptr< T >::release(), and carto::ref< T >::release().
Referenced by carto::shared_ptr< T >::shared_ptr().
|
inline |
Definition at line 335 of file sharedptr.h.
References carto::weak_ptr< T >::reset(), and carto::rc_ptr< T >::reset().
Referenced by carto::weak_shared_ptr< T >::operator=(), and carto::shared_ptr< T >::reset().
|
friend |
Definition at line 140 of file sharedptr.h.
|
friend |
Definition at line 139 of file sharedptr.h.