|
cartobase
4.7.0
|
A multi-purpose general smart pointer, which can act as either a rc_ptr, a weak_ptr or a weak_shared_ptr. More...
#include <cartobase/smart/sharedptr.h>


Public Types | |
| enum | ReferenceType { Strong, WeakShared, Weak } |
Public Types inherited from carto::ref< T > | |
| typedef T | referenced_type |
Public Types inherited from carto::const_ref< T > | |
| typedef T | referenced_type |
Public Member Functions | |
| shared_ptr (ReferenceType t=Weak, T *x=0, bool externalowner=false) | |
| shared_ptr (const shared_ptr< T > &x) | |
| shared_ptr (const weak_shared_ptr< T > &x) | |
| shared_ptr (const rc_ptr< T > &x) | |
| shared_ptr (const weak_ptr< T > &x) | |
| ~shared_ptr () | |
| bool | operator== (const shared_ptr< T > &x) const |
| bool | operator== (const 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 shared_ptr< T > &x) const |
| bool | operator!= (const 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 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 |
| shared_ptr< T > & | operator= (const shared_ptr< T > &x) |
| shared_ptr< T > & | operator= (const weak_shared_ptr< T > &x) |
| shared_ptr< T > & | operator= (const rc_ptr< T > &x) |
| shared_ptr< T > & | operator= (const weak_ptr< T > &x) |
| T * | release () |
| void | reset (ReferenceType t, T *r=0) |
| ReferenceType | referenceType () const |
Public Member Functions inherited from carto::weak_shared_ptr< T > | |
| 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 |
A multi-purpose general smart pointer, which can act as either a rc_ptr, a weak_ptr or a weak_shared_ptr.
As the behaviour is stored as an instance variable, this pointer is a bit less light-weight than the lower-level smart pointers it emulates.
Definition at line 152 of file sharedptr.h.
| enum carto::shared_ptr::ReferenceType |
| Enumerator | |
|---|---|
| Strong | |
| WeakShared | |
| Weak | |
Definition at line 155 of file sharedptr.h.
|
inlineexplicit |
Definition at line 354 of file sharedptr.h.
References carto::weak_shared_ptr< T >::release(), carto::weak_ptr< T >::reset(), carto::shared_ptr< T >::Strong, carto::shared_ptr< T >::Weak, and carto::shared_ptr< T >::WeakShared.
|
inline |
Definition at line 375 of file sharedptr.h.
References carto::weak_shared_ptr< T >::get(), carto::shared_ptr< T >::referenceType(), carto::weak_ptr< T >::reset(), carto::shared_ptr< T >::Strong, carto::shared_ptr< T >::Weak, and carto::shared_ptr< T >::WeakShared.
|
inline |
Definition at line 396 of file sharedptr.h.
|
inline |
Definition at line 404 of file sharedptr.h.
|
inline |
Definition at line 414 of file sharedptr.h.
References carto::weak_ptr< T >::get(), carto::weak_shared_ptr< T >::release(), and carto::weak_ptr< T >::reset().
|
inline |
Definition at line 424 of file sharedptr.h.
References carto::shared_ptr< T >::referenceType(), carto::shared_ptr< T >::release(), carto::shared_ptr< T >::Strong, carto::shared_ptr< T >::Weak, and carto::shared_ptr< T >::WeakShared.
|
inline |
Definition at line 180 of file sharedptr.h.
References carto::weak_ptr< T >::operator!=().
|
inline |
Definition at line 182 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 184 of file sharedptr.h.
References carto::weak_ptr< T >::get(), and carto::rc_ptr< T >::get().
|
inline |
Definition at line 186 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 188 of file sharedptr.h.
References carto::weak_shared_ptr< T >::get(), and carto::weak_ptr< T >::get().
|
inline |
Definition at line 190 of file sharedptr.h.
References carto::weak_ptr< T >::operator<().
|
inline |
Definition at line 192 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 194 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 196 of file sharedptr.h.
References carto::weak_ptr< T >::get(), and carto::SharedObject::operator=().
|
inline |
Definition at line 453 of file sharedptr.h.
References carto::shared_ptr< T >::reset().
|
inline |
Definition at line 463 of file sharedptr.h.
References carto::shared_ptr< T >::reset(), and carto::shared_ptr< T >::WeakShared.
|
inline |
Definition at line 472 of file sharedptr.h.
References carto::rc_ptr< T >::get(), carto::shared_ptr< T >::reset(), and carto::shared_ptr< T >::Strong.
|
inline |
Definition at line 481 of file sharedptr.h.
References carto::weak_ptr< T >::get(), carto::shared_ptr< T >::reset(), and carto::shared_ptr< T >::Weak.
|
inline |
Definition at line 170 of file sharedptr.h.
References carto::weak_ptr< T >::operator==().
|
inline |
Definition at line 172 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 174 of file sharedptr.h.
References carto::weak_ptr< T >::get(), and carto::rc_ptr< T >::get().
|
inline |
Definition at line 176 of file sharedptr.h.
References carto::weak_ptr< T >::get().
|
inline |
Definition at line 178 of file sharedptr.h.
References carto::weak_shared_ptr< T >::get(), and carto::weak_ptr< T >::get().
|
inline |
Definition at line 444 of file sharedptr.h.
Referenced by carto::shared_ptr< T >::release(), carto::shared_ptr< T >::reset(), carto::shared_ptr< T >::shared_ptr(), and carto::shared_ptr< T >::~shared_ptr().
|
inline |
Definition at line 490 of file sharedptr.h.
References carto::shared_ptr< T >::referenceType(), carto::weak_ptr< T >::release(), carto::shared_ptr< T >::Weak, and carto::shared_ptr< T >::WeakShared.
Referenced by carto::shared_ptr< T >::~shared_ptr().
|
inline |
Definition at line 503 of file sharedptr.h.
References carto::shared_ptr< T >::referenceType(), carto::weak_ptr< T >::reset(), carto::weak_shared_ptr< T >::reset(), carto::rc_ptr< T >::reset(), carto::shared_ptr< T >::Strong, carto::shared_ptr< T >::Weak, and carto::shared_ptr< T >::WeakShared.
Referenced by carto::shared_ptr< T >::operator=().