Panda3D
interrogate_request.h
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 interrogate_request.h
10  * @author drose
11  * @date 2000-08-01
12  */
13 
14 #ifndef INTERROGATE_REQUEST
15 #define INTERROGATE_REQUEST
16 
17 #include "dtoolbase.h"
18 
19 /*
20  * The functions here are simple functions that are intended to be
21  * called during static init time for the various libraries that
22  * contain interrogate data. They provide interfaces to add the
23  * module's interrogate data to the main interrogate database.
24  *
25  * The interface is entirely C here--no C++--so that it may be called
26  * from C modules if required.
27  */
28 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 
35 /*
36  * This is the simplest interface. It just requests that the given
37  * database filename (*.in) be read in. This makes the interrogate
38  * data available, but doesn't allow matching the database information
39  * up with any compiled-in function wrappers or anything.
40  */
41 EXPCL_INTERROGATEDB void interrogate_request_database(const char *database_filename);
42 
43 
44 
45 /* The more sophisticated interface uses these structures. */
46 
47 typedef struct {
48  const char *name;
49  int index_offset;
51 
52 typedef struct {
53  int file_identifier;
54 
55  const char *library_name;
56  const char *library_hash_name;
57  const char *module_name;
58  const char *database_filename;
59 
60  InterrogateUniqueNameDef *unique_names;
61  int num_unique_names;
62 
63  void **fptrs;
64  int num_fptrs;
65 
66  int first_index;
67  int next_index;
69 
70 
71 /*
72  * This requests that the given module be loaded and made available.
73  * This includes all of the function pointers and/or unique names that
74  * might be compiled in.
75  */
76 EXPCL_INTERROGATEDB void interrogate_request_module(InterrogateModuleDef *def);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.