Panda3D
Loading...
Searching...
No Matches
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
16TypeHandle TypedObject::_type_handle;
17
18/**
19 *
20 */
21TypedObject::
22~TypedObject() {
23}
24
25
26/**
27 *
28 */
29TypeHandle TypedObject::
30get_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 */
44init_type() {
45 register_type(_type_handle, "TypedObject");
46}
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.