Panda3D
 All Classes Functions Variables Enumerations
typedReferenceCount.I
1 // Filename: typedReferenceCount.I
2 // Created by: drose (25May00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: TypedReferenceCount::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE TypedReferenceCount::
22 TypedReferenceCount() {
23 #ifdef DO_MEMORY_USAGE
24  MemoryUsage::update_type(this, this);
25 #endif
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: TypedReferenceCount::Copy Constructor
30 // Access: Public
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 INLINE TypedReferenceCount::
34 TypedReferenceCount(const TypedReferenceCount &copy) :
35  TypedObject(copy),
36  ReferenceCount(copy)
37 {
38 #ifdef DO_MEMORY_USAGE
39  MemoryUsage::update_type(this, this);
40 #endif
41 }
42 
43 ////////////////////////////////////////////////////////////////////
44 // Function: TypedReferenceCount::Copy Assignment Operator
45 // Access: Public
46 // Description:
47 ////////////////////////////////////////////////////////////////////
48 INLINE void TypedReferenceCount::
49 operator = (const TypedReferenceCount &copy) {
50  TypedObject::operator = (copy);
51  ReferenceCount::operator = (copy);
52 }
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:98
A base class for all things that want to be reference-counted.