23INLINE NodeCachedReferenceCount::
24NodeCachedReferenceCount() {
36INLINE NodeCachedReferenceCount::
50INLINE
void NodeCachedReferenceCount::
58 nassertv(_node_ref_count != -100);
60 CachedTypedWritableReferenceCount::operator = (copy);
70INLINE NodeCachedReferenceCount::
71~NodeCachedReferenceCount() {
78 nassertv(_node_ref_count != -100);
82 nassertv(_node_ref_count >= 0);
93 nassertv(_node_ref_count == 0);
99 _node_ref_count = -100;
152 return do_test_ref_count_integrity();
184INLINE
void NodeCachedReferenceCount::
185node_unref_only()
const {
193 nassertv(_node_ref_count > 0);
static bool dec(Integer &var)
Atomically decrements the indicated variable and returns true if the new value is nonzero,...
static void inc(Integer &var)
Atomically increments the indicated variable.
static Integer get(const Integer &var)
Atomically retrieves the snapshot value of the indicated variable.
This is a special extension to ReferenceCount that includes dual reference counts: the standard refer...
get_cache_ref_count
Returns the current reference count.
This class further specializes CachedTypedWritableReferenceCount to also add a node_ref_count,...
bool node_unref() const
Explicitly decrements the node reference count and the normal reference count simultaneously.
void node_ref() const
Explicitly increments the reference count.
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
int get_node_ref_count() const
Returns the current reference count.
int get_referenced_bits() const
Returns the union of the values defined in the Referenced enum that represents the various things tha...
void ref() const
Explicitly increments the reference count.
virtual bool unref() const
Explicitly decrements the reference count.