15 #ifndef NODEREFERENCECOUNT_H 16 #define NODEREFERENCECOUNT_H 18 #include "pandabase.h" 20 #include "referenceCount.h" 44 INLINE NodeReferenceCount(
const NodeReferenceCount ©);
45 INLINE
void operator = (
const NodeReferenceCount ©);
46 INLINE ~NodeReferenceCount();
49 INLINE
int get_node_ref_count()
const;
50 INLINE
void node_ref()
const;
51 INLINE
bool node_unref()
const;
55 INLINE
void node_unref_only()
const;
57 bool do_test_ref_count_integrity()
const;
60 AtomicAdjust::Integer _node_ref_count;
67 static void init_type() {
68 ReferenceCount::init_type();
69 register_type(_type_handle,
"NodeReferenceCount",
70 ReferenceCount::get_class_type());
77 template<
class RefCountType>
78 INLINE
void node_unref_delete(RefCountType *ptr);
89 INLINE NodeRefCountObj(
const Base ©);
95 static void init_type();
101 #include "nodeReferenceCount.I" bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
This class specializes ReferenceCount to add an additional counter, called node_ref_count, for the purposes of counting the number of times the object is referenced by a "node", whatever that may mean in context.
This works like RefCountObj, but it inherits from NodeReferenceCount instead of ReferenceCount.
A base class for all things that want to be reference-counted.
TypeHandle is the identifier used to differentiate C++ class types.