14 #ifndef INTERROGATEDATABASE_H 15 #define INTERROGATEDATABASE_H 46 bool get_error_flag();
48 int get_num_global_types();
49 TypeIndex get_global_type(
int n);
50 int get_num_all_types();
51 TypeIndex get_all_type(
int n);
52 int get_num_global_functions();
53 FunctionIndex get_global_function(
int n);
54 int get_num_all_functions();
55 FunctionIndex get_all_function(
int n);
56 int get_num_global_manifests();
57 ManifestIndex get_global_manifest(
int n);
58 int get_num_global_elements();
59 ElementIndex get_global_element(
int n);
68 INLINE TypeIndex lookup_type_by_name(
const std::string &name);
69 INLINE TypeIndex lookup_type_by_scoped_name(
const std::string &name);
70 INLINE TypeIndex lookup_type_by_true_name(
const std::string &name);
71 INLINE ManifestIndex lookup_manifest_by_name(
const std::string &name);
72 INLINE ElementIndex lookup_element_by_name(
const std::string &name);
73 INLINE ElementIndex lookup_element_by_scoped_name(
const std::string &name);
75 void remove_type(TypeIndex type);
77 void *get_fptr(FunctionWrapperIndex wrapper);
79 FunctionWrapperIndex get_wrapper_by_unique_name(
const std::string &unique_name);
81 static int get_file_major_version();
82 static int get_file_minor_version();
83 static int get_current_major_version();
84 static int get_current_minor_version();
88 void set_error_flag(
bool error_flag);
93 void add_wrapper(FunctionWrapperIndex index,
106 int remap_indices(
int first_index);
113 INLINE
void check_latest();
119 bool find_module(FunctionWrapperIndex wrapper,
121 int binary_search_module(
int begin,
int end, FunctionIndex
function);
124 const std::string &wrapper_hash_name);
127 typedef std::map<TypeIndex, InterrogateType> TypeMap;
129 typedef std::map<FunctionIndex, InterrogateFunction *> FunctionMap;
130 FunctionMap _function_map;
131 typedef std::map<FunctionWrapperIndex, InterrogateFunctionWrapper> FunctionWrapperMap;
132 FunctionWrapperMap _wrapper_map;
134 typedef std::map<ManifestIndex, InterrogateManifest> ManifestMap;
135 ManifestMap _manifest_map;
136 typedef std::map<ElementIndex, InterrogateElement> ElementMap;
137 ElementMap _element_map;
139 typedef std::map<MakeSeqIndex, InterrogateMakeSeq> MakeSeqMap;
140 MakeSeqMap _make_seq_map;
142 typedef std::vector<TypeIndex> GlobalTypes;
143 GlobalTypes _global_types;
144 GlobalTypes _all_types;
145 typedef std::vector<FunctionIndex> GlobalFunctions;
146 GlobalFunctions _global_functions;
147 GlobalFunctions _all_functions;
148 typedef std::vector<ManifestIndex> GlobalManifests;
149 GlobalManifests _global_manifests;
150 typedef std::vector<ElementIndex> GlobalElements;
151 GlobalElements _global_elements;
155 typedef std::vector<InterrogateModuleDef *> Modules;
157 typedef std::map<std::string, InterrogateModuleDef *> ModulesByHash;
158 ModulesByHash _modules_by_hash;
161 typedef std::vector<InterrogateModuleDef *> Requests;
168 LT_type_name = 0x001,
169 LT_type_scoped_name = 0x002,
170 LT_type_true_name = 0x004,
171 LT_manifest_name = 0x008,
172 LT_element_name = 0x010,
173 LT_element_scoped_name = 0x020,
177 typedef std::map<std::string, int> Lookup;
178 Lookup _types_by_name;
179 Lookup _types_by_scoped_name;
180 Lookup _types_by_true_name;
181 Lookup _manifests_by_name;
182 Lookup _elements_by_name;
183 Lookup _elements_by_scoped_name;
185 void freshen_types_by_name();
186 void freshen_types_by_scoped_name();
187 void freshen_types_by_true_name();
188 void freshen_manifests_by_name();
189 void freshen_elements_by_name();
190 void freshen_elements_by_scoped_name();
192 int lookup(
const std::string &name,
193 Lookup &lookup, LookupType type,
197 static int _file_major_version;
198 static int _file_minor_version;
199 static int _current_major_version;
200 static int _current_minor_version;
This class manages a mapping of integers to integers.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Represents a synthetic method created via the MAKE_SEQ() macro.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This stores all of the interrogate data and handles reading the data from a disk file when necessary.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An internal representation of a type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An internal representation of a function.
An internal representation of a callable function.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An internal representation of a manifest constant.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An internal representation of a data element, like a data member or a global variable.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.