Panda3D
register_type.cxx
1 // Filename: register_type.cxx
2 // Created by: drose (06Aug01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "register_type.h"
16 
17 
18 TypeHandle long_type_handle;
19 TypeHandle int_type_handle;
20 TypeHandle uint_type_handle;
21 TypeHandle short_type_handle;
22 TypeHandle ushort_type_handle;
23 TypeHandle char_type_handle;
24 TypeHandle uchar_type_handle;
25 TypeHandle bool_type_handle;
26 TypeHandle double_type_handle;
27 TypeHandle float_type_handle;
28 TypeHandle string_type_handle;
29 TypeHandle wstring_type_handle;
30 
31 TypeHandle long_p_type_handle;
32 TypeHandle int_p_type_handle;
33 TypeHandle short_p_type_handle;
34 TypeHandle char_p_type_handle;
35 TypeHandle bool_p_type_handle;
36 TypeHandle double_p_type_handle;
37 TypeHandle float_p_type_handle;
38 TypeHandle void_p_type_handle;
39 
40 TypeHandle pvector_type_handle;
41 TypeHandle ov_set_type_handle;
42 TypeHandle pdeque_type_handle;
43 TypeHandle plist_type_handle;
44 TypeHandle pmap_type_handle;
45 TypeHandle pset_type_handle;
46 
47 void init_system_type_handles() {
48  static bool done = false;
49  if (!done) {
50  done = true;
51  register_type(long_type_handle, "long");
52  register_type(int_type_handle, "int");
53  register_type(uint_type_handle, "uint");
54  register_type(short_type_handle, "short");
55  register_type(ushort_type_handle, "ushort");
56  register_type(char_type_handle, "char");
57  register_type(uchar_type_handle, "uchar");
58  register_type(bool_type_handle, "bool");
59  register_type(double_type_handle, "double");
60  register_type(float_type_handle, "float");
61  register_type(string_type_handle, "string");
62  register_type(wstring_type_handle, "wstring");
63 
64  register_type(int_p_type_handle, "int*");
65  register_type(short_p_type_handle, "short*");
66  register_type(char_p_type_handle, "char*");
67  register_type(bool_p_type_handle, "bool*");
68  register_type(double_p_type_handle, "double*");
69  register_type(float_p_type_handle, "float*");
70  register_type(void_p_type_handle, "void*");
71 
72  register_type(pvector_type_handle, "pvector");
73  register_type(ov_set_type_handle, "ov_set");
74  register_type(pdeque_type_handle, "pdeque");
75  register_type(plist_type_handle, "plist");
76  register_type(pmap_type_handle, "pmap");
77  register_type(pset_type_handle, "pset");
78  }
79 }
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85