Go to the documentation of this file.
14 #ifndef COPYONWRITEOBJECT_H
15 #define COPYONWRITEOBJECT_H
31 #define COW_THREADED 1
49 virtual bool unref()
const;
55 #endif // COW_THREADED
69 LockStatus _lock_status;
71 #endif // COW_THREADED
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();
This is a special extension to ReferenceCount that includes dual reference counts: the standard refer...
This safely stores the primary, owned pointer to a CopyOnWriteObject.
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(),...
TypeHandle is the identifier used to differentiate C++ class types.
This is similar to RefCountObj, but it implements a CopyOnWriteObject inheritance instead of a Refere...
This is the base class for PointerTo and ConstPointerTo.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This base class provides basic reference counting, but also can be used with a CopyOnWritePointer to ...
void cache_ref() const
Explicitly increments the cache reference count and the normal reference count simultaneously.
A standard mutex, or mutual exclusion lock.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool cache_unref() const
Explicitly decrements the cache reference count and the normal reference count simultaneously.
A condition variable, usually used to communicate information about changing state to a thread that i...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool unref() const
Explicitly decrements the reference count.
void cache_ref_only() const
Decrements the cache reference count without affecting the normal reference count.
A thread; that is, a lightweight process.