Panda3D
typedWritableReferenceCount.I
1 // Filename: typedWritableReferenceCount.I
2 // Created by: jason (08Jun00)
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: TypedWritableReferenceCount::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE TypedWritableReferenceCount::
22 TypedWritableReferenceCount() {
23 #ifdef DO_MEMORY_USAGE
24  MemoryUsage::update_type(this, this);
25 #endif
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: TypedWritableReferenceCount::Copy Constructor
30 // Access: Public
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 INLINE TypedWritableReferenceCount::
34 TypedWritableReferenceCount(const TypedWritableReferenceCount &copy) :
35  TypedWritable(copy),
36  ReferenceCount(copy) {
37 #ifdef DO_MEMORY_USAGE
38  MemoryUsage::update_type(this, this);
39 #endif
40 }
41 
42 ////////////////////////////////////////////////////////////////////
43 // Function: TypedWritableReferenceCount::Copy Assignment Operator
44 // Access: Public
45 // Description:
46 ////////////////////////////////////////////////////////////////////
47 INLINE void TypedWritableReferenceCount::
48 operator = (const TypedWritableReferenceCount &copy) {
49  TypedWritable::operator = (copy);
50  ReferenceCount::operator = (copy);
51 }
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:37
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
A base class for all things that want to be reference-counted.