Panda3D
typedReferenceCount.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file typedReferenceCount.I
10  * @author drose
11  * @date 2000-05-25
12  */
13 
14 /**
15  *
16  */
17 INLINE TypedReferenceCount::
18 TypedReferenceCount() {
19 #ifdef DO_MEMORY_USAGE
20  MemoryUsage::update_type(this, this);
21 #endif
22 }
23 
24 /**
25  *
26  */
27 INLINE TypedReferenceCount::
28 TypedReferenceCount(const TypedReferenceCount &copy) :
29  TypedObject(copy),
30  ReferenceCount(copy)
31 {
32 #ifdef DO_MEMORY_USAGE
33  MemoryUsage::update_type(this, this);
34 #endif
35 }
36 
37 /**
38  *
39  */
40 INLINE void TypedReferenceCount::
41 operator = (const TypedReferenceCount &copy) {
42  TypedObject::operator = (copy);
43  ReferenceCount::operator = (copy);
44 }
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This is an abstract class that all classes which use TypeHandle, and also provide virtual functions t...
Definition: typedObject.h:88
static void update_type(ReferenceCount *ptr, TypeHandle type)
Associates the indicated type with the given pointer.
Definition: memoryUsage.I:55
A base class for all things that want to be reference-counted.