Panda3D
Loading...
Searching...
No Matches
register_type.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 register_type.cxx
10 * @author drose
11 * @date 2001-08-06
12 */
13
14#include "register_type.h"
15
16
17TypeHandle long_type_handle;
18TypeHandle int_type_handle;
19TypeHandle uint_type_handle;
20TypeHandle short_type_handle;
21TypeHandle ushort_type_handle;
22TypeHandle char_type_handle;
23TypeHandle uchar_type_handle;
24TypeHandle bool_type_handle;
25TypeHandle double_type_handle;
26TypeHandle float_type_handle;
27TypeHandle string_type_handle;
28TypeHandle wstring_type_handle;
29
30TypeHandle long_p_type_handle;
31TypeHandle int_p_type_handle;
32TypeHandle short_p_type_handle;
33TypeHandle char_p_type_handle;
34TypeHandle bool_p_type_handle;
35TypeHandle double_p_type_handle;
36TypeHandle float_p_type_handle;
37TypeHandle void_p_type_handle;
38
39TypeHandle pvector_type_handle;
40TypeHandle ov_set_type_handle;
41TypeHandle pdeque_type_handle;
42TypeHandle plist_type_handle;
43TypeHandle pmap_type_handle;
44TypeHandle pset_type_handle;
45
46void init_system_type_handles() {
47 static bool done = false;
48 if (!done) {
49 done = true;
50 register_type(long_type_handle, "long");
51 register_type(int_type_handle, "int");
52 register_type(uint_type_handle, "uint");
53 register_type(short_type_handle, "short");
54 register_type(ushort_type_handle, "ushort");
55 register_type(char_type_handle, "char");
56 register_type(uchar_type_handle, "uchar");
57 register_type(bool_type_handle, "bool");
58 register_type(double_type_handle, "double");
59 register_type(float_type_handle, "float");
60 register_type(string_type_handle, "string");
61 register_type(wstring_type_handle, "wstring");
62
63 register_type(int_p_type_handle, "int*");
64 register_type(short_p_type_handle, "short*");
65 register_type(char_p_type_handle, "char*");
66 register_type(bool_p_type_handle, "bool*");
67 register_type(double_p_type_handle, "double*");
68 register_type(float_p_type_handle, "float*");
69 register_type(void_p_type_handle, "void*");
70
71 register_type(pvector_type_handle, "pvector");
72 register_type(ov_set_type_handle, "ov_set");
73 register_type(pdeque_type_handle, "pdeque");
74 register_type(plist_type_handle, "plist");
75 register_type(pmap_type_handle, "pmap");
76 register_type(pset_type_handle, "pset");
77 }
78}
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...