14 #ifndef CACHEDTYPEDWRITABLEREFERENCECOUNT_H 15 #define CACHEDTYPEDWRITABLEREFERENCECOUNT_H 42 INLINE
int get_cache_ref_count()
const;
43 INLINE
void cache_ref()
const;
44 INLINE
bool cache_unref()
const;
47 MAKE_PROPERTY(cache_ref_count, get_cache_ref_count);
50 INLINE
void cache_ref_only()
const;
53 INLINE
void cache_unref_only()
const;
54 bool do_test_ref_count_integrity()
const;
57 mutable AtomicAdjust::Integer _cache_ref_count;
64 static void init_type() {
65 TypedWritableReferenceCount::init_type();
66 register_type(_type_handle,
"CachedTypedWritableReferenceCount",
67 TypedWritableReferenceCount::get_class_type());
74 template<
class RefCountType>
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void cache_unref_delete(RefCountType *ptr)
This global helper function will unref the given ReferenceCount object, and if the reference count re...
This is a special extension to ReferenceCount that includes dual reference counts: the standard refer...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
TypeHandle is the identifier used to differentiate C++ class types.