14#ifndef NODEREFERENCECOUNT_H
15#define NODEREFERENCECOUNT_H
33class EXPCL_PANDA_EXPRESS NodeReferenceCount :
public ReferenceCount {
35 INLINE NodeReferenceCount();
36 INLINE NodeReferenceCount(
const NodeReferenceCount ©);
37 INLINE
void operator = (
const NodeReferenceCount ©);
38 INLINE ~NodeReferenceCount();
48 bool do_test_ref_count_integrity()
const;
51 mutable AtomicAdjust::Integer _node_ref_count;
58 static void init_type() {
59 ReferenceCount::init_type();
61 ReferenceCount::get_class_type());
68template<
class RefCountType>
76class NodeRefCountObj :
public NodeReferenceCount,
public Base {
78 INLINE NodeRefCountObj();
79 INLINE NodeRefCountObj(
const Base ©);
80 ALLOC_DELETED_CHAIN(NodeRefCountObj<Base>);
85 static void init_type();
void node_ref() const
Explicitly increments the node reference count and the normal reference count simultaneously.
bool node_unref() const
Explicitly decrements the node reference count and the normal reference count simultaneously.
int get_node_ref_count() const
Returns the current reference count.
void node_unref_only() const
Decrements the node reference count without affecting the normal reference count.
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void node_unref_delete(RefCountType *ptr)
This global helper function will unref the given ReferenceCount object, and if the reference count re...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...