Panda3D
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 
17 TypeHandle long_type_handle;
18 TypeHandle int_type_handle;
19 TypeHandle uint_type_handle;
20 TypeHandle short_type_handle;
21 TypeHandle ushort_type_handle;
22 TypeHandle char_type_handle;
23 TypeHandle uchar_type_handle;
24 TypeHandle bool_type_handle;
25 TypeHandle double_type_handle;
26 TypeHandle float_type_handle;
27 TypeHandle string_type_handle;
28 TypeHandle wstring_type_handle;
29 
30 TypeHandle long_p_type_handle;
31 TypeHandle int_p_type_handle;
32 TypeHandle short_p_type_handle;
33 TypeHandle char_p_type_handle;
34 TypeHandle bool_p_type_handle;
35 TypeHandle double_p_type_handle;
36 TypeHandle float_p_type_handle;
37 TypeHandle void_p_type_handle;
38 
39 TypeHandle pvector_type_handle;
40 TypeHandle ov_set_type_handle;
41 TypeHandle pdeque_type_handle;
42 TypeHandle plist_type_handle;
43 TypeHandle pmap_type_handle;
44 TypeHandle pset_type_handle;
45 
46 void 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 }
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