UniqueRefHandler Class Reference

#include <baseref.h>

Detailed Description

UniqueRefHandler can be used as template argument for BaseRef to obtain a reference to an object which exclusively owns the object and, thus, deletes it on destruction or reset. The easiest way to make use of UniqueRefHandler is to use the UniqueRef template which is a BaseRef with UniqueRefHandler argument.

Static Public Member Functions

template<typename T >
static void InitialReference (const T *o)
 
template<typename T >
static void AddReference (const T *o)
 
template<typename T >
static void RemoveReference (const T *o)
 
template<typename T >
static void AddWeakReference (const T *o, WeakRefBase &weakRef)
 
template<typename T >
static void ChangeTarget (T *&o, T *n)
 
template<typename T >
static void ChangeTarget (T *&o, ResultPtr< T > newTarget)
 
template<typename T >
static void MoveTarget (T *&srcReference, T *&dstReference)
 
template<typename R >
static ResultRef< typename R::ReferencedType > MakeWritable (R &ref, Bool resetOnError)
 

Static Public Attributes

static const VALUEKIND KIND
 

Member Function Documentation

◆ InitialReference()

static void InitialReference ( const T *  o)
static

◆ AddReference()

static void AddReference ( const T *  o)
static

◆ RemoveReference()

void RemoveReference ( const T *  o)
static

◆ AddWeakReference()

static void AddWeakReference ( const T *  o,
WeakRefBase weakRef 
)
static

◆ ChangeTarget() [1/2]

static void ChangeTarget ( T *&  o,
T *  n 
)
static

◆ ChangeTarget() [2/2]

static void ChangeTarget ( T *&  o,
ResultPtr< T >  newTarget 
)
static

◆ MoveTarget()

static void MoveTarget ( T *&  srcReference,
T *&  dstReference 
)
static

◆ MakeWritable()

static ResultRef<typename R::ReferencedType> MakeWritable ( R &  ref,
Bool  resetOnError 
)
static

Member Data Documentation

◆ KIND

const VALUEKIND KIND
static