cartobase  5.1.2
carto::rc_ptr< T > Class Template Reference

Reference-counting pointer. More...

#include <cartobase/smart/rcptr.h>

Inheritance diagram for carto::rc_ptr< T >:
Collaboration diagram for carto::rc_ptr< T >:

Classes

class  insipid
 

Public Member Functions

 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
 

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
 

Detailed Description

template<typename T>
class carto::rc_ptr< T >

Reference-counting pointer.

The contained object is deleted when no rc_ptr point to it anymore

Definition at line 639 of file rcptr.h.

Constructor & Destructor Documentation

◆ rc_ptr() [1/4]

template<typename T >
carto::rc_ptr< T >::rc_ptr ( )
inline

Definition at line 651 of file rcptr.h.

◆ rc_ptr() [2/4]

template<typename T >
carto::rc_ptr< T >::rc_ptr ( T *  p)
inlineexplicit

Definition at line 652 of file rcptr.h.

◆ rc_ptr() [3/4]

template<typename T >
carto::rc_ptr< T >::rc_ptr ( T *  p,
bool  externalowner 
)
inlineexplicit

Definition at line 653 of file rcptr.h.

◆ rc_ptr() [4/4]

template<typename T >
template<class U >
carto::rc_ptr< T >::rc_ptr ( std::auto_ptr< U >  r)
inline

Definition at line 661 of file rcptr.h.

Member Function Documentation

◆ get()

◆ operator insipid *()

template<typename T >
carto::rc_ptr< T >::operator insipid * ( ) const
inline

Definition at line 672 of file rcptr.h.

References carto::ref< T >::pointer().

◆ operator<()

template<typename T >
bool carto::rc_ptr< T >::operator< ( const rc_ptr< T > &  other) const
inline

Definition at line 667 of file rcptr.h.

References carto::ref< T >::pointer().

◆ reset()

template<typename T >
void carto::rc_ptr< T >::reset ( T *  p = NULL)
inline

Definition at line 664 of file rcptr.h.

Referenced by carto::shared_ptr< T >::reset(), and carto::weak_shared_ptr< T >::reset().


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