29 INLINE NodeCachedReferenceCount::
30 NodeCachedReferenceCount() {
44 INLINE NodeCachedReferenceCount::
62 INLINE
void NodeCachedReferenceCount::
64 nassertv(
this != NULL);
73 nassertv(_node_ref_count != -100);
75 CachedTypedWritableReferenceCount::operator = (copy);
89 INLINE NodeCachedReferenceCount::
90 ~NodeCachedReferenceCount() {
91 nassertv(
this != NULL);
100 nassertv(_node_ref_count != -100);
105 nassertv(_node_ref_count >= 0);
117 nassertv(_node_ref_count == 0);
123 _node_ref_count = -100;
186 return do_test_ref_count_integrity();
224 INLINE
void NodeCachedReferenceCount::
225 node_unref_only()
const {
233 nassertv(_node_ref_count > 0);
This class further specializes CachedTypedWritableReferenceCount to also add a node_ref_count, for the purposes of counting the number of times the object is referenced by a "node", presumably a PandaNode.
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
bool node_unref() const
Explicitly decrements the node reference count and the normal reference count simultaneously.
This is a special extension to ReferenceCount that includes dual reference counts: the standard refer...
int get_referenced_bits() const
Returns the union of the values defined in the Referenced enum that represents the various things tha...
int get_cache_ref_count() const
Returns the current reference count.
static void inc(Integer &var)
Atomically increments the indicated variable.
static bool dec(Integer &var)
Atomically decrements the indicated variable and returns true if the new value is nonzero...
int get_node_ref_count() const
Returns the current reference count.
virtual bool unref() const
Explicitly decrements the reference count.
static Integer get(const Integer &var)
Atomically retrieves the snapshot value of the indicated variable.
void node_ref() const
Explicitly increments the reference count.
void ref() const
Explicitly increments the reference count.