cartobase 6.0.20
carto::ref< T > Class Template Reference

A ref is a const_ref which can reference non constant objects. More...

#include <cartobase/smart/rcptr.h>

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

Public Types

typedef T referenced_type
Public Types inherited from carto::const_ref< T >
typedef T referenced_type

Public Member Functions

 ref ()
 ref (T *pObject)
 ref (T *pObject, bool externalowner)
template<class U>
 ref (std::unique_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::unique_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

Friends

template<class R>
class const_ref

Detailed Description

template<class T>
class carto::ref< T >

A ref is a const_ref which can reference non constant objects.

Definition at line 464 of file rcptr.h.

Member Typedef Documentation

◆ referenced_type

template<class T>
typedef T carto::ref< T >::referenced_type

Definition at line 470 of file rcptr.h.

Constructor & Destructor Documentation

◆ ref() [1/6]

template<class T>
carto::ref< T >::ref ( )
inline

◆ ref() [2/6]

template<class T>
carto::ref< T >::ref ( T * pObject)
inlineexplicit

Definition at line 478 of file rcptr.h.

References const_ref.

◆ ref() [3/6]

template<class T>
carto::ref< T >::ref ( T * pObject,
bool externalowner )
inlineexplicit

Definition at line 479 of file rcptr.h.

References const_ref.

◆ ref() [4/6]

template<class T>
template<class U>
carto::ref< T >::ref ( std::unique_ptr< U > && r)
inline

Definition at line 483 of file rcptr.h.

References const_ref.

◆ ref() [5/6]

template<class T>
carto::ref< T >::ref ( const ref< T > & other)
inline

Definition at line 485 of file rcptr.h.

References const_ref, and ref().

◆ ref() [6/6]

template<class T>
template<class R>
carto::ref< T >::ref ( const ref< R > & other)
inline

Definition at line 488 of file rcptr.h.

References const_ref, and ref().

◆ ~ref()

template<class T>
carto::ref< T >::~ref ( )
inline

Definition at line 490 of file rcptr.h.

Member Function Documentation

◆ operator*()

template<class T>
T & carto::ref< T >::operator* ( ) const
inline

Definition at line 505 of file rcptr.h.

◆ operator->()

template<class T>
T * carto::ref< T >::operator-> ( ) const
inline

Definition at line 501 of file rcptr.h.

◆ operator=()

template<class T>
ref< T > & carto::ref< T >::operator= ( const ref< T > & other)
inline

Definition at line 496 of file rcptr.h.

References carto::const_ref< T >::operator=(), and ref().

◆ pointer()

template<class T>
T * carto::ref< T >::pointer ( ) const
inline

◆ release()

template<class T>
T * carto::ref< T >::release ( )
inline

◆ const_ref

template<class T>
template<class R>
friend class const_ref
friend

Definition at line 466 of file rcptr.h.

References const_ref.

Referenced by const_ref, ref(), ref(), ref(), ref(), ref(), and ref().


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