OpendTect  7.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
RefCount::Referenced Class Reference
Inheritance diagram for RefCount::Referenced:
[legend]

Public Member Functions

void addObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
int nrRefs () const
 Only for expert use. More...
 
void ref () const
 
bool refIfReffed () const
 Don't use in production, for debugging. More...
 
void removeObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
bool tryRef () const
 Not for normal use. May become private. More...
 
void unRef () const
 
void unRefNoDelete () const
 

Static Public Member Functions

static bool isSane (const Referenced *)
 

Protected Member Functions

 Referenced ()
 
 Referenced (const Referenced &)
 
virtual ~Referenced ()
 
Referencedoperator= (const Referenced &)
 

Private Member Functions

virtual void prepareForDelete ()
 
virtual void refNotify () const
 
virtual void unRefNoDeleteNotify () const
 
virtual void unRefNotify () const
 

Private Attributes

const std::uint64_t magicnumber_ = 0x123456789abcdef
 
Counter refcount_
 

Friends

class WeakPtrBase
 

Detailed Description

Base class for reference counted object. Inhereit and refcounting will be enabled. Ensure to make your destructor protected to enforce correct usage.

<>

Constructor & Destructor Documentation

◆ Referenced() [1/2]

RefCount::Referenced::Referenced ( )
inlineprotected

◆ Referenced() [2/2]

RefCount::Referenced::Referenced ( const Referenced )
protected

◆ ~Referenced()

virtual RefCount::Referenced::~Referenced ( )
protectedvirtual

Member Function Documentation

◆ addObserver()

void RefCount::Referenced::addObserver ( WeakPtrBase obs)

Not for normal use. May become private.

◆ isSane()

static bool RefCount::Referenced::isSane ( const Referenced )
static

◆ nrRefs()

int RefCount::Referenced::nrRefs ( ) const

Only for expert use.

◆ operator=()

Referenced& RefCount::Referenced::operator= ( const Referenced )
protected

◆ prepareForDelete()

virtual void RefCount::Referenced::prepareForDelete ( )
inlineprivatevirtual

Reimplemented in Well::Data, and EM::EMObject.

◆ ref()

void RefCount::Referenced::ref ( ) const

◆ refIfReffed()

bool RefCount::Referenced::refIfReffed ( ) const

Don't use in production, for debugging.

◆ refNotify()

virtual void RefCount::Referenced::refNotify ( ) const
inlineprivatevirtual

Reimplemented in Pick::Set.

◆ removeObserver()

void RefCount::Referenced::removeObserver ( WeakPtrBase obs)

Not for normal use. May become private.

◆ tryRef()

bool RefCount::Referenced::tryRef ( ) const

Not for normal use. May become private.

◆ unRef()

void RefCount::Referenced::unRef ( ) const

◆ unRefNoDelete()

void RefCount::Referenced::unRefNoDelete ( ) const

◆ unRefNoDeleteNotify()

virtual void RefCount::Referenced::unRefNoDeleteNotify ( ) const
inlineprivatevirtual

◆ unRefNotify()

virtual void RefCount::Referenced::unRefNotify ( ) const
inlineprivatevirtual

Reimplemented in Pick::Set.

Friends And Related Function Documentation

◆ WeakPtrBase

friend class WeakPtrBase
friend

Member Data Documentation

◆ magicnumber_

const std::uint64_t RefCount::Referenced::magicnumber_ = 0x123456789abcdef
private

◆ refcount_

Counter RefCount::Referenced::refcount_
mutableprivate

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