14 #ifndef COPYONWRITEOBJECT_H
15 #define COPYONWRITEOBJECT_H
31 #define COW_THREADED 1
49 virtual bool unref()
const;
69 LockStatus _lock_status;
75 return get_class_type();
77 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
85 static void init_type() {
86 CachedTypedWritableReferenceCount::init_type();
88 CachedTypedWritableReferenceCount::get_class_type());
114 return get_class_type();
116 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
124 static void init_type();
133 template<
class Base,
class Param1>
148 return get_class_type();
150 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
158 static void init_type();
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a special extension to ReferenceCount that includes dual reference counts: the standard refer...
void cache_ref() const
Explicitly increments the cache reference count and the normal reference count simultaneously.
bool cache_unref() const
Explicitly decrements the cache reference count and the normal reference count simultaneously.
void cache_ref_only() const
Decrements the cache reference count without affecting the normal reference count.
A condition variable, usually used to communicate information about changing state to a thread that i...
This is similar to RefCountObj, but it implements a CopyOnWriteObject inheritance instead of a Refere...
This base class provides basic reference counting, but also can be used with a CopyOnWritePointer to ...
This safely stores the primary, owned pointer to a CopyOnWriteObject.
A standard mutex, or mutual exclusion lock.
This is the base class for PointerTo and ConstPointerTo.
virtual bool unref() const
Explicitly decrements the reference count.
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(),...