OpendTect-6_4  6.4
Classes | Macros | Functions
refcount.h File Reference
Include dependency graph for refcount.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ReferenceCounter
 

Macros

#define mInvalidRefCount   (-1)
 
#define mRefCountImpl(ClassName)   mRefCountImplWithDestructor(ClassName, virtual ~ClassName(), delete this; );
 Macro to setup a class with destructor for reference counting. More...
 
#define mRefCountImplNoDestructor(ClassName)   mRefCountImplWithDestructor(ClassName, virtual ~ClassName() {}, delete this; );
 Macro to setup a class without destructor for reference counting. More...
 
#define mDeclareCounters   od_int32 oldcount = count_.get(), newcount;
 

Functions

template<class T >
void unRefAndZeroPtr (T *&ptr)
 Un-reference class pointer, and set it to zero. Works for null-pointers. More...
 
template<class T >
void unRefPtr (const T *ptr)
 
template<class T >
void unRefNoDeletePtr (const T *ptr)
 
template<class T >
void refPtr (const T *ptr)
 Reference class pointer. Works for null pointers. More...
 
template<class T >
void deepUnRef (ObjectSet< T > &os)
 
template<class T >
void deepUnRefNoDelete (ObjectSet< T > &os)
 
template<class T >
void deepRef (ObjectSet< T > &os)
 

Macro Definition Documentation

#define mDeclareCounters   od_int32 oldcount = count_.get(), newcount;
#define mInvalidRefCount   (-1)
#define mRefCountImpl (   ClassName)    mRefCountImplWithDestructor(ClassName, virtual ~ClassName(), delete this; );

Macro to setup a class with destructor for reference counting.

#define mRefCountImplNoDestructor (   ClassName)    mRefCountImplWithDestructor(ClassName, virtual ~ClassName() {}, delete this; );

Macro to setup a class without destructor for reference counting.

Function Documentation

template<class T >
void deepRef ( ObjectSet< T > &  os)
inline
template<class T >
void deepUnRef ( ObjectSet< T > &  os)
inline
template<class T >
void deepUnRefNoDelete ( ObjectSet< T > &  os)
inline
template<class T >
void refPtr ( const T *  ptr)
inline

Reference class pointer. Works for null pointers.

template<class T >
void unRefAndZeroPtr ( T *&  ptr)
inline

Un-reference class pointer, and set it to zero. Works for null-pointers.

template<class T >
void unRefNoDeletePtr ( const T *  ptr)
inline

Un-reference class pointer without delete. Works for null pointers.

template<class T >
void unRefPtr ( const T *  ptr)
inline

Un-reference class pointer. Works for null pointers.


Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019