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

Revision 10174, 18.5 kB (checked in by robert, 6 years ago)

Moved Registry::ReadFileCallback? + WriteFileCallback?, and osgDB::ReaderWriter::Options into their own separate Options file and into the osgDB namespace.

Introduced a new callback osgDB::FindFileCallback? that overrides the default behavior of findDataFile/findLibraryFile.

Introduced support for assigning ReaderWriter::Options directory to PagedLOD.

Introduced new osgDB::FileLocationCallback? for assistancing the DatabasePager? to know when a file is hosted on a local or remote file system.

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