15 #include "interrogate_interface.h" 16 #include "interrogateDatabase.h" 17 #include "interrogateType.h" 18 #include "interrogateFunction.h" 19 #include "config_interrogatedb.h" 26 interrogate_add_search_directory(
const char *dirname) {
35 interrogate_add_search_path(
const char *pathstring) {
40 bool interrogate_error_flag() {
46 interrogate_number_of_manifests() {
52 interrogate_get_manifest(
int n) {
58 interrogate_get_manifest_by_name(
const char *manifest_name) {
64 interrogate_manifest_name(ManifestIndex manifest) {
70 interrogate_manifest_definition(ManifestIndex manifest) {
76 interrogate_manifest_has_type(ManifestIndex manifest) {
82 interrogate_manifest_get_type(ManifestIndex manifest) {
88 interrogate_manifest_has_getter(ManifestIndex manifest) {
94 interrogate_manifest_getter(ManifestIndex manifest) {
100 interrogate_manifest_has_int_value(ManifestIndex manifest) {
106 interrogate_manifest_get_int_value(ManifestIndex manifest) {
112 interrogate_element_name(ElementIndex element) {
118 interrogate_element_scoped_name(ElementIndex element) {
124 interrogate_element_has_comment(ElementIndex element) {
130 interrogate_element_comment(ElementIndex element) {
136 interrogate_get_element_by_name(
const char *element_name) {
142 interrogate_get_element_by_scoped_name(
const char *element_name) {
148 interrogate_element_type(ElementIndex element) {
154 interrogate_element_has_getter(ElementIndex element) {
160 interrogate_element_getter(ElementIndex element) {
166 interrogate_element_has_setter(ElementIndex element) {
172 interrogate_element_setter(ElementIndex element) {
178 interrogate_number_of_globals() {
184 interrogate_get_global(
int n) {
190 interrogate_number_of_global_functions() {
196 interrogate_get_global_function(
int n) {
202 interrogate_number_of_functions() {
208 interrogate_get_function(
int n) {
214 interrogate_function_name(FunctionIndex
function) {
220 interrogate_function_scoped_name(FunctionIndex
function) {
226 interrogate_function_has_comment(FunctionIndex
function) {
232 interrogate_function_comment(FunctionIndex
function) {
238 interrogate_function_prototype(FunctionIndex
function) {
244 interrogate_function_is_method(FunctionIndex
function) {
250 interrogate_function_class(FunctionIndex
function) {
256 interrogate_function_has_module_name(FunctionIndex
function) {
262 interrogate_function_module_name(FunctionIndex
function) {
268 interrogate_function_has_library_name(FunctionIndex
function) {
274 interrogate_function_library_name(FunctionIndex
function) {
282 interrogate_function_is_virtual(FunctionIndex
function) {
288 interrogate_function_number_of_c_wrappers(FunctionIndex
function) {
294 interrogate_function_c_wrapper(FunctionIndex
function,
int n) {
300 interrogate_function_number_of_python_wrappers(FunctionIndex
function) {
306 interrogate_function_python_wrapper(FunctionIndex
function,
int n) {
312 interrogate_wrapper_name(FunctionWrapperIndex wrapper) {
314 static string result;
316 return result.c_str();
320 interrogate_wrapper_is_callable_by_name(FunctionWrapperIndex wrapper) {
326 interrogate_wrapper_has_comment(FunctionWrapperIndex wrapper) {
332 interrogate_wrapper_comment(FunctionWrapperIndex wrapper) {
338 interrogate_wrapper_has_return_value(FunctionWrapperIndex wrapper) {
344 interrogate_wrapper_return_type(FunctionWrapperIndex wrapper) {
350 interrogate_wrapper_caller_manages_return_value(FunctionWrapperIndex wrapper) {
356 interrogate_wrapper_return_value_destructor(FunctionWrapperIndex wrapper) {
362 interrogate_wrapper_number_of_parameters(FunctionWrapperIndex wrapper) {
368 interrogate_wrapper_parameter_type(FunctionWrapperIndex wrapper,
int n) {
374 interrogate_wrapper_parameter_has_name(FunctionWrapperIndex wrapper,
int n) {
380 interrogate_wrapper_parameter_name(FunctionWrapperIndex wrapper,
int n) {
386 interrogate_wrapper_parameter_is_this(FunctionWrapperIndex wrapper,
int n) {
392 interrogate_wrapper_has_pointer(FunctionWrapperIndex wrapper) {
398 interrogate_wrapper_pointer(FunctionWrapperIndex wrapper) {
404 interrogate_wrapper_unique_name(FunctionWrapperIndex wrapper) {
406 static string result;
408 return result.c_str();
412 interrogate_get_wrapper_by_unique_name(
const char *unique_name) {
418 interrogate_make_seq_class(MakeSeqIndex make_seq) {
424 interrogate_make_seq_seq_name(MakeSeqIndex make_seq) {
426 static string result;
428 return result.c_str();
432 interrogate_make_seq_num_name(MakeSeqIndex make_seq) {
434 static string result;
436 return result.c_str();
440 interrogate_make_seq_element_name(MakeSeqIndex make_seq) {
442 static string result;
444 return result.c_str();
448 interrogate_number_of_global_types() {
454 interrogate_get_global_type(
int n) {
460 interrogate_number_of_types() {
466 interrogate_get_type(
int n) {
472 interrogate_get_type_by_name(
const char *type_name) {
478 interrogate_get_type_by_scoped_name(
const char *type_name) {
484 interrogate_get_type_by_true_name(
const char *type_name) {
490 interrogate_type_name(TypeIndex type) {
496 interrogate_type_scoped_name(TypeIndex type) {
502 interrogate_type_true_name(TypeIndex type) {
508 interrogate_type_is_nested(TypeIndex type) {
514 interrogate_type_outer_class(TypeIndex type) {
520 interrogate_type_has_comment(TypeIndex type) {
526 interrogate_type_comment(TypeIndex type) {
532 interrogate_type_has_module_name(TypeIndex type) {
538 interrogate_type_module_name(TypeIndex type) {
544 interrogate_type_has_library_name(TypeIndex type) {
550 interrogate_type_library_name(TypeIndex type) {
557 interrogate_type_is_atomic(TypeIndex type) {
563 interrogate_type_atomic_token(TypeIndex type) {
569 interrogate_type_is_unsigned(TypeIndex type) {
575 interrogate_type_is_signed(TypeIndex type) {
581 interrogate_type_is_long(TypeIndex type) {
587 interrogate_type_is_longlong(TypeIndex type) {
593 interrogate_type_is_short(TypeIndex type) {
599 interrogate_type_is_wrapped(TypeIndex type) {
605 interrogate_type_is_pointer(TypeIndex type) {
611 interrogate_type_is_const(TypeIndex type) {
617 interrogate_type_is_typedef(TypeIndex type) {
623 interrogate_type_wrapped_type(TypeIndex type) {
629 interrogate_type_is_enum(TypeIndex type) {
635 interrogate_type_number_of_enum_values(TypeIndex type) {
641 interrogate_type_enum_value_name(TypeIndex type,
int n) {
647 interrogate_type_enum_value_scoped_name(TypeIndex type,
int n) {
653 interrogate_type_enum_value_comment(TypeIndex type,
int n) {
659 interrogate_type_enum_value(TypeIndex type,
int n) {
665 interrogate_type_is_struct(TypeIndex type) {
671 interrogate_type_is_class(TypeIndex type) {
677 interrogate_type_is_union(TypeIndex type) {
683 interrogate_type_is_fully_defined(TypeIndex type) {
689 interrogate_type_is_unpublished(TypeIndex type) {
695 interrogate_type_number_of_constructors(TypeIndex type) {
701 interrogate_type_get_constructor(TypeIndex type,
int n) {
707 interrogate_type_has_destructor(TypeIndex type) {
713 interrogate_type_destructor_is_inherited(TypeIndex type) {
719 interrogate_type_get_destructor(TypeIndex type) {
725 interrogate_type_number_of_elements(TypeIndex type) {
731 interrogate_type_get_element(TypeIndex type,
int n) {
737 interrogate_type_number_of_methods(TypeIndex type) {
743 interrogate_type_get_method(TypeIndex type,
int n) {
749 interrogate_type_number_of_make_seqs(TypeIndex type) {
755 interrogate_type_get_make_seq(TypeIndex type,
int n) {
761 interrogate_type_number_of_casts(TypeIndex type) {
767 interrogate_type_get_cast(TypeIndex type,
int n) {
773 interrogate_type_number_of_derivations(TypeIndex type) {
779 interrogate_type_get_derivation(TypeIndex type,
int n) {
785 interrogate_type_derivation_has_upcast(TypeIndex type,
int n) {
791 interrogate_type_get_upcast(TypeIndex type,
int n) {
797 interrogate_type_derivation_downcast_is_impossible(TypeIndex type,
int n) {
803 interrogate_type_derivation_has_downcast(TypeIndex type,
int n) {
809 interrogate_type_get_downcast(TypeIndex type,
int n) {
815 interrogate_type_number_of_nested_types(TypeIndex type) {
821 interrogate_type_get_nested_type(TypeIndex type,
int n) {
bool has_library_name() const
Returns true if we have a known library name, false if we do 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...
bool is_virtual() const
Returns true if the function is virtual, for whatever that's worth.
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...
bool has_module_name() const
Returns true if we have a known module name, false if we do not.
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.
bool is_method() const
Returns true if the function is a class method.
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 is_unpublished() const
Returns true if the type is an unpublished type.
bool is_nested() const
Returns true if this type is nested within some class definition.
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.
const InterrogateElement & get_element(ElementIndex element)
Returns the data element associated with the given ElementIndex, if there is one. ...
int get_num_global_types()
Returns the total number of "global" types known to the interrogate database.
const char * get_library_name() const
Returns the library name, if it is known, or NULL if it is not.
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_class() const
Return the class that owns the method, if is_method() returns true.
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.
const char * get_module_name() const
Returns the module name, if it is known, or NULL if it is not.
TypeIndex get_outer_class() const
If is_nested() returns true, this is the class within which this type is defined. ...
void append_directory(const Filename &directory)
Adds a new directory to the end of the search list.
int get_num_all_types()
Returns the total number of types known to the interrogate database.
TypeIndex get_class() const
Return the class that owns the make_seq.
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.
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).