17 template<
class Base,
class Param1>
23 INLINE CopyOnWriteObject::
26 : _lock_mutex(
"CopyOnWriteObject::_lock"),
27 _lock_cvar(_lock_mutex)
30 #ifdef DO_MEMORY_USAGE 34 _lock_status = LS_unlocked;
35 _locking_thread =
nullptr;
36 #endif // COW_THREADED 42 INLINE CopyOnWriteObject::
46 , _lock_mutex(
"CopyOnWriteObject::_lock"),
47 _lock_cvar(_lock_mutex)
50 #ifdef DO_MEMORY_USAGE 54 _lock_status = LS_unlocked;
55 _locking_thread =
nullptr;
56 #endif // COW_THREADED 62 INLINE
void CopyOnWriteObject::
64 CachedTypedWritableReferenceCount::operator = (copy);
85 #endif // COW_THREADED 131 #if defined(HAVE_RTTI) && !defined(__EDG__) 133 std::string base_name =
typeid(Base).name();
135 std::string base_name =
"unknown";
140 CopyOnWriteObject::init_type();
144 CopyOnWriteObject::get_class_type());
150 template<
class Base,
class Param1>
158 template<
class Base,
class Param1>
168 template<
class Base,
class Param1>
179 template<
class Base,
class Param1>
188 template<
class Base,
class Param1>
191 #if defined(HAVE_RTTI) && !defined(__EDG__) 193 std::string base_name =
typeid(Base).name();
195 std::string base_name =
"unknown";
200 CopyOnWriteObject::init_type();
204 CopyOnWriteObject::get_class_type());
This is a special extension to ReferenceCount that includes dual reference counts: the standard refer...
A lightweight C++ object whose constructor calls acquire() and whose destructor calls release() on a ...
bool cache_unref() const
Explicitly decrements the cache reference count and the normal reference count simultaneously.
void cache_ref() const
Explicitly increments the cache reference count and the normal reference count simultaneously.
static void update_type(ReferenceCount *ptr, TypeHandle type)
Associates the indicated type with the given pointer.
This base class provides basic reference counting, but also can be used with a CopyOnWritePointer to ...
This is similar to RefCountObj, but it implements a CopyOnWriteObject inheritance instead of a Refere...
TypeHandle is the identifier used to differentiate C++ class types.
TypeHandle register_dynamic_type(const std::string &name)
This is essentially similar to register_type(), except that it doesn't store a reference to any TypeH...