OpendTect
7.0
|
Public Member Functions | |
Counter () | |
Counter (const Counter &a) | |
void | addObserver (WeakPtrBase *obj) |
void | clearAllObservers () |
std::int32_t | count () const |
void | ref () |
bool | refIfReffed () |
Don't use in production, for debugging. More... | |
void | removeObserver (WeakPtrBase *obj) |
bool | tryRef () |
bool | unRef () |
void | unRefDontInvalidate () |
Will allow it to go to zero. More... | |
Static Public Member Functions | |
static std::int32_t | cInvalidRefCount () |
static std::int32_t | cStartRefCount () |
Private Attributes | |
Threads::Atomic< std::int32_t > | count_ |
ObjectSet< WeakPtrBase > | observers_ |
Threads::SpinLock | observerslock_ |
Actual implementation of the reference counting. Normally not used by application developers.
<>
RefCount::Counter::Counter | ( | ) |
RefCount::Counter::Counter | ( | const Counter & | a | ) |
void RefCount::Counter::addObserver | ( | WeakPtrBase * | obj | ) |
|
static |
void RefCount::Counter::clearAllObservers | ( | ) |
|
inline |
|
static |
void RefCount::Counter::ref | ( | ) |
bool RefCount::Counter::refIfReffed | ( | ) |
Don't use in production, for debugging.
void RefCount::Counter::removeObserver | ( | WeakPtrBase * | obj | ) |
bool RefCount::Counter::tryRef | ( | ) |
Refs if not invalid. Note that you have to have guarantees that object is not dead. *.
bool RefCount::Counter::unRef | ( | ) |
Unref to zero will set it to an deleted state, and return true.
void RefCount::Counter::unRefDontInvalidate | ( | ) |
Will allow it to go to zero.
|
private |
|
private |
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024