cartobase  4.5.0
carto::rc_ptr_trick Class Reference

rc_ptr_trick merely makes a public access to the reference counter inside a rc_ptr. More...

#include <cartobase/smart/rcptrtrick.h>

Static Public Member Functions

template<typename T >
static void releaseOwnership (rc_ptr< T > &)
 just increments the ref-counter of the underlying rc_ptr so that the rc_ptr will never delete the object in it (it doesn't own the object anymore) More...
 
static void releaseOwnership (RCObject &)
 
template<typename T >
static void restoreOwnership (rc_ptr< T > &)
 decrements the ref-counter More...
 
static void restoreOwnership (RCObject &)
 
template<typename T >
static RCObject::RefCounterTyperefCount (shared_ptr< T > &)
 allows complete read-write access to the counter More...
 
template<typename T >
static RCObject::RefCounterTyperefCount (rc_ptr< T > &)
 
static RCObject::RefCounterTyperefCount (RCObject &)
 
template<typename T >
static RCObject::RefCounterTypeweakCount (weak_shared_ptr< T > &)
 
static RCObject::RefCounterTypeweakCount (SharedObject &)
 

Detailed Description

rc_ptr_trick merely makes a public access to the reference counter inside a rc_ptr.

It is intended to be used only on low-level, hardly legal dirty operations, as its name tells. It is not intended to be used by normal programs, so just DON'T USE IT.

Definition at line 49 of file rcptrtrick.h.

Member Function Documentation

template<typename T >
RCObject::RefCounterType & carto::rc_ptr_trick::refCount ( shared_ptr< T > &  x)
inlinestatic

allows complete read-write access to the counter

Definition at line 105 of file rcptrtrick.h.

template<typename T >
RCObject::RefCounterType & carto::rc_ptr_trick::refCount ( rc_ptr< T > &  x)
inlinestatic

Definition at line 112 of file rcptrtrick.h.

RCObject::RefCounterType & carto::rc_ptr_trick::refCount ( RCObject x)
inlinestatic

Definition at line 118 of file rcptrtrick.h.

template<typename T >
void carto::rc_ptr_trick::releaseOwnership ( rc_ptr< T > &  x)
inlinestatic

just increments the ref-counter of the underlying rc_ptr so that the rc_ptr will never delete the object in it (it doesn't own the object anymore)

Definition at line 75 of file rcptrtrick.h.

void carto::rc_ptr_trick::releaseOwnership ( RCObject x)
inlinestatic

Definition at line 82 of file rcptrtrick.h.

template<typename T >
void carto::rc_ptr_trick::restoreOwnership ( rc_ptr< T > &  x)
inlinestatic

decrements the ref-counter

Definition at line 90 of file rcptrtrick.h.

void carto::rc_ptr_trick::restoreOwnership ( RCObject x)
inlinestatic

Definition at line 97 of file rcptrtrick.h.

template<typename T >
RCObject::RefCounterType & carto::rc_ptr_trick::weakCount ( weak_shared_ptr< T > &  x)
inlinestatic

Definition at line 126 of file rcptrtrick.h.

RCObject::RefCounterType & carto::rc_ptr_trick::weakCount ( SharedObject x)
inlinestatic

Definition at line 133 of file rcptrtrick.h.


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