Panda3D
dtool
src
dtoolbase
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::
44
init_type
() {
45
register_type
(_type_handle,
"TypedObject"
);
46
}
TypedObject::init_type
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Definition:
typedObject.cxx:44
register_type
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
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
typedObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Sun Dec 27 2020 13:22:45 for Panda3D by
1.8.20