Panda3D
typedObject.cxx
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 typedObject.cxx
10  * @author drose
11  * @date 2001-05-11
12  */
13 
14 #include "typedObject.h"
15 
16 TypeHandle TypedObject::_type_handle;
17 
18 /**
19  *
20  */
21 TypedObject::
22 ~TypedObject() {
23 }
24 
25 
26 /**
27  *
28  */
29 TypeHandle TypedObject::
30 get_type() const {
31  // Normally, this function should never be called, because it is a pure
32  // virtual function. If it is called, you probably called get_type() on a
33  // recently-destructed object.
34  std::cerr
35  << "TypedObject::get_type() called!\n";
36  return _type_handle;
37 }
38 
39 /**
40  * This function is declared non-inline to work around a compiler bug in g++
41  * 2.96. Making it inline seems to cause problems in the optimizer.
42  */
43 void TypedObject::
45  register_type(_type_handle, "TypedObject");
46 }
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Definition: typedObject.cxx:44
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81