00001 // Filename: typedObject.cxx 00002 // Created by: drose (11May01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "typedObject.h" 00016 00017 TypeHandle TypedObject::_type_handle; 00018 00019 //////////////////////////////////////////////////////////////////// 00020 // Function: TypedObject::Destructor 00021 // Access: Published, Virtual 00022 // Description: 00023 //////////////////////////////////////////////////////////////////// 00024 TypedObject:: 00025 ~TypedObject() { 00026 } 00027 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function: TypedObject::get_type 00031 // Access: Published, Virtual 00032 // Description: 00033 //////////////////////////////////////////////////////////////////// 00034 TypeHandle TypedObject:: 00035 get_type() const { 00036 // Normally, this function should never be called, because it is a 00037 // pure virtual function. If it is called, you probably called 00038 // get_type() on a recently-destructed object. 00039 cerr 00040 << "TypedObject::get_type() called!\n"; 00041 return _type_handle; 00042 } 00043 00044 //////////////////////////////////////////////////////////////////// 00045 // Function: TypedObject::init_type 00046 // Access: Public, Static 00047 // Description: This function is declared non-inline to work around a 00048 // compiler bug in g++ 2.96. Making it inline seems to 00049 // cause problems in the optimizer. 00050 //////////////////////////////////////////////////////////////////// 00051 void TypedObject:: 00052 init_type() { 00053 register_type(_type_handle, "TypedObject"); 00054 }