Panda3D
 All Classes Functions Variables Enumerations
typedObject.cxx
1 // Filename: typedObject.cxx
2 // Created by: drose (11May01)
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 #include "typedObject.h"
16 
17 TypeHandle TypedObject::_type_handle;
18 
19 ////////////////////////////////////////////////////////////////////
20 // Function: TypedObject::Destructor
21 // Access: Published, Virtual
22 // Description:
23 ////////////////////////////////////////////////////////////////////
24 TypedObject::
25 ~TypedObject() {
26 }
27 
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: TypedObject::get_type
31 // Access: Published, Virtual
32 // Description:
33 ////////////////////////////////////////////////////////////////////
34 TypeHandle TypedObject::
35 get_type() const {
36  // Normally, this function should never be called, because it is a
37  // pure virtual function. If it is called, you probably called
38  // get_type() on a recently-destructed object.
39  cerr
40  << "TypedObject::get_type() called!\n";
41  return _type_handle;
42 }
43 
44 ////////////////////////////////////////////////////////////////////
45 // Function: TypedObject::init_type
46 // Access: Public, Static
47 // Description: This function is declared non-inline to work around a
48 // compiler bug in g++ 2.96. Making it inline seems to
49 // cause problems in the optimizer.
50 ////////////////////////////////////////////////////////////////////
51 void TypedObject::
53  register_type(_type_handle, "TypedObject");
54 }
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Definition: typedObject.cxx:52
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85