49 #ifdef USE_MOVE_SEMANTICS 58 _void_ptr = from._void_ptr;
59 from._void_ptr = (
void *)NULL;
74 To *old_ptr = (To *)this->_void_ptr;
76 this->_void_ptr = from._void_ptr;
77 from._void_ptr = NULL;
80 if (old_ptr != (To *)NULL) {
81 node_unref_delete(old_ptr);
84 #endif // USE_MOVE_SEMANTICS 96 if (ptr != (To *)_void_ptr) {
102 To *old_ptr = (To *)_void_ptr;
104 _void_ptr = (
void *)ptr;
105 if (ptr != (To *)NULL) {
107 #ifdef DO_MEMORY_USAGE 108 if (MemoryUsage::get_track_memory_usage()) {
114 type = get_type_handle(To);
117 MemoryUsage::update_type(ptr, type);
124 if (old_ptr != (To *)NULL) {
125 node_unref_delete(old_ptr);
138 reassign((To *)copy._void_ptr);
151 reassign((To *)NULL);
164 if (_void_ptr != (
void *)NULL) {
165 out <<
":" << ((To *)_void_ptr)->get_node_ref_count() <<
"/" 166 << ((To *)_void_ptr)->get_ref_count();
static TypeHandle none()
Returns a special zero-valued TypeHandle that is used to indicate no type.
void clear()
A convenient way to set the NodePointerTo object to NULL.
This is similar to PointerToBase, but it manages objects of type NodeReferenceCount or NodeCachedRefe...
void output(ostream &out) const
A handy function to output NodePointerTo's as a hex pointer followed by a reference count...
TypeHandle is the identifier used to differentiate C++ class types.