Panda3D
 All Classes Functions Variables Enumerations
interrogate_interface.cxx
1 // Filename: interrogate_interface.cxx
2 // Created by: drose (31Jul00)
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 "interrogate_interface.h"
16 #include "interrogateDatabase.h"
17 #include "interrogateType.h"
18 #include "interrogateFunction.h"
19 #include "config_interrogatedb.h"
20 
21 // This function adds one more directory to the list of directories
22 // search for interrogate (*.in) files. In the past, this list has
23 // been defined the environment variable ETC_PATH, but now it is
24 // passed in by the code generator.
25 void
26 interrogate_add_search_directory(const char *dirname) {
27  //cerr << "interrogate_add_search_directory(" << dirname << ")\n";
28  interrogatedb_path.append_directory(Filename::from_os_specific(dirname));
29 }
30 
31 // This function works similar to the above, but adds a complete path
32 // string--a list of multiple directories, separated by the standard
33 // delimiter--to the search path.
34 void
35 interrogate_add_search_path(const char *pathstring) {
36  //cerr << "interrogate_add_search_path(" << pathstring << ")\n";
37  interrogatedb_path.append_path(pathstring);
38 }
39 
40 bool interrogate_error_flag() {
41  //cerr << "interrogate_error_flag\n";
43 }
44 
45 int
46 interrogate_number_of_manifests() {
47  //cerr << "interrogate_number_of_manifests\n";
49 }
50 
51 ManifestIndex
52 interrogate_get_manifest(int n) {
53  //cerr << "interrogate_get_manifest(" << n << ")\n";
55 }
56 
57 ManifestIndex
58 interrogate_get_manifest_by_name(const char *manifest_name) {
59  //cerr << "interrogate_get_manifest_by_name(" << manifest_name << ")\n";
61 }
62 
63 const char *
64 interrogate_manifest_name(ManifestIndex manifest) {
65  //cerr << "interrogate_manifest_name(" << manifest << ")\n";
66  return InterrogateDatabase::get_ptr()->get_manifest(manifest).get_name().c_str();
67 }
68 
69 const char *
70 interrogate_manifest_definition(ManifestIndex manifest) {
71  //cerr << "interrogate_manifest_definition(" << manifest << ")\n";
72  return InterrogateDatabase::get_ptr()->get_manifest(manifest).get_definition().c_str();
73 }
74 
75 bool
76 interrogate_manifest_has_type(ManifestIndex manifest) {
77  //cerr << "interrogate_manifest_has_type(" << manifest << ")\n";
78  return InterrogateDatabase::get_ptr()->get_manifest(manifest).has_type();
79 }
80 
81 TypeIndex
82 interrogate_manifest_get_type(ManifestIndex manifest) {
83  //cerr << "interrogate_manifest_get_type(" << manifest << ")\n";
84  return InterrogateDatabase::get_ptr()->get_manifest(manifest).get_type();
85 }
86 
87 bool
88 interrogate_manifest_has_getter(ManifestIndex manifest) {
89  //cerr << "interrogate_manifest_has_getter(" << manifest << ")\n";
90  return InterrogateDatabase::get_ptr()->get_manifest(manifest).has_getter();
91 }
92 
93 FunctionIndex
94 interrogate_manifest_getter(ManifestIndex manifest) {
95  //cerr << "interrogate_manifest_getter(" << manifest << ")\n";
96  return InterrogateDatabase::get_ptr()->get_manifest(manifest).get_getter();
97 }
98 
99 bool
100 interrogate_manifest_has_int_value(ManifestIndex manifest) {
101  //cerr << "interrogate_manifest_has_int_value(" << manifest << ")\n";
102  return InterrogateDatabase::get_ptr()->get_manifest(manifest).has_int_value();
103 }
104 
105 int
106 interrogate_manifest_get_int_value(ManifestIndex manifest) {
107  //cerr << "interrogate_manifest_get_int_value(" << manifest << ")\n";
108  return InterrogateDatabase::get_ptr()->get_manifest(manifest).get_int_value();
109 }
110 
111 const char *
112 interrogate_element_name(ElementIndex element) {
113  //cerr << "interrogate_element_name(" << element << ")\n";
114  return InterrogateDatabase::get_ptr()->get_element(element).get_name().c_str();
115 }
116 
117 const char *
118 interrogate_element_scoped_name(ElementIndex element) {
119  //cerr << "interrogate_element_scoped_name(" << element << ")\n";
120  return InterrogateDatabase::get_ptr()->get_element(element).get_scoped_name().c_str();
121 }
122 
123 bool
124 interrogate_element_has_comment(ElementIndex element) {
125  //cerr << "interrogate_element_has_comment(" << element << ")\n";
126  return InterrogateDatabase::get_ptr()->get_element(element).has_comment();
127 }
128 
129 const char *
130 interrogate_element_comment(ElementIndex element) {
131  //cerr << "interrogate_element_comment(" << element << ")\n";
132  return InterrogateDatabase::get_ptr()->get_element(element).get_comment().c_str();
133 }
134 
135 ElementIndex
136 interrogate_get_element_by_name(const char *element_name) {
137  //cerr << "interrogate_get_element_by_name(" << element_name << ")\n";
139 }
140 
141 ElementIndex
142 interrogate_get_element_by_scoped_name(const char *element_name) {
143  //cerr << "interrogate_get_element_by_scoped_name(" << element_name << ")\n";
145 }
146 
147 TypeIndex
148 interrogate_element_type(ElementIndex element) {
149  //cerr << "interrogate_element_type(" << element << ")\n";
150  return InterrogateDatabase::get_ptr()->get_element(element).get_type();
151 }
152 
153 bool
154 interrogate_element_has_getter(ElementIndex element) {
155  //cerr << "interrogate_element_has_getter(" << element << ")\n";
156  return InterrogateDatabase::get_ptr()->get_element(element).has_getter();
157 }
158 
159 FunctionIndex
160 interrogate_element_getter(ElementIndex element) {
161  //cerr << "interrogate_element_getter(" << element << ")\n";
162  return InterrogateDatabase::get_ptr()->get_element(element).get_getter();
163 }
164 
165 bool
166 interrogate_element_has_setter(ElementIndex element) {
167  //cerr << "interrogate_element_has_setter(" << element << ")\n";
168  return InterrogateDatabase::get_ptr()->get_element(element).has_setter();
169 }
170 
171 FunctionIndex
172 interrogate_element_setter(ElementIndex element) {
173  //cerr << "interrogate_element_setter(" << element << ")\n";
174  return InterrogateDatabase::get_ptr()->get_element(element).get_setter();
175 }
176 
177 int
178 interrogate_number_of_globals() {
179  //cerr << "interrogate_number_of_globals()\n";
181 }
182 
183 ElementIndex
184 interrogate_get_global(int n) {
185  //cerr << "interrogate_get_global(" << n << ")\n";
187 }
188 
189 int
190 interrogate_number_of_global_functions() {
191  //cerr << "interrogate_number_of_global_functions()\n";
193 }
194 
195 FunctionIndex
196 interrogate_get_global_function(int n) {
197  //cerr << "interrogate_get_global_function(" << n << ")\n";
199 }
200 
201 int
202 interrogate_number_of_functions() {
203  //cerr << "interrogate_number_of_functions()\n";
205 }
206 
207 FunctionIndex
208 interrogate_get_function(int n) {
209  //cerr << "interrogate_get_function(" << n << ")\n";
211 }
212 
213 const char *
214 interrogate_function_name(FunctionIndex function) {
215  //cerr << "interrogate_function_name(" << function << ")\n";
216  return InterrogateDatabase::get_ptr()->get_function(function).get_name().c_str();
217 }
218 
219 const char *
220 interrogate_function_scoped_name(FunctionIndex function) {
221  //cerr << "interrogate_function_scoped_name(" << function << ")\n";
222  return InterrogateDatabase::get_ptr()->get_function(function).get_scoped_name().c_str();
223 }
224 
225 bool
226 interrogate_function_has_comment(FunctionIndex function) {
227  //cerr << "interrogate_function_has_comment(" << function << ")\n";
228  return InterrogateDatabase::get_ptr()->get_function(function).has_comment();
229 }
230 
231 const char *
232 interrogate_function_comment(FunctionIndex function) {
233  //cerr << "interrogate_function_comment(" << function << ")\n";
234  return InterrogateDatabase::get_ptr()->get_function(function).get_comment().c_str();
235 }
236 
237 const char *
238 interrogate_function_prototype(FunctionIndex function) {
239  //cerr << "interrogate_function_prototype(" << function << ")\n";
240  return InterrogateDatabase::get_ptr()->get_function(function).get_prototype().c_str();
241 }
242 
243 bool
244 interrogate_function_is_method(FunctionIndex function) {
245  //cerr << "interrogate_function_is_method(" << function << ")\n";
247 }
248 
249 TypeIndex
250 interrogate_function_class(FunctionIndex function) {
251  //cerr << "interrogate_function_class(" << function << ")\n";
253 }
254 
255 bool
256 interrogate_function_has_module_name(FunctionIndex function) {
257  //cerr << "interrogate_function_has_module_name(" << function << ")\n";
259 }
260 
261 const char *
262 interrogate_function_module_name(FunctionIndex function) {
263  //cerr << "interrogate_function_module_name(" << function << ")\n";
265 }
266 
267 bool
268 interrogate_function_has_library_name(FunctionIndex function) {
269  //cerr << "interrogate_function_has_library_name(" << function << ")\n";
271 }
272 
273 const char *
274 interrogate_function_library_name(FunctionIndex function) {
275  //cerr << "interrogate_function_library_name(" << function << ")\n";
277 }
278 
279 
280 
281 bool
282 interrogate_function_is_virtual(FunctionIndex function) {
283  //cerr << "interrogate_function_is_virtual(" << function << ")\n";
285 }
286 
287 int
288 interrogate_function_number_of_c_wrappers(FunctionIndex function) {
289  //cerr << "interrogate_function_number_of_c_wrappers(" << function << ")\n";
290  return InterrogateDatabase::get_ptr()->get_function(function).number_of_c_wrappers();
291 }
292 
293 FunctionWrapperIndex
294 interrogate_function_c_wrapper(FunctionIndex function, int n) {
295  //cerr << "interrogate_function_c_wrapper(" << function << ", " << n << ")\n";
296  return InterrogateDatabase::get_ptr()->get_function(function).get_c_wrapper(n);
297 }
298 
299 int
300 interrogate_function_number_of_python_wrappers(FunctionIndex function) {
301  //cerr << "interrogate_function_number_of_python_wrappers(" << function << ")\n";
302  return InterrogateDatabase::get_ptr()->get_function(function).number_of_python_wrappers();
303 }
304 
305 FunctionWrapperIndex
306 interrogate_function_python_wrapper(FunctionIndex function, int n) {
307  //cerr << "interrogate_function_python_wrapper(" << function << ", " << n << ")\n";
308  return InterrogateDatabase::get_ptr()->get_function(function).get_python_wrapper(n);
309 }
310 
311 const char *
312 interrogate_wrapper_name(FunctionWrapperIndex wrapper) {
313  //cerr << "interrogate_wrapper_name(" << wrapper << ")\n";
314  static string result;
315  result = InterrogateDatabase::get_ptr()->get_wrapper(wrapper).get_name();
316  return result.c_str();
317 }
318 
319 bool
320 interrogate_wrapper_is_callable_by_name(FunctionWrapperIndex wrapper) {
321  //cerr << "interrogate_wrapper_is_callable_by_name(" << wrapper << ")\n";
322  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).is_callable_by_name();
323 }
324 
325 bool
326 interrogate_wrapper_has_comment(FunctionWrapperIndex wrapper) {
327  //cerr << "interrogate_wrapper_has_comment(" << wrapper << ")\n";
328  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).has_comment();
329 }
330 
331 const char *
332 interrogate_wrapper_comment(FunctionWrapperIndex wrapper) {
333  //cerr << "interrogate_wrapper_comment(" << wrapper << ")\n";
334  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).get_comment().c_str();
335 }
336 
337 bool
338 interrogate_wrapper_has_return_value(FunctionWrapperIndex wrapper) {
339  //cerr << "interrogate_wrapper_has_return_value(" << wrapper << ")\n";
340  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).has_return_value();
341 }
342 
343 TypeIndex
344 interrogate_wrapper_return_type(FunctionWrapperIndex wrapper) {
345  //cerr << "interrogate_wrapper_return_type(" << wrapper << ")\n";
346  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).get_return_type();
347 }
348 
349 bool
350 interrogate_wrapper_caller_manages_return_value(FunctionWrapperIndex wrapper) {
351  //cerr << "interrogate_wrapper_caller_manages_return_value(" << wrapper << ")\n";
352  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).caller_manages_return_value();
353 }
354 
355 FunctionIndex
356 interrogate_wrapper_return_value_destructor(FunctionWrapperIndex wrapper) {
357  //cerr << "interrogate_wrapper_return_value_destructor(" << wrapper << ")\n";
358  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).get_return_value_destructor();
359 }
360 
361 int
362 interrogate_wrapper_number_of_parameters(FunctionWrapperIndex wrapper) {
363  //cerr << "interrogate_wrapper_number_of_parameters(" << wrapper << ")\n";
364  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).number_of_parameters();
365 }
366 
367 TypeIndex
368 interrogate_wrapper_parameter_type(FunctionWrapperIndex wrapper, int n) {
369  //cerr << "interrogate_wrapper_parameter_type(" << wrapper << ", " << n << ")\n";
370  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).parameter_get_type(n);
371 }
372 
373 bool
374 interrogate_wrapper_parameter_has_name(FunctionWrapperIndex wrapper, int n) {
375  //cerr << "interrogate_wrapper_parameter_has_name(" << wrapper << ", " << n << ")\n";
376  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).parameter_has_name(n);
377 }
378 
379 const char *
380 interrogate_wrapper_parameter_name(FunctionWrapperIndex wrapper, int n) {
381  //cerr << "interrogate_wrapper_parameter_name(" << wrapper << ", " << n << ")\n";
382  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).parameter_get_name(n).c_str();
383 }
384 
385 bool
386 interrogate_wrapper_parameter_is_this(FunctionWrapperIndex wrapper, int n) {
387  //cerr << "interrogate_wrapper_is_this(" << wrapper << ", " << n << ")\n";
388  return InterrogateDatabase::get_ptr()->get_wrapper(wrapper).parameter_is_this(n);
389 }
390 
391 bool
392 interrogate_wrapper_has_pointer(FunctionWrapperIndex wrapper) {
393  //cerr << "interrogate_wrapper_has_pointer(" << wrapper << ")\n";
394  return (InterrogateDatabase::get_ptr()->get_fptr(wrapper) != (void *)NULL);
395 }
396 
397 void *
398 interrogate_wrapper_pointer(FunctionWrapperIndex wrapper) {
399  //cerr << "interrogate_wrapper_pointer(" << wrapper << ")\n";
400  return InterrogateDatabase::get_ptr()->get_fptr(wrapper);
401 }
402 
403 const char *
404 interrogate_wrapper_unique_name(FunctionWrapperIndex wrapper) {
405  //cerr << "interrogate_wrapper_unique_name(" << wrapper << ")\n";
406  static string result;
407  result = InterrogateDatabase::get_ptr()->get_wrapper(wrapper).get_unique_name();
408  return result.c_str();
409 }
410 
411 FunctionWrapperIndex
412 interrogate_get_wrapper_by_unique_name(const char *unique_name) {
413  //cerr << "interrogate_get_wrapper_by_unique_name(" << unique_name << ")\n";
415 }
416 
417 TypeIndex
418 interrogate_make_seq_class(MakeSeqIndex make_seq) {
419  //cerr << "interrogate_make_seq_class(" << make_seq << ")\n";
421 }
422 
423 const char *
424 interrogate_make_seq_seq_name(MakeSeqIndex make_seq) {
425  //cerr << "interrogate_make_seq_seq_name(" << make_seq << ")\n";
426  static string result;
427  result = InterrogateDatabase::get_ptr()->get_make_seq(make_seq).get_seq_name();
428  return result.c_str();
429 }
430 
431 const char *
432 interrogate_make_seq_num_name(MakeSeqIndex make_seq) {
433  //cerr << "interrogate_make_seq_num_name(" << make_seq << ")\n";
434  static string result;
435  result = InterrogateDatabase::get_ptr()->get_make_seq(make_seq).get_num_name();
436  return result.c_str();
437 }
438 
439 const char *
440 interrogate_make_seq_element_name(MakeSeqIndex make_seq) {
441  //cerr << "interrogate_make_seq_element_name(" << make_seq << ")\n";
442  static string result;
443  result = InterrogateDatabase::get_ptr()->get_make_seq(make_seq).get_element_name();
444  return result.c_str();
445 }
446 
447 int
448 interrogate_number_of_global_types() {
449  //cerr << "interrogate_number_of_global_types()\n";
451 }
452 
453 TypeIndex
454 interrogate_get_global_type(int n) {
455  //cerr << "interrogate_get_global_type(" << n << ")\n";
457 }
458 
459 int
460 interrogate_number_of_types() {
461  //cerr << "interrogate_number_of_types()\n";
463 }
464 
465 TypeIndex
466 interrogate_get_type(int n) {
467  //cerr << "interrogate_get_type(" << n << ")\n";
469 }
470 
471 TypeIndex
472 interrogate_get_type_by_name(const char *type_name) {
473  //cerr << "interrogate_get_type_by_name(" << type_name << ")\n";
475 }
476 
477 TypeIndex
478 interrogate_get_type_by_scoped_name(const char *type_name) {
479  //cerr << "interrogate_get_type_by_scoped_name(" << type_name << ")\n";
481 }
482 
483 TypeIndex
484 interrogate_get_type_by_true_name(const char *type_name) {
485  //cerr << "interrogate_get_type_by_true_name(" << type_name << ")\n";
487 }
488 
489 const char *
490 interrogate_type_name(TypeIndex type) {
491  //cerr << "interrogate_type_name(" << type << ")\n";
492  return InterrogateDatabase::get_ptr()->get_type(type).get_name().c_str();
493 }
494 
495 const char *
496 interrogate_type_scoped_name(TypeIndex type) {
497  //cerr << "interrogate_type_scoped_name(" << type << ")\n";
498  return InterrogateDatabase::get_ptr()->get_type(type).get_scoped_name().c_str();
499 }
500 
501 const char *
502 interrogate_type_true_name(TypeIndex type) {
503  //cerr << "interrogate_type_true_name(" << type << ")\n";
504  return InterrogateDatabase::get_ptr()->get_type(type).get_true_name().c_str();
505 }
506 
507 bool
508 interrogate_type_is_nested(TypeIndex type) {
509  //cerr << "interrogate_type_is_nested(" << type << ")\n";
511 }
512 
513 TypeIndex
514 interrogate_type_outer_class(TypeIndex type) {
515  //cerr << "interrogate_type_outer_class(" << type << ")\n";
517 }
518 
519 bool
520 interrogate_type_has_comment(TypeIndex type) {
521  //cerr << "interrogate_type_has_comment(" << type << ")\n";
522  return InterrogateDatabase::get_ptr()->get_type(type).has_comment();
523 }
524 
525 const char *
526 interrogate_type_comment(TypeIndex type) {
527  //cerr << "interrogate_type_comment(" << type << ")\n";
528  return InterrogateDatabase::get_ptr()->get_type(type).get_comment().c_str();
529 }
530 
531 bool
532 interrogate_type_has_module_name(TypeIndex type) {
533  //cerr << "interrogate_type_has_module_name(" << type << ")\n";
535 }
536 
537 const char *
538 interrogate_type_module_name(TypeIndex type) {
539  //cerr << "interrogate_type_module_name(" << type << ")\n";
541 }
542 
543 bool
544 interrogate_type_has_library_name(TypeIndex type) {
545  //cerr << "interrogate_type_has_library_name(" << type << ")\n";
547 }
548 
549 const char *
550 interrogate_type_library_name(TypeIndex type) {
551  //cerr << "interrogate_type_library_name(" << type << ")\n";
553 }
554 
555 
556 bool
557 interrogate_type_is_atomic(TypeIndex type) {
558  //cerr << "interrogate_type_is_atomic(" << type << ")\n";
559  return InterrogateDatabase::get_ptr()->get_type(type).is_atomic();
560 }
561 
562 AtomicToken
563 interrogate_type_atomic_token(TypeIndex type) {
564  //cerr << "interrogate_type_atomic_token(" << type << ")\n";
565  return InterrogateDatabase::get_ptr()->get_type(type).get_atomic_token();
566 }
567 
568 bool
569 interrogate_type_is_unsigned(TypeIndex type) {
570  //cerr << "interrogate_type_is_unsigned(" << type << ")\n";
571  return InterrogateDatabase::get_ptr()->get_type(type).is_unsigned();
572 }
573 
574 bool
575 interrogate_type_is_signed(TypeIndex type) {
576  //cerr << "interrogate_type_is_signed(" << type << ")\n";
577  return InterrogateDatabase::get_ptr()->get_type(type).is_signed();
578 }
579 
580 bool
581 interrogate_type_is_long(TypeIndex type) {
582  //cerr << "interrogate_type_is_long(" << type << ")\n";
583  return InterrogateDatabase::get_ptr()->get_type(type).is_long();
584 }
585 
586 bool
587 interrogate_type_is_longlong(TypeIndex type) {
588  //cerr << "interrogate_type_is_longlong(" << type << ")\n";
589  return InterrogateDatabase::get_ptr()->get_type(type).is_longlong();
590 }
591 
592 bool
593 interrogate_type_is_short(TypeIndex type) {
594  //cerr << "interrogate_type_is_short(" << type << ")\n";
595  return InterrogateDatabase::get_ptr()->get_type(type).is_short();
596 }
597 
598 bool
599 interrogate_type_is_wrapped(TypeIndex type) {
600  //cerr << "interrogate_type_is_wrapped(" << type << ")\n";
601  return InterrogateDatabase::get_ptr()->get_type(type).is_wrapped();
602 }
603 
604 bool
605 interrogate_type_is_pointer(TypeIndex type) {
606  //cerr << "interrogate_type_is_pointer(" << type << ")\n";
607  return InterrogateDatabase::get_ptr()->get_type(type).is_pointer();
608 }
609 
610 bool
611 interrogate_type_is_const(TypeIndex type) {
612  //cerr << "interrogate_type_is_const(" << type << ")\n";
613  return InterrogateDatabase::get_ptr()->get_type(type).is_const();
614 }
615 
616 bool
617 interrogate_type_is_typedef(TypeIndex type) {
618  //cerr << "interrogate_type_is_typedef(" << type << ")\n";
619  return InterrogateDatabase::get_ptr()->get_type(type).is_typedef();
620 }
621 
622 TypeIndex
623 interrogate_type_wrapped_type(TypeIndex type) {
624  //cerr << "interrogate_type_wrapped_type(" << type << ")\n";
625  return InterrogateDatabase::get_ptr()->get_type(type).get_wrapped_type();
626 }
627 
628 bool
629 interrogate_type_is_enum(TypeIndex type) {
630  //cerr << "interrogate_type_is_enum(" << type << ")\n";
631  return InterrogateDatabase::get_ptr()->get_type(type).is_enum();
632 }
633 
634 int
635 interrogate_type_number_of_enum_values(TypeIndex type) {
636  //cerr << "interrogate_type_number_of_enum_values(" << type << ")\n";
637  return InterrogateDatabase::get_ptr()->get_type(type).number_of_enum_values();
638 }
639 
640 const char *
641 interrogate_type_enum_value_name(TypeIndex type, int n) {
642  //cerr << "interrogate_type_enum_value_name(" << type << ", " << n << ")\n";
643  return InterrogateDatabase::get_ptr()->get_type(type).get_enum_value_name(n).c_str();
644 }
645 
646 const char *
647 interrogate_type_enum_value_scoped_name(TypeIndex type, int n) {
648  //cerr << "interrogate_type_enum_value_scoped_name(" << type << ", " << n << ")\n";
649  return InterrogateDatabase::get_ptr()->get_type(type).get_enum_value_scoped_name(n).c_str();
650 }
651 
652 const char *
653 interrogate_type_enum_value_comment(TypeIndex type, int n) {
654  //cerr << "interrogate_type_enum_value_comment(" << type << ", " << n << ")\n";
655  return InterrogateDatabase::get_ptr()->get_type(type).get_enum_value_comment(n).c_str();
656 }
657 
658 int
659 interrogate_type_enum_value(TypeIndex type, int n) {
660  //cerr << "interrogate_type_enum_value(" << type << ", " << n << ")\n";
661  return InterrogateDatabase::get_ptr()->get_type(type).get_enum_value(n);
662 }
663 
664 bool
665 interrogate_type_is_struct(TypeIndex type) {
666  //cerr << "interrogate_type_is_struct(" << type << ")\n";
667  return InterrogateDatabase::get_ptr()->get_type(type).is_struct();
668 }
669 
670 bool
671 interrogate_type_is_class(TypeIndex type) {
672  //cerr << "interrogate_type_is_class(" << type << ")\n";
673  return InterrogateDatabase::get_ptr()->get_type(type).is_class();
674 }
675 
676 bool
677 interrogate_type_is_union(TypeIndex type) {
678  //cerr << "interrogate_type_is_union(" << type << ")\n";
679  return InterrogateDatabase::get_ptr()->get_type(type).is_union();
680 }
681 
682 bool
683 interrogate_type_is_fully_defined(TypeIndex type) {
684  //cerr << "interrogate_type_is_fully_defined(" << type << ")\n";
685  return InterrogateDatabase::get_ptr()->get_type(type).is_fully_defined();
686 }
687 
688 bool
689 interrogate_type_is_unpublished(TypeIndex type) {
690  //cerr << "interrogate_type_is_unpublished(" << type << ")\n";
692 }
693 
694 int
695 interrogate_type_number_of_constructors(TypeIndex type) {
696  //cerr << "interrogate_type_number_of_constructors(" << type << ")\n";
697  return InterrogateDatabase::get_ptr()->get_type(type).number_of_constructors();
698 }
699 
700 FunctionIndex
701 interrogate_type_get_constructor(TypeIndex type, int n) {
702  //cerr << "interrogate_type_get_constructor(" << type << ", " << n << ")\n";
703  return InterrogateDatabase::get_ptr()->get_type(type).get_constructor(n);
704 }
705 
706 bool
707 interrogate_type_has_destructor(TypeIndex type) {
708  //cerr << "interrogate_type_has_destructor(" << type << ")\n";
709  return InterrogateDatabase::get_ptr()->get_type(type).has_destructor();
710 }
711 
712 bool
713 interrogate_type_destructor_is_inherited(TypeIndex type) {
714  //cerr << "interrogate_type_destructor_is_inherited(" << type << ")\n";
715  return InterrogateDatabase::get_ptr()->get_type(type).destructor_is_inherited();
716 }
717 
718 FunctionIndex
719 interrogate_type_get_destructor(TypeIndex type) {
720  //cerr << "interrogate_type_get_destructor(" << type << ")\n";
721  return InterrogateDatabase::get_ptr()->get_type(type).get_destructor();
722 }
723 
724 int
725 interrogate_type_number_of_elements(TypeIndex type) {
726  //cerr << "interrogate_type_number_of_elements(" << type << ")\n";
727  return InterrogateDatabase::get_ptr()->get_type(type).number_of_elements();
728 }
729 
730 ElementIndex
731 interrogate_type_get_element(TypeIndex type, int n) {
732  //cerr << "interrogate_type_get_element(" << type << ", " << n << ")\n";
733  return InterrogateDatabase::get_ptr()->get_type(type).get_element(n);
734 }
735 
736 int
737 interrogate_type_number_of_methods(TypeIndex type) {
738  //cerr << "interrogate_type_number_of_methods(" << type << ")\n";
739  return InterrogateDatabase::get_ptr()->get_type(type).number_of_methods();
740 }
741 
742 FunctionIndex
743 interrogate_type_get_method(TypeIndex type, int n) {
744  //cerr << "interrogate_type_get_method(" << type << ", " << n << ")\n";
745  return InterrogateDatabase::get_ptr()->get_type(type).get_method(n);
746 }
747 
748 int
749 interrogate_type_number_of_make_seqs(TypeIndex type) {
750  //cerr << "interrogate_type_number_of_make_seqs(" << type << ")\n";
751  return InterrogateDatabase::get_ptr()->get_type(type).number_of_make_seqs();
752 }
753 
754 MakeSeqIndex
755 interrogate_type_get_make_seq(TypeIndex type, int n) {
756  //cerr << "interrogate_type_get_make_seq(" << type << ", " << n << ")\n";
757  return InterrogateDatabase::get_ptr()->get_type(type).get_make_seq(n);
758 }
759 
760 int
761 interrogate_type_number_of_casts(TypeIndex type) {
762  //cerr << "interrogate_type_number_of_casts(" << type << ")\n";
763  return InterrogateDatabase::get_ptr()->get_type(type).number_of_casts();
764 }
765 
766 FunctionIndex
767 interrogate_type_get_cast(TypeIndex type, int n) {
768  //cerr << "interrogate_type_get_cast(" << type << ", " << n << ")\n";
769  return InterrogateDatabase::get_ptr()->get_type(type).get_cast(n);
770 }
771 
772 int
773 interrogate_type_number_of_derivations(TypeIndex type) {
774  //cerr << "interrogate_type_number_of_derivations(" << type << ")\n";
775  return InterrogateDatabase::get_ptr()->get_type(type).number_of_derivations();
776 }
777 
778 TypeIndex
779 interrogate_type_get_derivation(TypeIndex type, int n) {
780  //cerr << "interrogate_type_get_derivation(" << type << ", " << n << ")\n";
781  return InterrogateDatabase::get_ptr()->get_type(type).get_derivation(n);
782 }
783 
784 bool
785 interrogate_type_derivation_has_upcast(TypeIndex type, int n) {
786  //cerr << "interrogate_type_derivation_has_upcast(" << type << ", " << n << ")\n";
787  return InterrogateDatabase::get_ptr()->get_type(type).derivation_has_upcast(n);
788 }
789 
790 FunctionIndex
791 interrogate_type_get_upcast(TypeIndex type, int n) {
792  //cerr << "interrogate_type_get_upcast(" << type << ", " << n << ")\n";
793  return InterrogateDatabase::get_ptr()->get_type(type).derivation_get_upcast(n);
794 }
795 
796 bool
797 interrogate_type_derivation_downcast_is_impossible(TypeIndex type, int n) {
798  //cerr << "interrogate_type_derivation_downcast_is_impossible(" << type << ", " << n << ")\n";
799  return InterrogateDatabase::get_ptr()->get_type(type).derivation_downcast_is_impossible(n);
800 }
801 
802 bool
803 interrogate_type_derivation_has_downcast(TypeIndex type, int n) {
804  //cerr << "interrogate_type_derivation_has_downcast(" << type << ", " << n << ")\n";
805  return InterrogateDatabase::get_ptr()->get_type(type).derivation_has_downcast(n);
806 }
807 
808 FunctionIndex
809 interrogate_type_get_downcast(TypeIndex type, int n) {
810  //cerr << "interrogate_type_get_downcast(" << type << ", " << n << ")\n";
811  return InterrogateDatabase::get_ptr()->get_type(type).derivation_get_downcast(n);
812 }
813 
814 int
815 interrogate_type_number_of_nested_types(TypeIndex type) {
816  //cerr << "interrogate_type_number_of_nested_types(" << type << ")\n";
817  return InterrogateDatabase::get_ptr()->get_type(type).number_of_nested_types();
818 }
819 
820 TypeIndex
821 interrogate_type_get_nested_type(TypeIndex type, int n) {
822  //cerr << "interrogate_type_get_nested_type(" << type << ", " << n << ")\n";
823  return InterrogateDatabase::get_ptr()->get_type(type).get_nested_type(n);
824 }
const char * get_module_name() const
Returns the module name, if it is known, or NULL if it is not.
TypeIndex lookup_type_by_name(const string &name)
Returns the TypeIndex associated with the first type found with the given name, or 0 if no type has t...
const InterrogateManifest & get_manifest(ManifestIndex manifest)
Returns the manifest constant associated with the given ManifestIndex, if there is one...
int get_num_global_manifests()
Returns the total number of global manifest constants known to the interrogate database.
ManifestIndex lookup_manifest_by_name(const string &name)
Returns the ManifestIndex associated with the first manifest found with the given name...
TypeIndex get_all_type(int n)
Returns the index of the nth type known to the interrogate database.
bool get_error_flag()
Returns the global error flag.
ElementIndex lookup_element_by_name(const string &name)
Returns the ElementIndex associated with the first element found with the given name, or 0 if no element has this name.
const char * get_library_name() const
Returns the library name, if it is known, or NULL if it is not.
bool is_unpublished() const
Returns true if the type is an unpublished type.
ElementIndex lookup_element_by_scoped_name(const string &name)
Returns the ElementIndex associated with the first element found with the given scoped name...
const InterrogateMakeSeq & get_make_seq(MakeSeqIndex element)
Returns the make_seq associated with the given MakeSeqIndex, if there is one.
FunctionIndex get_global_function(int n)
Returns the index of the nth global function known to the interrogate database.
const InterrogateType & get_type(TypeIndex type)
Returns the type associated with the given TypeIndex, if there is one.
static InterrogateDatabase * get_ptr()
Returns the global pointer to the one InterrogateDatabase.
ElementIndex get_global_element(int n)
Returns the index of the nth global data element known to the interrogate database.
void * get_fptr(FunctionWrapperIndex wrapper)
Returns the function pointer associated with the given function wrapper, if it has a pointer availabl...
TypeIndex get_global_type(int n)
Returns the index of the nth global type known to the interrogate database.
FunctionWrapperIndex get_wrapper_by_unique_name(const string &unique_name)
Looks up the function wrapper corresponding to the given unique name, if available.
int get_num_global_functions()
Returns the total number of global functions known to the interrogate database.
FunctionIndex get_all_function(int n)
Returns the index of the nth function known to the interrogate database.
void append_path(const string &path, const string &separator=string())
Adds all of the directories listed in the search path to the end of the search list.
bool has_library_name() const
Returns true if we have a known library name, false if we do not.
bool is_method() const
Returns true if the function is a class method.
TypeIndex get_class() const
Return the class that owns the method, if is_method() returns true.
TypeIndex lookup_type_by_scoped_name(const string &name)
Returns the TypeIndex associated with the first type found with the given scoped name, or 0 if no type has this name.
ManifestIndex get_global_manifest(int n)
Returns the index of the nth global manifest constant known to the interrogate database.
bool has_module_name() const
Returns true if we have a known module name, false if we do not.
const InterrogateElement & get_element(ElementIndex element)
Returns the data element associated with the given ElementIndex, if there is one. ...
TypeIndex get_class() const
Return the class that owns the make_seq.
int get_num_global_types()
Returns the total number of &quot;global&quot; types known to the interrogate database.
TypeIndex lookup_type_by_true_name(const string &name)
Returns the TypeIndex associated with the first type found with the given true name, or 0 if no type has this name.
TypeIndex get_outer_class() const
If is_nested() returns true, this is the class within which this type is defined. ...
const InterrogateFunctionWrapper & get_wrapper(FunctionWrapperIndex wrapper)
Returns the function wrapper associated with the given FunctionWrapperIndex, if there is one...
int get_num_all_functions()
Returns the total number of functions known to the interrogate database.
void append_directory(const Filename &directory)
Adds a new directory to the end of the search list.
bool is_virtual() const
Returns true if the function is virtual, for whatever that&#39;s worth.
int get_num_all_types()
Returns the total number of types known to the interrogate database.
int get_num_global_elements()
Returns the total number of global data elements known to the interrogate database.
const InterrogateFunction & get_function(FunctionIndex function)
Returns the function associated with the given FunctionIndex, if there is one.
bool is_nested() const
Returns true if this type is nested within some class definition.
static Filename from_os_specific(const string &os_specific, Type type=T_general)
This named constructor returns a Panda-style filename (that is, using forward slashes, and no drive letter) based on the supplied filename string that describes a filename in the local system conventions (for instance, on Windows, it may use backslashes or begin with a drive letter and a colon).
Definition: filename.cxx:332