root/OpenSceneGraph/trunk/src/osgWrappers/osgDB/Options.cpp @ 10171

Revision 10171, 16.1 kB (checked in by robert, 6 years ago)

Refactored the Registry::ReadFileCallback?, WriteFileCallback? and ReaderWriter::Options to they are now defined in their own header and in the osgDB namespace.

Introduced a new FindFileCallback? to Registry to compliement the existing ReadFileCallback? and WriteFileCallback?.

Added support for assign Find, Read and WriteFileCallbacks? to osdDB::Options to enable plugins/applications to override the callbacks just for that
read/write call and any nested file operations

Line 
1// ***************************************************************************
2//
3//   Generated automatically by genwrapper.
4//   Please DO NOT EDIT this file!
5//
6// ***************************************************************************
7
8#include <osgIntrospection/ReflectionMacros>
9#include <osgIntrospection/TypedMethodInfo>
10#include <osgIntrospection/StaticMethodInfo>
11#include <osgIntrospection/Attributes>
12
13#include <osg/CopyOp>
14#include <osg/Image>
15#include <osg/Node>
16#include <osg/Object>
17#include <osg/Shader>
18#include <osg/Shape>
19#include <osgDB/AuthenticationMap>
20#include <osgDB/Options>
21#include <osgDB/ReaderWriter>
22
23// Must undefine IN and OUT macros defined in Windows headers
24#ifdef IN
25#undef IN
26#endif
27#ifdef OUT
28#undef OUT
29#endif
30
31BEGIN_OBJECT_REFLECTOR(osgDB::FindFileCallback)
32        I_DeclaringFile("osgDB/Options");
33        I_VirtualBaseType(osg::Referenced);
34        I_Constructor0(____FindFileCallback,
35                       "",
36                       "");
37        I_Method3(std::string, findDataFile, IN, const std::string &, filename, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
38                  Properties::VIRTUAL,
39                  __std_string__findDataFile__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
40                  "",
41                  "");
42        I_Method3(std::string, findLibraryFile, IN, const std::string &, filename, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
43                  Properties::VIRTUAL,
44                  __std_string__findLibraryFile__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
45                  "",
46                  "");
47END_REFLECTOR
48
49BEGIN_ENUM_REFLECTOR(osgDB::Options::CacheHintOptions)
50        I_DeclaringFile("osgDB/Options");
51        I_EnumLabel(osgDB::Options::CACHE_NONE);
52        I_EnumLabel(osgDB::Options::CACHE_NODES);
53        I_EnumLabel(osgDB::Options::CACHE_IMAGES);
54        I_EnumLabel(osgDB::Options::CACHE_HEIGHTFIELDS);
55        I_EnumLabel(osgDB::Options::CACHE_ARCHIVES);
56        I_EnumLabel(osgDB::Options::CACHE_OBJECTS);
57        I_EnumLabel(osgDB::Options::CACHE_SHADERS);
58        I_EnumLabel(osgDB::Options::CACHE_ALL);
59END_REFLECTOR
60
61BEGIN_ENUM_REFLECTOR(osgDB::Options::BuildKdTreesHint)
62        I_DeclaringFile("osgDB/Options");
63        I_EnumLabel(osgDB::Options::NO_PREFERENCE);
64        I_EnumLabel(osgDB::Options::DO_NOT_BUILD_KDTREES);
65        I_EnumLabel(osgDB::Options::BUILD_KDTREES);
66END_REFLECTOR
67
68BEGIN_OBJECT_REFLECTOR(osgDB::Options)
69        I_DeclaringFile("osgDB/Options");
70        I_BaseType(osg::Object);
71        I_Constructor0(____Options,
72                       "",
73                       "");
74        I_Constructor1(IN, const std::string &, str,
75                       Properties::NON_EXPLICIT,
76                       ____Options__C5_std_string_R1,
77                       "",
78                       "");
79        I_ConstructorWithDefaults2(IN, const osgDB::Options &, options, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
80                                   ____Options__C5_Options_R1__C5_osg_CopyOp_R1,
81                                   "",
82                                   "");
83        I_Method0(osg::Object *, cloneType,
84                  Properties::VIRTUAL,
85                  __osg_Object_P1__cloneType,
86                  "Clone the type of an object, with Object* return type. ",
87                  "Must be defined by derived classes. ");
88        I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
89                  Properties::VIRTUAL,
90                  __osg_Object_P1__clone__C5_osg_CopyOp_R1,
91                  "Clone an object, with Object* return type. ",
92                  "Must be defined by derived classes. ");
93        I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj,
94                  Properties::VIRTUAL,
95                  __bool__isSameKindAs__C5_osg_Object_P1,
96                  "",
97                  "");
98        I_Method0(const char *, libraryName,
99                  Properties::VIRTUAL,
100                  __C5_char_P1__libraryName,
101                  "return the name of the object's library. ",
102                  "Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. ");
103        I_Method0(const char *, className,
104                  Properties::VIRTUAL,
105                  __C5_char_P1__className,
106                  "return the name of the object's class type. ",
107                  "Must be defined by derived classes. ");
108        I_Method1(void, setOptionString, IN, const std::string &, str,
109                  Properties::NON_VIRTUAL,
110                  __void__setOptionString__C5_std_string_R1,
111                  "Set the general Options string. ",
112                  "");
113        I_Method0(const std::string &, getOptionString,
114                  Properties::NON_VIRTUAL,
115                  __C5_std_string_R1__getOptionString,
116                  "Get the general Options string. ",
117                  "");
118        I_Method1(void, setDatabasePath, IN, const std::string &, str,
119                  Properties::NON_VIRTUAL,
120                  __void__setDatabasePath__C5_std_string_R1,
121                  "Set the database path to use a hint of where to look when loading models. ",
122                  "");
123        I_Method0(osgDB::FilePathList &, getDatabasePathList,
124                  Properties::NON_VIRTUAL,
125                  __FilePathList_R1__getDatabasePathList,
126                  "Get the database path which is used a hint of where to look when loading models. ",
127                  "");
128        I_Method0(const osgDB::FilePathList &, getDatabasePathList,
129                  Properties::NON_VIRTUAL,
130                  __C5_FilePathList_R1__getDatabasePathList,
131                  "Get the const database path which is used a hint of where to look when loading models. ",
132                  "");
133        I_Method1(void, setObjectCacheHint, IN, osgDB::Options::CacheHintOptions, useObjectCache,
134                  Properties::NON_VIRTUAL,
135                  __void__setObjectCacheHint__CacheHintOptions,
136                  "Set whether the Registry::ObjectCache should be used by default. ",
137                  "");
138        I_Method0(osgDB::Options::CacheHintOptions, getObjectCacheHint,
139                  Properties::NON_VIRTUAL,
140                  __CacheHintOptions__getObjectCacheHint,
141                  "Get whether the Registry::ObjectCache should be used by default. ",
142                  "");
143        I_Method1(void, setBuildKdTreesHint, IN, osgDB::Options::BuildKdTreesHint, hint,
144                  Properties::NON_VIRTUAL,
145                  __void__setBuildKdTreesHint__BuildKdTreesHint,
146                  "Set whether the KdTrees should be built for geometry in the loader model. ",
147                  "");
148        I_Method0(osgDB::Options::BuildKdTreesHint, getBuildKdTreesHint,
149                  Properties::NON_VIRTUAL,
150                  __BuildKdTreesHint__getBuildKdTreesHint,
151                  "Get whether the KdTrees should be built for geometry in the loader model. ",
152                  "");
153        I_Method1(void, setAuthenticationMap, IN, osgDB::AuthenticationMap *, authenticationMap,
154                  Properties::NON_VIRTUAL,
155                  __void__setAuthenticationMap__AuthenticationMap_P1,
156                  "Set the password map to be used by plugins when access files from secure locations. ",
157                  "");
158        I_Method0(const osgDB::AuthenticationMap *, getAuthenticationMap,
159                  Properties::NON_VIRTUAL,
160                  __C5_AuthenticationMap_P1__getAuthenticationMap,
161                  "Get the password map to be used by plugins when access files from secure locations. ",
162                  "");
163        I_Method2(void, setPluginData, IN, const std::string &, s, IN, void *, v,
164                  Properties::NON_VIRTUAL,
165                  __void__setPluginData__C5_std_string_R1__void_P1,
166                  "Sets a plugindata value PluginData with a string. ",
167                  "");
168        I_Method1(void *, getPluginData, IN, const std::string &, s,
169                  Properties::NON_VIRTUAL,
170                  __void_P1__getPluginData__C5_std_string_R1,
171                  "Get a value from the PluginData. ",
172                  "");
173        I_Method1(const void *, getPluginData, IN, const std::string &, s,
174                  Properties::NON_VIRTUAL,
175                  __C5_void_P1__getPluginData__C5_std_string_R1,
176                  "Get a value from the PluginData. ",
177                  "");
178        I_Method1(void, removePluginData, IN, const std::string &, s,
179                  Properties::NON_VIRTUAL,
180                  __void__removePluginData__C5_std_string_R1,
181                  "Remove a value from the PluginData. ",
182                  "");
183        I_Method2(void, setPluginStringData, IN, const std::string &, s, IN, const std::string &, v,
184                  Properties::NON_VIRTUAL,
185                  __void__setPluginStringData__C5_std_string_R1__C5_std_string_R1,
186                  "Sets a plugindata value PluginData with a string. ",
187                  "");
188        I_Method1(std::string, getPluginStringData, IN, const std::string &, s,
189                  Properties::NON_VIRTUAL,
190                  __std_string__getPluginStringData__C5_std_string_R1,
191                  "Get a string from the PluginStrData. ",
192                  "");
193        I_Method1(const std::string, getPluginStringData, IN, const std::string &, s,
194                  Properties::NON_VIRTUAL,
195                  __C5_std_string__getPluginStringData__C5_std_string_R1,
196                  "Get a value from the PluginData. ",
197                  "");
198        I_Method1(void, removePluginStringData, IN, const std::string &, s,
199                  Properties::NON_VIRTUAL,
200                  __void__removePluginStringData__C5_std_string_R1,
201                  "Remove a value from the PluginData. ",
202                  "");
203        I_Method1(void, setFindFileCallback, IN, osgDB::FindFileCallback *, cb,
204                  Properties::NON_VIRTUAL,
205                  __void__setFindFileCallback__FindFileCallback_P1,
206                  "Set the find callback to use in place of the default findFile calls. ",
207                  "");
208        I_Method0(osgDB::FindFileCallback *, getFindFileCallback,
209                  Properties::NON_VIRTUAL,
210                  __FindFileCallback_P1__getFindFileCallback,
211                  "Get the const findFile callback. ",
212                  "");
213        I_Method1(void, setReadFileCallback, IN, osgDB::ReadFileCallback *, cb,
214                  Properties::NON_VIRTUAL,
215                  __void__setReadFileCallback__ReadFileCallback_P1,
216                  "Set the read callback to use in place of the default readFile calls. ",
217                  "");
218        I_Method0(osgDB::ReadFileCallback *, getReadFileCallback,
219                  Properties::NON_VIRTUAL,
220                  __ReadFileCallback_P1__getReadFileCallback,
221                  "Get the const readFile callback. ",
222                  "");
223        I_Method1(void, setWriteFileCallback, IN, osgDB::WriteFileCallback *, cb,
224                  Properties::NON_VIRTUAL,
225                  __void__setWriteFileCallback__WriteFileCallback_P1,
226                  "Set the Registry callback to use in place of the default writeFile calls. ",
227                  "");
228        I_Method0(osgDB::WriteFileCallback *, getWriteFileCallback,
229                  Properties::NON_VIRTUAL,
230                  __WriteFileCallback_P1__getWriteFileCallback,
231                  "Get the const writeFile callback. ",
232                  "");
233        I_SimpleProperty(osgDB::AuthenticationMap *, AuthenticationMap,
234                         0,
235                         __void__setAuthenticationMap__AuthenticationMap_P1);
236        I_SimpleProperty(osgDB::Options::BuildKdTreesHint, BuildKdTreesHint,
237                         __BuildKdTreesHint__getBuildKdTreesHint,
238                         __void__setBuildKdTreesHint__BuildKdTreesHint);
239        I_SimpleProperty(const std::string &, DatabasePath,
240                         0,
241                         __void__setDatabasePath__C5_std_string_R1);
242        I_SimpleProperty(osgDB::FilePathList &, DatabasePathList,
243                         __FilePathList_R1__getDatabasePathList,
244                         0);
245        I_SimpleProperty(osgDB::FindFileCallback *, FindFileCallback,
246                         __FindFileCallback_P1__getFindFileCallback,
247                         __void__setFindFileCallback__FindFileCallback_P1);
248        I_SimpleProperty(osgDB::Options::CacheHintOptions, ObjectCacheHint,
249                         __CacheHintOptions__getObjectCacheHint,
250                         __void__setObjectCacheHint__CacheHintOptions);
251        I_SimpleProperty(const std::string &, OptionString,
252                         __C5_std_string_R1__getOptionString,
253                         __void__setOptionString__C5_std_string_R1);
254        I_IndexedProperty(void *, PluginData,
255                          __void_P1__getPluginData__C5_std_string_R1,
256                          __void__setPluginData__C5_std_string_R1__void_P1,
257                          0);
258        I_IndexedProperty(std::string, PluginStringData,
259                          __std_string__getPluginStringData__C5_std_string_R1,
260                          __void__setPluginStringData__C5_std_string_R1__C5_std_string_R1,
261                          0);
262        I_SimpleProperty(osgDB::ReadFileCallback *, ReadFileCallback,
263                         __ReadFileCallback_P1__getReadFileCallback,
264                         __void__setReadFileCallback__ReadFileCallback_P1);
265        I_SimpleProperty(osgDB::WriteFileCallback *, WriteFileCallback,
266                         __WriteFileCallback_P1__getWriteFileCallback,
267                         __void__setWriteFileCallback__WriteFileCallback_P1);
268END_REFLECTOR
269
270BEGIN_OBJECT_REFLECTOR(osgDB::ReadFileCallback)
271        I_DeclaringFile("osgDB/Options");
272        I_VirtualBaseType(osg::Referenced);
273        I_Constructor0(____ReadFileCallback,
274                       "",
275                       "");
276        I_Method4(osgDB::ReaderWriter::ReadResult, openArchive, IN, const std::string &, filename, IN, osgDB::ReaderWriter::ArchiveStatus, status, IN, unsigned int, indexBlockSizeHint, IN, const osgDB::Options *, useObjectCache,
277                  Properties::VIRTUAL,
278                  __ReaderWriter_ReadResult__openArchive__C5_std_string_R1__ReaderWriter_ArchiveStatus__unsigned_int__C5_Options_P1,
279                  "",
280                  "");
281        I_Method2(osgDB::ReaderWriter::ReadResult, readObject, IN, const std::string &, filename, IN, const osgDB::Options *, options,
282                  Properties::VIRTUAL,
283                  __ReaderWriter_ReadResult__readObject__C5_std_string_R1__C5_Options_P1,
284                  "",
285                  "");
286        I_Method2(osgDB::ReaderWriter::ReadResult, readImage, IN, const std::string &, filename, IN, const osgDB::Options *, options,
287                  Properties::VIRTUAL,
288                  __ReaderWriter_ReadResult__readImage__C5_std_string_R1__C5_Options_P1,
289                  "",
290                  "");
291        I_Method2(osgDB::ReaderWriter::ReadResult, readHeightField, IN, const std::string &, filename, IN, const osgDB::Options *, options,
292                  Properties::VIRTUAL,
293                  __ReaderWriter_ReadResult__readHeightField__C5_std_string_R1__C5_Options_P1,
294                  "",
295                  "");
296        I_Method2(osgDB::ReaderWriter::ReadResult, readNode, IN, const std::string &, filename, IN, const osgDB::Options *, options,
297                  Properties::VIRTUAL,
298                  __ReaderWriter_ReadResult__readNode__C5_std_string_R1__C5_Options_P1,
299                  "",
300                  "");
301        I_Method2(osgDB::ReaderWriter::ReadResult, readShader, IN, const std::string &, filename, IN, const osgDB::Options *, options,
302                  Properties::VIRTUAL,
303                  __ReaderWriter_ReadResult__readShader__C5_std_string_R1__C5_Options_P1,
304                  "",
305                  "");
306END_REFLECTOR
307
308BEGIN_OBJECT_REFLECTOR(osgDB::WriteFileCallback)
309        I_DeclaringFile("osgDB/Options");
310        I_VirtualBaseType(osg::Referenced);
311        I_Constructor0(____WriteFileCallback,
312                       "",
313                       "");
314        I_Method3(osgDB::ReaderWriter::WriteResult, writeObject, IN, const osg::Object &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
315                  Properties::VIRTUAL,
316                  __ReaderWriter_WriteResult__writeObject__C5_osg_Object_R1__C5_std_string_R1__C5_Options_P1,
317                  "",
318                  "");
319        I_Method3(osgDB::ReaderWriter::WriteResult, writeImage, IN, const osg::Image &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
320                  Properties::VIRTUAL,
321                  __ReaderWriter_WriteResult__writeImage__C5_osg_Image_R1__C5_std_string_R1__C5_Options_P1,
322                  "",
323                  "");
324        I_Method3(osgDB::ReaderWriter::WriteResult, writeHeightField, IN, const osg::HeightField &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
325                  Properties::VIRTUAL,
326                  __ReaderWriter_WriteResult__writeHeightField__C5_osg_HeightField_R1__C5_std_string_R1__C5_Options_P1,
327                  "",
328                  "");
329        I_Method3(osgDB::ReaderWriter::WriteResult, writeNode, IN, const osg::Node &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
330                  Properties::VIRTUAL,
331                  __ReaderWriter_WriteResult__writeNode__C5_osg_Node_R1__C5_std_string_R1__C5_Options_P1,
332                  "",
333                  "");
334        I_Method3(osgDB::ReaderWriter::WriteResult, writeShader, IN, const osg::Shader &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
335                  Properties::VIRTUAL,
336                  __ReaderWriter_WriteResult__writeShader__C5_osg_Shader_R1__C5_std_string_R1__C5_Options_P1,
337                  "",
338                  "");
339END_REFLECTOR
340
341BEGIN_ENUM_REFLECTOR(osgDB::CaseSensitivity)
342        I_DeclaringFile("osgDB/Options");
343        I_EnumLabel(osgDB::CASE_SENSITIVE);
344        I_EnumLabel(osgDB::CASE_INSENSITIVE);
345END_REFLECTOR
346
347TYPE_NAME_ALIAS(std::deque< std::string >, osgDB::FilePathList)
348
349STD_VECTOR_REFLECTOR(std::deque< std::string >)
Note: See TracBrowser for help on using the browser.