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
This commit is contained in:
Robert Osfield
2009-05-09 08:49:27 +00:00
parent a4ff2c4af7
commit b7b065abe3
43 changed files with 1180 additions and 825 deletions

View File

@@ -121,7 +121,9 @@ Shader::~Shader()
bool Shader::setType( Type t )
{
if( _type != UNDEFINED )
if (_type==t) return true;
if (_type != UNDEFINED)
{
osg::notify(osg::WARN) << "cannot change type of Shader" << std::endl;
return false;

View File

@@ -27,7 +27,7 @@ osgDB::Archive* osgDB::openArchive(const std::string& filename, ReaderWriter::Ar
return openArchive(filename, status, indexBlockSizeHint, Registry::instance()->getOptions());
}
osgDB::Archive* osgDB::openArchive(const std::string& filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint,ReaderWriter::Options* options)
osgDB::Archive* osgDB::openArchive(const std::string& filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint,Options* options)
{
// ensure archive extension is in the registry list
std::string::size_type dot = filename.find_last_of('.');

View File

@@ -37,6 +37,7 @@ SET(LIB_PUBLIC_HEADERS
${HEADER_PATH}/ImagePager
${HEADER_PATH}/Input
${HEADER_PATH}/Output
${HEADER_PATH}/Options
${HEADER_PATH}/ParameterOutput
${HEADER_PATH}/PluginQuery
${HEADER_PATH}/ReaderWriter
@@ -71,6 +72,7 @@ ADD_LIBRARY(${LIB_NAME}
Input.cpp
MimeTypes.cpp
Output.cpp
Options.cpp
PluginQuery.cpp
ReaderWriter.cpp
ReadFile.cpp

View File

@@ -122,7 +122,7 @@ public:
_changeAnisotropy(changeAnisotropy), _valueAnisotropy(valueAnisotropy),
_drawablePolicy(drawablePolicy), _pager(pager)
{
if (osgDB::Registry::instance()->getBuildKdTreesHint()==osgDB::ReaderWriter::Options::BUILD_KDTREES &&
if (osgDB::Registry::instance()->getBuildKdTreesHint()==osgDB::Options::BUILD_KDTREES &&
osgDB::Registry::instance()->getKdTreeBuilder())
{
_kdTreeBuilder = osgDB::Registry::instance()->getKdTreeBuilder()->clone();
@@ -679,7 +679,7 @@ void DatabasePager::DatabaseThread::run()
else
{
// check to see if we need to run the KdTreeBuilder
if (osgDB::Registry::instance()->getBuildKdTreesHint()==osgDB::ReaderWriter::Options::BUILD_KDTREES &&
if (osgDB::Registry::instance()->getBuildKdTreesHint()==osgDB::Options::BUILD_KDTREES &&
osgDB::Registry::instance()->getKdTreeBuilder())
{
//osg::Timer_t before = osg::Timer::instance()->tick();
@@ -1238,7 +1238,7 @@ void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* grou
void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* group,
float priority, const osg::FrameStamp* framestamp,
osg::ref_ptr<osg::Referenced>& databaseRequestRef,
ReaderWriter::Options* loadOptions)
Options* loadOptions)
{
if (!_acceptNewRequests) return;

View File

@@ -46,7 +46,7 @@ bool FileCache::existsInCache(const std::string& originalFileName) const
return osgDB::fileExists(createCacheFileName(originalFileName));
}
ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName, const osgDB::ReaderWriter::Options* options, bool buildKdTreeIfRequired) const
ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName, const osgDB::Options* options, bool buildKdTreeIfRequired) const
{
std::string cacheFileName = createCacheFileName(originalFileName);
if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName))
@@ -60,7 +60,7 @@ ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName
}
}
ReaderWriter::WriteResult FileCache::writeNode(const osg::Node& node, const std::string& originalFileName, const osgDB::ReaderWriter::Options* options) const
ReaderWriter::WriteResult FileCache::writeNode(const osg::Node& node, const std::string& originalFileName, const osgDB::Options* options) const
{
std::string cacheFileName = createCacheFileName(originalFileName);
if (!cacheFileName.empty())

View File

@@ -289,91 +289,17 @@ std::string osgDB::findFileInPath(const std::string& filename, const FilePathLis
std::string osgDB::findDataFile(const std::string& filename,CaseSensitivity caseSensitivity)
{
return findDataFile(filename,static_cast<ReaderWriter::Options*>(0),caseSensitivity);
return findDataFile(filename,static_cast<Options*>(0),caseSensitivity);
}
OSGDB_EXPORT std::string osgDB::findDataFile(const std::string& filename,const ReaderWriter::Options* options, CaseSensitivity caseSensitivity)
OSGDB_EXPORT std::string osgDB::findDataFile(const std::string& filename,const Options* options, CaseSensitivity caseSensitivity)
{
if (filename.empty()) return filename;
if(fileExists(filename))
{
osg::notify(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl;
return filename;
}
std::string fileFound;
if (options && !options->getDatabasePathList().empty())
{
fileFound = findFileInPath(filename, options->getDatabasePathList(), caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
const FilePathList& filepath = Registry::instance()->getDataFilePathList();
if (!filepath.empty())
{
fileFound = findFileInPath(filename, filepath,caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
// if a directory is included in the filename, get just the (simple) filename itself and try that
std::string simpleFileName = getSimpleFileName(filename);
if (simpleFileName!=filename)
{
if(fileExists(simpleFileName))
{
osg::notify(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl;
return simpleFileName;
}
if (options && !options->getDatabasePathList().empty())
{
fileFound = findFileInPath(simpleFileName, options->getDatabasePathList(), caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
if (!filepath.empty())
{
fileFound = findFileInPath(simpleFileName, filepath,caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
}
// return empty string.
return std::string();
return Registry::instance()->findDataFile(filename, options, caseSensitivity);
}
std::string osgDB::findLibraryFile(const std::string& filename,CaseSensitivity caseSensitivity)
{
if (filename.empty())
return filename;
const FilePathList& filepath = Registry::instance()->getLibraryFilePathList();
std::string fileFound = findFileInPath(filename, filepath,caseSensitivity);
if (!fileFound.empty())
return fileFound;
if(fileExists(filename))
{
osg::notify(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl;
return filename;
}
// if a directory is included in the filename, get just the (simple) filename itself and try that
std::string simpleFileName = getSimpleFileName(filename);
if (simpleFileName!=filename)
{
std::string fileFound = findFileInPath(simpleFileName, filepath,caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
// failed return empty string.
return std::string();
return Registry::instance()->findLibraryFile(filename, osgDB::Registry::instance()->getOptions(), caseSensitivity);
}
std::string osgDB::findFileInDirectory(const std::string& fileName,const std::string& dirName,CaseSensitivity caseSensitivity)

94
src/osgDB/Options.cpp Normal file
View File

@@ -0,0 +1,94 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include <osgDB/Options>
#include <osgDB/Registry>
using namespace osgDB;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// FindFileCallback default implementation
//
std::string FindFileCallback::findDataFile(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity)
{
return osgDB::Registry::instance()->findDataFileImplementation(filename, options, caseSensitivity);
}
std::string FindFileCallback::findLibraryFile(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity)
{
return osgDB::Registry::instance()->findLibraryFileImplementation(filename, options, caseSensitivity);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// ReadFileCallback default implementation
//
ReaderWriter::ReadResult ReadFileCallback::openArchive(const std::string& filename,ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const Options* useObjectCache)
{
return osgDB::Registry::instance()->openArchiveImplementation(filename, status, indexBlockSizeHint, useObjectCache);
}
ReaderWriter::ReadResult ReadFileCallback::readObject(const std::string& filename, const Options* options)
{
return osgDB::Registry::instance()->readObjectImplementation(filename,options);
}
ReaderWriter::ReadResult ReadFileCallback::readImage(const std::string& filename, const Options* options)
{
return osgDB::Registry::instance()->readImageImplementation(filename,options);
}
ReaderWriter::ReadResult ReadFileCallback::readHeightField(const std::string& filename, const Options* options)
{
return osgDB::Registry::instance()->readHeightFieldImplementation(filename,options);
}
ReaderWriter::ReadResult ReadFileCallback::readNode(const std::string& filename, const Options* options)
{
return osgDB::Registry::instance()->readNodeImplementation(filename,options);
}
ReaderWriter::ReadResult ReadFileCallback::readShader(const std::string& filename, const Options* options)
{
return osgDB::Registry::instance()->readShaderImplementation(filename,options);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// WriteFileCallback default implementation
//
ReaderWriter::WriteResult WriteFileCallback::writeObject(const osg::Object& obj, const std::string& fileName,const Options* options)
{
return osgDB::Registry::instance()->writeObjectImplementation(obj,fileName,options);
}
ReaderWriter::WriteResult WriteFileCallback::writeImage(const osg::Image& obj, const std::string& fileName,const Options* options)
{
return osgDB::Registry::instance()->writeImageImplementation(obj,fileName,options);
}
ReaderWriter::WriteResult WriteFileCallback::writeHeightField(const osg::HeightField& obj, const std::string& fileName,const Options* options)
{
return osgDB::Registry::instance()->writeHeightFieldImplementation(obj,fileName,options);
}
ReaderWriter::WriteResult WriteFileCallback::writeNode(const osg::Node& obj, const std::string& fileName,const Options* options)
{
return osgDB::Registry::instance()->writeNodeImplementation(obj,fileName,options);
}
ReaderWriter::WriteResult WriteFileCallback::writeShader(const osg::Shader& obj, const std::string& fileName,const Options* options)
{
return osgDB::Registry::instance()->writeShaderImplementation(obj,fileName,options);
}

View File

@@ -63,7 +63,7 @@ void Output::init()
}
}
void Output::setOptions(const ReaderWriter::Options* options)
void Output::setOptions(const Options* options)
{
_options = options;
}

View File

@@ -29,7 +29,7 @@
using namespace osg;
using namespace osgDB;
Object* osgDB::readObjectFile(const std::string& filename,const ReaderWriter::Options* options)
Object* osgDB::readObjectFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readObject(filename,options);
if (rr.validObject()) return rr.takeObject();
@@ -38,7 +38,7 @@ Object* osgDB::readObjectFile(const std::string& filename,const ReaderWriter::Op
}
Image* osgDB::readImageFile(const std::string& filename,const ReaderWriter::Options* options)
Image* osgDB::readImageFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename,options);
if (rr.validImage()) return rr.takeImage();
@@ -46,7 +46,7 @@ Image* osgDB::readImageFile(const std::string& filename,const ReaderWriter::Opti
return NULL;
}
Shader* osgDB::readShaderFile(const std::string& filename,const ReaderWriter::Options* options)
Shader* osgDB::readShaderFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readShader(filename,options);
if (rr.validShader()) return rr.takeShader();
@@ -55,7 +55,7 @@ Shader* osgDB::readShaderFile(const std::string& filename,const ReaderWriter::Op
}
HeightField* osgDB::readHeightFieldFile(const std::string& filename,const ReaderWriter::Options* options)
HeightField* osgDB::readHeightFieldFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readHeightField(filename,options);
if (rr.validHeightField()) return rr.takeHeightField();
@@ -64,7 +64,7 @@ HeightField* osgDB::readHeightFieldFile(const std::string& filename,const Reader
}
Node* osgDB::readNodeFile(const std::string& filename,const ReaderWriter::Options* options)
Node* osgDB::readNodeFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readNode(filename,options);
if (rr.validNode()) return rr.takeNode();
@@ -72,7 +72,7 @@ Node* osgDB::readNodeFile(const std::string& filename,const ReaderWriter::Option
return NULL;
}
Node* osgDB::readNodeFiles(std::vector<std::string>& commandLine,const ReaderWriter::Options* options)
Node* osgDB::readNodeFiles(std::vector<std::string>& commandLine,const Options* options)
{
typedef std::vector<osg::Node*> NodeList;
NodeList nodeList;
@@ -121,7 +121,7 @@ Node* osgDB::readNodeFiles(std::vector<std::string>& commandLine,const ReaderWri
}
Node* osgDB::readNodeFiles(osg::ArgumentParser& arguments,const ReaderWriter::Options* options)
Node* osgDB::readNodeFiles(osg::ArgumentParser& arguments,const Options* options)
{
typedef std::vector< osg::ref_ptr<osg::Node> > NodeList;
@@ -255,7 +255,7 @@ Node* osgDB::readNodeFiles(osg::ArgumentParser& arguments,const ReaderWriter::Op
}
osg::ref_ptr<osg::Object> osgDB::readRefObjectFile(const std::string& filename,const ReaderWriter::Options* options)
osg::ref_ptr<osg::Object> osgDB::readRefObjectFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readObject(filename,options);
if (rr.validObject()) return osg::ref_ptr<osg::Object>(rr.getObject());
@@ -263,7 +263,7 @@ osg::ref_ptr<osg::Object> osgDB::readRefObjectFile(const std::string& filename,c
return NULL;
}
osg::ref_ptr<osg::Image> osgDB::readRefImageFile(const std::string& filename,const ReaderWriter::Options* options)
osg::ref_ptr<osg::Image> osgDB::readRefImageFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename,options);
if (rr.validImage()) return osg::ref_ptr<osg::Image>(rr.getImage());
@@ -271,7 +271,7 @@ osg::ref_ptr<osg::Image> osgDB::readRefImageFile(const std::string& filename,con
return NULL;
}
osg::ref_ptr<osg::Shader> osgDB::readRefShaderFile(const std::string& filename,const ReaderWriter::Options* options)
osg::ref_ptr<osg::Shader> osgDB::readRefShaderFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readShader(filename,options);
if (rr.validShader()) return osg::ref_ptr<osg::Shader>(rr.getShader());
@@ -279,7 +279,7 @@ osg::ref_ptr<osg::Shader> osgDB::readRefShaderFile(const std::string& filename,c
return NULL;
}
osg::ref_ptr<osg::HeightField> osgDB::readRefHeightFieldFile(const std::string& filename,const ReaderWriter::Options* options)
osg::ref_ptr<osg::HeightField> osgDB::readRefHeightFieldFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readHeightField(filename,options);
if (rr.validHeightField()) return osg::ref_ptr<osg::HeightField>(rr.getHeightField());
@@ -287,7 +287,7 @@ osg::ref_ptr<osg::HeightField> osgDB::readRefHeightFieldFile(const std::string&
return NULL;
}
osg::ref_ptr<osg::Node> osgDB::readRefNodeFile(const std::string& filename,const ReaderWriter::Options* options)
osg::ref_ptr<osg::Node> osgDB::readRefNodeFile(const std::string& filename,const Options* options)
{
ReaderWriter::ReadResult rr = Registry::instance()->readNode(filename,options);
if (rr.validNode()) return osg::ref_ptr<osg::Node>(rr.getNode());

View File

@@ -12,6 +12,7 @@
*/
#include <osgDB/ReaderWriter>
#include <osgDB/Registry>
#include <osgDB/FileNameUtils>
#include <osgDB/Archive>

View File

@@ -176,15 +176,15 @@ Registry::Registry()
// comment out because it was causing problems under OSX - causing it to crash osgconv when constructing ostream in osg::notify().
// notify(INFO) << "Constructing osg::Registry"<<std::endl;
_buildKdTreesHint = ReaderWriter::Options::NO_PREFERENCE;
_buildKdTreesHint = Options::NO_PREFERENCE;
_kdTreeBuilder = new osg::KdTreeBuilder;
const char* kdtree_str = getenv("OSG_BUILD_KDTREES");
if (kdtree_str)
{
bool switchOff = (strcmp(kdtree_str, "off")==0 || strcmp(kdtree_str, "OFF")==0 || strcmp(kdtree_str, "Off")==0 );
if (switchOff) _buildKdTreesHint = ReaderWriter::Options::DO_NOT_BUILD_KDTREES;
else _buildKdTreesHint = ReaderWriter::Options::BUILD_KDTREES;
if (switchOff) _buildKdTreesHint = Options::DO_NOT_BUILD_KDTREES;
else _buildKdTreesHint = Options::BUILD_KDTREES;
}
const char* fileCachePath = getenv("OSG_FILE_CACHE");
@@ -462,7 +462,7 @@ void Registry::readCommandLine(osg::ArgumentParser& arguments)
while(arguments.read("-O",value))
{
setOptions(new ReaderWriter::Options(value));
setOptions(new Options(value));
}
}
@@ -1417,7 +1417,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
struct Registry::ReadObjectFunctor : public Registry::ReadFunctor
{
ReadObjectFunctor(const std::string& filename, const ReaderWriter::Options* options):ReadFunctor(filename,options) {}
ReadObjectFunctor(const std::string& filename, const Options* options):ReadFunctor(filename,options) {}
virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw) const { return rw.readObject(_filename, _options); }
virtual bool isValid(ReaderWriter::ReadResult& readResult) const { return readResult.validObject(); }
@@ -1426,7 +1426,7 @@ struct Registry::ReadObjectFunctor : public Registry::ReadFunctor
struct Registry::ReadImageFunctor : public Registry::ReadFunctor
{
ReadImageFunctor(const std::string& filename, const ReaderWriter::Options* options):ReadFunctor(filename,options) {}
ReadImageFunctor(const std::string& filename, const Options* options):ReadFunctor(filename,options) {}
virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw)const { return rw.readImage(_filename, _options); }
virtual bool isValid(ReaderWriter::ReadResult& readResult) const { return readResult.validImage(); }
@@ -1435,7 +1435,7 @@ struct Registry::ReadImageFunctor : public Registry::ReadFunctor
struct Registry::ReadHeightFieldFunctor : public Registry::ReadFunctor
{
ReadHeightFieldFunctor(const std::string& filename, const ReaderWriter::Options* options):ReadFunctor(filename,options) {}
ReadHeightFieldFunctor(const std::string& filename, const Options* options):ReadFunctor(filename,options) {}
virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw) const { return rw.readHeightField(_filename, _options); }
virtual bool isValid(ReaderWriter::ReadResult& readResult) const { return readResult.validHeightField(); }
@@ -1444,7 +1444,7 @@ struct Registry::ReadHeightFieldFunctor : public Registry::ReadFunctor
struct Registry::ReadNodeFunctor : public Registry::ReadFunctor
{
ReadNodeFunctor(const std::string& filename, const ReaderWriter::Options* options):ReadFunctor(filename,options) {}
ReadNodeFunctor(const std::string& filename, const Options* options):ReadFunctor(filename,options) {}
virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw) const { return rw.readNode(_filename, _options); }
virtual bool isValid(ReaderWriter::ReadResult& readResult) const { return readResult.validNode(); }
@@ -1454,7 +1454,7 @@ struct Registry::ReadNodeFunctor : public Registry::ReadFunctor
struct Registry::ReadArchiveFunctor : public Registry::ReadFunctor
{
ReadArchiveFunctor(const std::string& filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const ReaderWriter::Options* options):
ReadArchiveFunctor(const std::string& filename, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const Options* options):
ReadFunctor(filename,options),
_status(status),
_indexBlockSizeHint(indexBlockSizeHint) {}
@@ -1470,7 +1470,7 @@ struct Registry::ReadArchiveFunctor : public Registry::ReadFunctor
struct Registry::ReadShaderFunctor : public Registry::ReadFunctor
{
ReadShaderFunctor(const std::string& filename, const ReaderWriter::Options* options):ReadFunctor(filename,options) {}
ReadShaderFunctor(const std::string& filename, const Options* options):ReadFunctor(filename,options) {}
virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw)const { return rw.readShader(_filename, _options); }
virtual bool isValid(ReaderWriter::ReadResult& readResult) const { return readResult.validShader(); }
@@ -1489,6 +1489,92 @@ void Registry::addArchiveExtension(const std::string ext)
_archiveExtList.push_back(ext);
}
std::string Registry::findDataFileImplementation(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity)
{
if (filename.empty()) return filename;
if(fileExists(filename))
{
osg::notify(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl;
return filename;
}
std::string fileFound;
if (options && !options->getDatabasePathList().empty())
{
fileFound = findFileInPath(filename, options->getDatabasePathList(), caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
const FilePathList& filepath = Registry::instance()->getDataFilePathList();
if (!filepath.empty())
{
fileFound = findFileInPath(filename, filepath,caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
// if a directory is included in the filename, get just the (simple) filename itself and try that
std::string simpleFileName = getSimpleFileName(filename);
if (simpleFileName!=filename)
{
if(fileExists(simpleFileName))
{
osg::notify(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl;
return simpleFileName;
}
if (options && !options->getDatabasePathList().empty())
{
fileFound = findFileInPath(simpleFileName, options->getDatabasePathList(), caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
if (!filepath.empty())
{
fileFound = findFileInPath(simpleFileName, filepath,caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
}
// return empty string.
return std::string();
}
std::string Registry::findLibraryFileImplementation(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity)
{
if (filename.empty())
return filename;
const FilePathList& filepath = Registry::instance()->getLibraryFilePathList();
std::string fileFound = findFileInPath(filename, filepath,caseSensitivity);
if (!fileFound.empty())
return fileFound;
if(fileExists(filename))
{
osg::notify(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl;
return filename;
}
// if a directory is included in the filename, get just the (simple) filename itself and try that
std::string simpleFileName = getSimpleFileName(filename);
if (simpleFileName!=filename)
{
std::string fileFound = findFileInPath(simpleFileName, filepath,caseSensitivity);
if (!fileFound.empty()) return fileFound;
}
// failed return empty string.
return std::string();
}
ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
{
for(ArchiveExtensionList::iterator aitr=_archiveExtList.begin();
@@ -1514,7 +1600,7 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
osgDB::Archive* archive = result.getArchive();
osg::ref_ptr<ReaderWriter::Options> options = new ReaderWriter::Options;
osg::ref_ptr<Options> options = new Options;
options->setDatabasePath(archiveName);
return archive->readObject(fileName,options.get());
@@ -1650,15 +1736,15 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
return results.front();
}
ReaderWriter::ReadResult Registry::readImplementation(const ReadFunctor& readFunctor,ReaderWriter::Options::CacheHintOptions cacheHint)
ReaderWriter::ReadResult Registry::readImplementation(const ReadFunctor& readFunctor,Options::CacheHintOptions cacheHint)
{
std::string file(readFunctor._filename);
bool useObjectCache=false;
//Note CACHE_ARCHIVES has a different object that it caches to so it will never be used here
if (cacheHint!=ReaderWriter::Options::CACHE_ARCHIVES)
if (cacheHint!=Options::CACHE_ARCHIVES)
{
const ReaderWriter::Options* options=readFunctor._options;
const Options* options=readFunctor._options;
useObjectCache=options ? (options->getObjectCacheHint()&cacheHint)!=0: false;
}
if (useObjectCache)
@@ -1698,17 +1784,17 @@ ReaderWriter::ReadResult Registry::readImplementation(const ReadFunctor& readFun
}
ReaderWriter::ReadResult Registry::openArchiveImplementation(const std::string& fileName, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const ReaderWriter::Options* options)
ReaderWriter::ReadResult Registry::openArchiveImplementation(const std::string& fileName, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const Options* options)
{
osgDB::Archive* archive = getFromArchiveCache(fileName);
if (archive) return archive;
ReaderWriter::ReadResult result = readImplementation(ReadArchiveFunctor(fileName, status, indexBlockSizeHint, options),ReaderWriter::Options::CACHE_ARCHIVES);
ReaderWriter::ReadResult result = readImplementation(ReadArchiveFunctor(fileName, status, indexBlockSizeHint, options),Options::CACHE_ARCHIVES);
// default to using caching archive if no options structure provided, but if options are provided use archives
// only if supplied.
if (result.validArchive() &&
(!options || (options->getObjectCacheHint() & ReaderWriter::Options::CACHE_ARCHIVES)) )
(!options || (options->getObjectCacheHint() & Options::CACHE_ARCHIVES)) )
{
addToArchiveCache(fileName,result.getArchive());
}
@@ -1716,12 +1802,12 @@ ReaderWriter::ReadResult Registry::openArchiveImplementation(const std::string&
}
ReaderWriter::ReadResult Registry::readObjectImplementation(const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::ReadResult Registry::readObjectImplementation(const std::string& fileName,const Options* options)
{
return readImplementation(ReadObjectFunctor(fileName, options),ReaderWriter::Options::CACHE_OBJECTS);
return readImplementation(ReadObjectFunctor(fileName, options),Options::CACHE_OBJECTS);
}
ReaderWriter::WriteResult Registry::writeObjectImplementation(const Object& obj,const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::WriteResult Registry::writeObjectImplementation(const Object& obj,const std::string& fileName,const Options* options)
{
// record the errors reported by readerwriters.
typedef std::vector<ReaderWriter::WriteResult> Results;
@@ -1768,12 +1854,12 @@ ReaderWriter::WriteResult Registry::writeObjectImplementation(const Object& obj,
ReaderWriter::ReadResult Registry::readImageImplementation(const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::ReadResult Registry::readImageImplementation(const std::string& fileName,const Options* options)
{
return readImplementation(ReadImageFunctor(fileName, options),ReaderWriter::Options::CACHE_IMAGES);
return readImplementation(ReadImageFunctor(fileName, options),Options::CACHE_IMAGES);
}
ReaderWriter::WriteResult Registry::writeImageImplementation(const Image& image,const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::WriteResult Registry::writeImageImplementation(const Image& image,const std::string& fileName,const Options* options)
{
// record the errors reported by readerwriters.
typedef std::vector<ReaderWriter::WriteResult> Results;
@@ -1821,12 +1907,12 @@ ReaderWriter::WriteResult Registry::writeImageImplementation(const Image& image,
}
ReaderWriter::ReadResult Registry::readHeightFieldImplementation(const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::ReadResult Registry::readHeightFieldImplementation(const std::string& fileName,const Options* options)
{
return readImplementation(ReadHeightFieldFunctor(fileName, options),ReaderWriter::Options::CACHE_HEIGHTFIELDS);
return readImplementation(ReadHeightFieldFunctor(fileName, options),Options::CACHE_HEIGHTFIELDS);
}
ReaderWriter::WriteResult Registry::writeHeightFieldImplementation(const HeightField& HeightField,const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::WriteResult Registry::writeHeightFieldImplementation(const HeightField& HeightField,const std::string& fileName,const Options* options)
{
// record the errors reported by readerwriters.
typedef std::vector<ReaderWriter::WriteResult> Results;
@@ -1874,24 +1960,24 @@ ReaderWriter::WriteResult Registry::writeHeightFieldImplementation(const HeightF
}
ReaderWriter::ReadResult Registry::readNodeImplementation(const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::ReadResult Registry::readNodeImplementation(const std::string& fileName,const Options* options)
{
#if 0
osg::Timer_t startTick = osg::Timer::instance()->tick();
ReaderWriter::ReadResult result = readImplementation(ReadNodeFunctor(fileName, options),ReaderWriter::Options::CACHE_NODES);
ReaderWriter::ReadResult result = readImplementation(ReadNodeFunctor(fileName, options),Options::CACHE_NODES);
osg::Timer_t endTick = osg::Timer::instance()->tick();
osg::notify(osg::NOTICE)<<"time to load "<<fileName<<" "<<osg::Timer::instance()->delta_m(startTick, endTick)<<"ms"<<std::endl;
return result;
#else
return readImplementation(ReadNodeFunctor(fileName, options),ReaderWriter::Options::CACHE_NODES);
return readImplementation(ReadNodeFunctor(fileName, options),Options::CACHE_NODES);
#endif
}
ReaderWriter::WriteResult Registry::writeNodeImplementation(const Node& node,const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::WriteResult Registry::writeNodeImplementation(const Node& node,const std::string& fileName,const Options* options)
{
// record the errors reported by readerwriters.
typedef std::vector<ReaderWriter::WriteResult> Results;
@@ -1941,12 +2027,12 @@ ReaderWriter::WriteResult Registry::writeNodeImplementation(const Node& node,con
return results.front();
}
ReaderWriter::ReadResult Registry::readShaderImplementation(const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::ReadResult Registry::readShaderImplementation(const std::string& fileName,const Options* options)
{
return readImplementation(ReadShaderFunctor(fileName, options),ReaderWriter::Options::CACHE_SHADERS);
return readImplementation(ReadShaderFunctor(fileName, options),Options::CACHE_SHADERS);
}
ReaderWriter::WriteResult Registry::writeShaderImplementation(const Shader& shader,const std::string& fileName,const ReaderWriter::Options* options)
ReaderWriter::WriteResult Registry::writeShaderImplementation(const Shader& shader,const std::string& fileName,const Options* options)
{
// record the errors reported by readerwriters.
typedef std::vector<ReaderWriter::WriteResult> Results;

View File

@@ -24,7 +24,7 @@
using namespace osg;
using namespace osgDB;
bool osgDB::writeObjectFile(const Object& object,const std::string& filename, const ReaderWriter::Options* options )
bool osgDB::writeObjectFile(const Object& object,const std::string& filename, const Options* options )
{
ReaderWriter::WriteResult wr = Registry::instance()->writeObject( object, filename, options );
if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl;
@@ -32,7 +32,7 @@ bool osgDB::writeObjectFile(const Object& object,const std::string& filename, co
}
bool osgDB::writeImageFile(const Image& image,const std::string& filename, const ReaderWriter::Options* options )
bool osgDB::writeImageFile(const Image& image,const std::string& filename, const Options* options )
{
ReaderWriter::WriteResult wr = Registry::instance()->writeImage( image, filename, options );
if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl;
@@ -40,21 +40,21 @@ bool osgDB::writeImageFile(const Image& image,const std::string& filename, const
}
bool osgDB::writeHeightFieldFile(const HeightField& HeightField,const std::string& filename, const ReaderWriter::Options* options )
bool osgDB::writeHeightFieldFile(const HeightField& HeightField,const std::string& filename, const Options* options )
{
ReaderWriter::WriteResult wr = Registry::instance()->writeHeightField( HeightField, filename, options );
if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl;
return wr.success();
}
bool osgDB::writeNodeFile(const Node& node,const std::string& filename, const ReaderWriter::Options* options )
bool osgDB::writeNodeFile(const Node& node,const std::string& filename, const Options* options )
{
ReaderWriter::WriteResult wr = Registry::instance()->writeNode( node, filename, options );
if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl;
return wr.success();
}
bool osgDB::writeShaderFile(const Shader& shader,const std::string& filename, const ReaderWriter::Options* options )
bool osgDB::writeShaderFile(const Shader& shader,const std::string& filename, const Options* options )
{
ReaderWriter::WriteResult wr = Registry::instance()->writeShader( shader, filename, options );
if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl;

View File

@@ -18,7 +18,7 @@
using namespace osgDB;
XmlNode* osgDB::readXmlFile(const std::string& filename,const ReaderWriter::Options* options)
XmlNode* osgDB::readXmlFile(const std::string& filename,const Options* options)
{
std::string foundFile = osgDB::findDataFile(filename, options);
if (!foundFile.empty())

View File

@@ -27,6 +27,7 @@
#include <osg/PolygonOffset>
#include <osg/Depth>
#include <osgDB/ReaderWriter>
#include <osgDB/Options>
#include "Types.h"
#include "Record.h"

View File

@@ -21,7 +21,7 @@
#include <osg/Node>
#include <osg/Notify>
#include <osgDB/ReaderWriter>
#include <osgDB/Options>
#include <osgDB/FileNameUtils>
#include <string>
@@ -38,7 +38,7 @@ namespace flt
Features a parser for the Option string as well as getter
methods for supported options.
*/
class ExportOptions : public osgDB::ReaderWriter::Options
class ExportOptions : public osgDB::Options
{
public:
ExportOptions( const Options* opt );

View File

@@ -16,6 +16,8 @@
#include "PagedLOD.h"
#include "Node.h"
#include <osgDB/Options>
using namespace ive;
void PagedLOD::write(DataOutputStream* out)

View File

@@ -1405,6 +1405,15 @@ osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(const std::string&
return readNode(input, local_opt);
}
struct MyFindFileCallback : public osgDB::FindFileCallback
{
virtual std::string findDataFile(const std::string& filename, const osgDB::Options* options, osgDB::CaseSensitivity caseSensitivity)
{
osg::notify(osg::NOTICE)<<"find file "<<filename<<std::endl;
return osgDB::Registry::instance()->findDataFileImplementation(filename, options, caseSensitivity);
}
};
osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin, const Options* options) const
{
osgDB::XmlNode::Input input;
@@ -1412,6 +1421,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(std::istream& fin,
input.readAllDataIntoBuffer();
osg::ref_ptr<osgDB::ReaderWriter::Options> local_opt = options ? static_cast<osgDB::ReaderWriter::Options*>(options->clone(osg::CopyOp::SHALLOW_COPY)) : new Options;
local_opt->setFindFileCallback(new MyFindFileCallback);
return readNode(input, local_opt);
}
@@ -1429,6 +1439,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterP3DXML::readNode(osgDB::XmlNode::Inp
doc->read(input);
// doc->write(std::cout);
if (doc == NULL )

View File

@@ -97,8 +97,13 @@ configure file /osg\/BoundingBox/
end
configure file /osg\/BoundingSphere/
emit before "#include <osg/BoundingBox>
"
emit before "#include <osg/BoundingBox>
"
end
configure file /osgDB\/ReaderWriter/
emit before "#include <osgDB/Options>
"
end
#############################################################################

View File

@@ -23,7 +23,7 @@
#endif
#include <osg/BoundingBox>
TYPE_NAME_ALIAS(osg::BoundingSphereImpl< osg::Vec3f >, osg::BoundingSpheref)
TYPE_NAME_ALIAS(osg::BoundingSphereImpl< osg::Vec3d >, osg::BoundingSphered)

View File

@@ -15,6 +15,7 @@
#include <osg/Object>
#include <osg/Shape>
#include <osgDB/Archive>
#include <osgDB/Options>
#include <osgDB/ReaderWriter>
// Must undefine IN and OUT macros defined in Windows headers
@@ -68,42 +69,42 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgDB::Archive)
__bool__getFileNames__FileNameList_R1,
"Get the full list of file names available in the archive. ",
"");
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readObject, IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readObject, IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__ReadResult__readObject__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readImage, IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readImage, IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__ReadResult__readImage__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readHeightField, IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readHeightField, IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__ReadResult__readHeightField__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readNode, IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults2(osgDB::ReaderWriter::ReadResult, readNode, IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__ReadResult__readNode__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeObject, IN, const osg::Object &, x, , IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeObject, IN, const osg::Object &, x, , IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__WriteResult__writeObject__C5_osg_Object_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeImage, IN, const osg::Image &, x, , IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeImage, IN, const osg::Image &, x, , IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__WriteResult__writeImage__C5_osg_Image_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeHeightField, IN, const osg::HeightField &, x, , IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeHeightField, IN, const osg::HeightField &, x, , IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__WriteResult__writeHeightField__C5_osg_HeightField_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeNode, IN, const osg::Node &, x, , IN, const std::string &, x, , IN, const osgDB::ReaderWriter::Options *, x, NULL,
I_MethodWithDefaults3(osgDB::ReaderWriter::WriteResult, writeNode, IN, const osg::Node &, x, , IN, const std::string &, x, , IN, const osgDB::Options *, x, NULL,
Properties::PURE_VIRTUAL,
__WriteResult__writeNode__C5_osg_Node_R1__C5_std_string_R1__C5_Options_P1,
"",

View File

@@ -19,7 +19,7 @@
#include <osg/Referenced>
#include <osg/State>
#include <osgDB/DatabasePager>
#include <osgDB/ReaderWriter>
#include <osgDB/Options>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -74,9 +74,9 @@ BEGIN_OBJECT_REFLECTOR(osgDB::DatabasePager)
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1,
"Add a request to load a node file to end the the database request list. ",
"");
I_Method6(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, IN, osgDB::ReaderWriter::Options *, loadOptions,
I_Method6(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, IN, osg::ref_ptr< osg::Referenced > &, databaseRequest, IN, osgDB::Options *, loadOptions,
Properties::VIRTUAL,
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__ReaderWriter_Options_P1,
__void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1__osg_ref_ptrT1_osg_Referenced__R1__Options_P1,
"",
"");
I_Method1(int, setSchedulePriority, IN, OpenThreads::Thread::ThreadPriority, priority,

View File

@@ -20,12 +20,6 @@
#undef OUT
#endif
BEGIN_ENUM_REFLECTOR(osgDB::CaseSensitivity)
I_DeclaringFile("osgDB/FileUtils");
I_EnumLabel(osgDB::CASE_SENSITIVE);
I_EnumLabel(osgDB::CASE_INSENSITIVE);
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::FileType)
I_DeclaringFile("osgDB/FileUtils");
I_EnumLabel(osgDB::FILE_NOT_FOUND);

View File

@@ -38,7 +38,7 @@ END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::ImageOptions)
I_DeclaringFile("osgDB/ImageOptions");
I_BaseType(osgDB::ReaderWriter::Options);
I_BaseType(osgDB::Options);
I_Constructor0(____ImageOptions,
"",
"");

View File

@@ -18,7 +18,7 @@
#include <osg/StateAttribute>
#include <osg/Uniform>
#include <osgDB/Input>
#include <osgDB/ReaderWriter>
#include <osgDB/Options>
#include <osgDB/Registry>
// Must undefine IN and OUT macros defined in Windows headers
@@ -37,14 +37,14 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Input)
I_Constructor0(____Input,
"",
"");
I_Method1(void, setOptions, IN, const osgDB::ReaderWriter::Options *, options,
I_Method1(void, setOptions, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__void__setOptions__C5_ReaderWriter_Options_P1,
__void__setOptions__C5_Options_P1,
"",
"");
I_Method0(const osgDB::ReaderWriter::Options *, getOptions,
I_Method0(const osgDB::Options *, getOptions,
Properties::NON_VIRTUAL,
__C5_ReaderWriter_Options_P1__getOptions,
__C5_Options_P1__getOptions,
"",
"");
I_Method1(osg::Object *, readObjectOfType, IN, const osg::Object &, compObj,
@@ -207,8 +207,8 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Input)
__bool__read__C5_char_P1__Parameter__Parameter__Parameter__Parameter__Parameter__Parameter__Parameter__Parameter,
"",
"");
I_SimpleProperty(const osgDB::ReaderWriter::Options *, Options,
__C5_ReaderWriter_Options_P1__getOptions,
__void__setOptions__C5_ReaderWriter_Options_P1);
I_SimpleProperty(const osgDB::Options *, Options,
__C5_Options_P1__getOptions,
__void__setOptions__C5_Options_P1);
END_REFLECTOR

View File

@@ -0,0 +1,350 @@
// ***************************************************************************
//
// Generated automatically by genwrapper.
// Please DO NOT EDIT this file!
//
// ***************************************************************************
#include <osgIntrospection/ReflectionMacros>
#include <osgIntrospection/TypedMethodInfo>
#include <osgIntrospection/StaticMethodInfo>
#include <osgIntrospection/Attributes>
#include <osg/CopyOp>
#include <osg/Image>
#include <osg/Node>
#include <osg/Object>
#include <osg/Shader>
#include <osg/Shape>
#include <osgDB/AuthenticationMap>
#include <osgDB/Options>
#include <osgDB/ReaderWriter>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
#undef IN
#endif
#ifdef OUT
#undef OUT
#endif
BEGIN_OBJECT_REFLECTOR(osgDB::FindFileCallback)
I_DeclaringFile("osgDB/Options");
I_VirtualBaseType(osg::Referenced);
I_Constructor0(____FindFileCallback,
"",
"");
I_Method3(std::string, findDataFile, IN, const std::string &, filename, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
Properties::VIRTUAL,
__std_string__findDataFile__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
"",
"");
I_Method3(std::string, findLibraryFile, IN, const std::string &, filename, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
Properties::VIRTUAL,
__std_string__findLibraryFile__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
"",
"");
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::Options::CacheHintOptions)
I_DeclaringFile("osgDB/Options");
I_EnumLabel(osgDB::Options::CACHE_NONE);
I_EnumLabel(osgDB::Options::CACHE_NODES);
I_EnumLabel(osgDB::Options::CACHE_IMAGES);
I_EnumLabel(osgDB::Options::CACHE_HEIGHTFIELDS);
I_EnumLabel(osgDB::Options::CACHE_ARCHIVES);
I_EnumLabel(osgDB::Options::CACHE_OBJECTS);
I_EnumLabel(osgDB::Options::CACHE_SHADERS);
I_EnumLabel(osgDB::Options::CACHE_ALL);
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::Options::BuildKdTreesHint)
I_DeclaringFile("osgDB/Options");
I_EnumLabel(osgDB::Options::NO_PREFERENCE);
I_EnumLabel(osgDB::Options::DO_NOT_BUILD_KDTREES);
I_EnumLabel(osgDB::Options::BUILD_KDTREES);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::Options)
I_DeclaringFile("osgDB/Options");
I_BaseType(osg::Object);
I_Constructor0(____Options,
"",
"");
I_Constructor1(IN, const std::string &, str,
Properties::NON_EXPLICIT,
____Options__C5_std_string_R1,
"",
"");
I_ConstructorWithDefaults2(IN, const osgDB::Options &, options, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
____Options__C5_Options_R1__C5_osg_CopyOp_R1,
"",
"");
I_Method0(osg::Object *, cloneType,
Properties::VIRTUAL,
__osg_Object_P1__cloneType,
"Clone the type of an object, with Object* return type. ",
"Must be defined by derived classes. ");
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
Properties::VIRTUAL,
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
"Clone an object, with Object* return type. ",
"Must be defined by derived classes. ");
I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj,
Properties::VIRTUAL,
__bool__isSameKindAs__C5_osg_Object_P1,
"",
"");
I_Method0(const char *, libraryName,
Properties::VIRTUAL,
__C5_char_P1__libraryName,
"return the name of the object's library. ",
"Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. ");
I_Method0(const char *, className,
Properties::VIRTUAL,
__C5_char_P1__className,
"return the name of the object's class type. ",
"Must be defined by derived classes. ");
I_Method1(void, setOptionString, IN, const std::string &, str,
Properties::NON_VIRTUAL,
__void__setOptionString__C5_std_string_R1,
"Set the general Options string. ",
"");
I_Method0(const std::string &, getOptionString,
Properties::NON_VIRTUAL,
__C5_std_string_R1__getOptionString,
"Get the general Options string. ",
"");
I_Method1(void, setDatabasePath, IN, const std::string &, str,
Properties::NON_VIRTUAL,
__void__setDatabasePath__C5_std_string_R1,
"Set the database path to use a hint of where to look when loading models. ",
"");
I_Method0(osgDB::FilePathList &, getDatabasePathList,
Properties::NON_VIRTUAL,
__FilePathList_R1__getDatabasePathList,
"Get the database path which is used a hint of where to look when loading models. ",
"");
I_Method0(const osgDB::FilePathList &, getDatabasePathList,
Properties::NON_VIRTUAL,
__C5_FilePathList_R1__getDatabasePathList,
"Get the const database path which is used a hint of where to look when loading models. ",
"");
I_Method1(void, setObjectCacheHint, IN, osgDB::Options::CacheHintOptions, useObjectCache,
Properties::NON_VIRTUAL,
__void__setObjectCacheHint__CacheHintOptions,
"Set whether the Registry::ObjectCache should be used by default. ",
"");
I_Method0(osgDB::Options::CacheHintOptions, getObjectCacheHint,
Properties::NON_VIRTUAL,
__CacheHintOptions__getObjectCacheHint,
"Get whether the Registry::ObjectCache should be used by default. ",
"");
I_Method1(void, setBuildKdTreesHint, IN, osgDB::Options::BuildKdTreesHint, hint,
Properties::NON_VIRTUAL,
__void__setBuildKdTreesHint__BuildKdTreesHint,
"Set whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method0(osgDB::Options::BuildKdTreesHint, getBuildKdTreesHint,
Properties::NON_VIRTUAL,
__BuildKdTreesHint__getBuildKdTreesHint,
"Get whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method1(void, setAuthenticationMap, IN, osgDB::AuthenticationMap *, authenticationMap,
Properties::NON_VIRTUAL,
__void__setAuthenticationMap__AuthenticationMap_P1,
"Set the password map to be used by plugins when access files from secure locations. ",
"");
I_Method0(const osgDB::AuthenticationMap *, getAuthenticationMap,
Properties::NON_VIRTUAL,
__C5_AuthenticationMap_P1__getAuthenticationMap,
"Get the password map to be used by plugins when access files from secure locations. ",
"");
I_Method2(void, setPluginData, IN, const std::string &, s, IN, void *, v,
Properties::NON_VIRTUAL,
__void__setPluginData__C5_std_string_R1__void_P1,
"Sets a plugindata value PluginData with a string. ",
"");
I_Method1(void *, getPluginData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__void_P1__getPluginData__C5_std_string_R1,
"Get a value from the PluginData. ",
"");
I_Method1(const void *, getPluginData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__C5_void_P1__getPluginData__C5_std_string_R1,
"Get a value from the PluginData. ",
"");
I_Method1(void, removePluginData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__void__removePluginData__C5_std_string_R1,
"Remove a value from the PluginData. ",
"");
I_Method2(void, setPluginStringData, IN, const std::string &, s, IN, const std::string &, v,
Properties::NON_VIRTUAL,
__void__setPluginStringData__C5_std_string_R1__C5_std_string_R1,
"Sets a plugindata value PluginData with a string. ",
"");
I_Method1(std::string, getPluginStringData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__std_string__getPluginStringData__C5_std_string_R1,
"Get a string from the PluginStrData. ",
"");
I_Method1(const std::string, getPluginStringData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__C5_std_string__getPluginStringData__C5_std_string_R1,
"Get a value from the PluginData. ",
"");
I_Method1(void, removePluginStringData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__void__removePluginStringData__C5_std_string_R1,
"Remove a value from the PluginData. ",
"");
I_Method1(void, setFindFileCallback, IN, osgDB::FindFileCallback *, cb,
Properties::NON_VIRTUAL,
__void__setFindFileCallback__FindFileCallback_P1,
"Set the find callback to use in place of the default findFile calls. ",
"");
I_Method0(osgDB::FindFileCallback *, getFindFileCallback,
Properties::NON_VIRTUAL,
__FindFileCallback_P1__getFindFileCallback,
"Get the const findFile callback. ",
"");
I_Method1(void, setReadFileCallback, IN, osgDB::ReadFileCallback *, cb,
Properties::NON_VIRTUAL,
__void__setReadFileCallback__ReadFileCallback_P1,
"Set the read callback to use in place of the default readFile calls. ",
"");
I_Method0(osgDB::ReadFileCallback *, getReadFileCallback,
Properties::NON_VIRTUAL,
__ReadFileCallback_P1__getReadFileCallback,
"Get the const readFile callback. ",
"");
I_Method1(void, setWriteFileCallback, IN, osgDB::WriteFileCallback *, cb,
Properties::NON_VIRTUAL,
__void__setWriteFileCallback__WriteFileCallback_P1,
"Set the Registry callback to use in place of the default writeFile calls. ",
"");
I_Method0(osgDB::WriteFileCallback *, getWriteFileCallback,
Properties::NON_VIRTUAL,
__WriteFileCallback_P1__getWriteFileCallback,
"Get the const writeFile callback. ",
"");
I_SimpleProperty(osgDB::AuthenticationMap *, AuthenticationMap,
0,
__void__setAuthenticationMap__AuthenticationMap_P1);
I_SimpleProperty(osgDB::Options::BuildKdTreesHint, BuildKdTreesHint,
__BuildKdTreesHint__getBuildKdTreesHint,
__void__setBuildKdTreesHint__BuildKdTreesHint);
I_SimpleProperty(const std::string &, DatabasePath,
0,
__void__setDatabasePath__C5_std_string_R1);
I_SimpleProperty(osgDB::FilePathList &, DatabasePathList,
__FilePathList_R1__getDatabasePathList,
0);
I_SimpleProperty(osgDB::FindFileCallback *, FindFileCallback,
__FindFileCallback_P1__getFindFileCallback,
__void__setFindFileCallback__FindFileCallback_P1);
I_SimpleProperty(osgDB::Options::CacheHintOptions, ObjectCacheHint,
__CacheHintOptions__getObjectCacheHint,
__void__setObjectCacheHint__CacheHintOptions);
I_SimpleProperty(const std::string &, OptionString,
__C5_std_string_R1__getOptionString,
__void__setOptionString__C5_std_string_R1);
I_IndexedProperty(void *, PluginData,
__void_P1__getPluginData__C5_std_string_R1,
__void__setPluginData__C5_std_string_R1__void_P1,
0);
I_IndexedProperty(std::string, PluginStringData,
__std_string__getPluginStringData__C5_std_string_R1,
__void__setPluginStringData__C5_std_string_R1__C5_std_string_R1,
0);
I_SimpleProperty(osgDB::ReadFileCallback *, ReadFileCallback,
__ReadFileCallback_P1__getReadFileCallback,
__void__setReadFileCallback__ReadFileCallback_P1);
I_SimpleProperty(osgDB::WriteFileCallback *, WriteFileCallback,
__WriteFileCallback_P1__getWriteFileCallback,
__void__setWriteFileCallback__WriteFileCallback_P1);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::ReadFileCallback)
I_DeclaringFile("osgDB/Options");
I_VirtualBaseType(osg::Referenced);
I_Constructor0(____ReadFileCallback,
"",
"");
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,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__openArchive__C5_std_string_R1__ReaderWriter_ArchiveStatus__unsigned_int__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readObject, IN, const std::string &, filename, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readObject__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readImage, IN, const std::string &, filename, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readImage__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readHeightField, IN, const std::string &, filename, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readHeightField__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readNode, IN, const std::string &, filename, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readNode__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readShader, IN, const std::string &, filename, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readShader__C5_std_string_R1__C5_Options_P1,
"",
"");
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::WriteFileCallback)
I_DeclaringFile("osgDB/Options");
I_VirtualBaseType(osg::Referenced);
I_Constructor0(____WriteFileCallback,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeObject, IN, const osg::Object &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeObject__C5_osg_Object_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeImage, IN, const osg::Image &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeImage__C5_osg_Image_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeHeightField, IN, const osg::HeightField &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeHeightField__C5_osg_HeightField_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeNode, IN, const osg::Node &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeNode__C5_osg_Node_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeShader, IN, const osg::Shader &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeShader__C5_osg_Shader_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::CaseSensitivity)
I_DeclaringFile("osgDB/Options");
I_EnumLabel(osgDB::CASE_SENSITIVE);
I_EnumLabel(osgDB::CASE_INSENSITIVE);
END_REFLECTOR
TYPE_NAME_ALIAS(std::deque< std::string >, osgDB::FilePathList)
STD_VECTOR_REFLECTOR(std::deque< std::string >)

View File

@@ -11,8 +11,8 @@
#include <osgIntrospection/Attributes>
#include <osg/Object>
#include <osgDB/Options>
#include <osgDB/Output>
#include <osgDB/ReaderWriter>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN

View File

@@ -17,7 +17,6 @@
#include <osg/Shader>
#include <osg/Shape>
#include <osgDB/Archive>
#include <osgDB/AuthenticationMap>
#include <osgDB/ReaderWriter>
// Must undefine IN and OUT macros defined in Windows headers
@@ -28,6 +27,8 @@
#undef OUT
#endif
#include <osgDB/Options>
BEGIN_ENUM_REFLECTOR(osgDB::ReaderWriter::Features)
I_DeclaringFile("osgDB/ReaderWriter");
I_EnumLabel(osgDB::ReaderWriter::FEATURE_NONE);
@@ -55,6 +56,8 @@ TYPE_NAME_ALIAS(std::map< std::string COMMA std::string >, osgDB::ReaderWriter:
TYPE_NAME_ALIAS(std::list< std::string >, osgDB::ReaderWriter::FeatureList)
TYPE_NAME_ALIAS(osgDB::Options, osgDB::ReaderWriter::Options)
BEGIN_OBJECT_REFLECTOR(osgDB::ReaderWriter)
I_DeclaringFile("osgDB/ReaderWriter");
I_BaseType(osg::Object);
@@ -249,188 +252,6 @@ BEGIN_OBJECT_REFLECTOR(osgDB::ReaderWriter)
"");
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::ReaderWriter::Options::CacheHintOptions)
I_DeclaringFile("osgDB/ReaderWriter");
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_NONE);
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_NODES);
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_IMAGES);
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_HEIGHTFIELDS);
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_ARCHIVES);
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_OBJECTS);
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_SHADERS);
I_EnumLabel(osgDB::ReaderWriter::Options::CACHE_ALL);
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::ReaderWriter::Options::BuildKdTreesHint)
I_DeclaringFile("osgDB/ReaderWriter");
I_EnumLabel(osgDB::ReaderWriter::Options::NO_PREFERENCE);
I_EnumLabel(osgDB::ReaderWriter::Options::DO_NOT_BUILD_KDTREES);
I_EnumLabel(osgDB::ReaderWriter::Options::BUILD_KDTREES);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::ReaderWriter::Options)
I_DeclaringFile("osgDB/ReaderWriter");
I_BaseType(osg::Object);
I_Constructor0(____Options,
"",
"");
I_Constructor1(IN, const std::string &, str,
Properties::NON_EXPLICIT,
____Options__C5_std_string_R1,
"",
"");
I_ConstructorWithDefaults2(IN, const osgDB::ReaderWriter::Options &, options, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
____Options__C5_Options_R1__C5_osg_CopyOp_R1,
"",
"");
I_Method0(osg::Object *, cloneType,
Properties::VIRTUAL,
__osg_Object_P1__cloneType,
"Clone the type of an object, with Object* return type. ",
"Must be defined by derived classes. ");
I_Method1(osg::Object *, clone, IN, const osg::CopyOp &, x,
Properties::VIRTUAL,
__osg_Object_P1__clone__C5_osg_CopyOp_R1,
"Clone an object, with Object* return type. ",
"Must be defined by derived classes. ");
I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj,
Properties::VIRTUAL,
__bool__isSameKindAs__C5_osg_Object_P1,
"",
"");
I_Method0(const char *, libraryName,
Properties::VIRTUAL,
__C5_char_P1__libraryName,
"return the name of the object's library. ",
"Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name. ");
I_Method0(const char *, className,
Properties::VIRTUAL,
__C5_char_P1__className,
"return the name of the object's class type. ",
"Must be defined by derived classes. ");
I_Method1(void, setOptionString, IN, const std::string &, str,
Properties::NON_VIRTUAL,
__void__setOptionString__C5_std_string_R1,
"Set the general Options string. ",
"");
I_Method0(const std::string &, getOptionString,
Properties::NON_VIRTUAL,
__C5_std_string_R1__getOptionString,
"Get the general Options string. ",
"");
I_Method1(void, setDatabasePath, IN, const std::string &, str,
Properties::NON_VIRTUAL,
__void__setDatabasePath__C5_std_string_R1,
"Set the database path to use a hint of where to look when loading models. ",
"");
I_Method0(osgDB::FilePathList &, getDatabasePathList,
Properties::NON_VIRTUAL,
__FilePathList_R1__getDatabasePathList,
"Get the database path which is used a hint of where to look when loading models. ",
"");
I_Method0(const osgDB::FilePathList &, getDatabasePathList,
Properties::NON_VIRTUAL,
__C5_FilePathList_R1__getDatabasePathList,
"Get the const database path which is used a hint of where to look when loading models. ",
"");
I_Method1(void, setObjectCacheHint, IN, osgDB::ReaderWriter::Options::CacheHintOptions, useObjectCache,
Properties::NON_VIRTUAL,
__void__setObjectCacheHint__CacheHintOptions,
"Set whether the Registry::ObjectCache should be used by default. ",
"");
I_Method0(osgDB::ReaderWriter::Options::CacheHintOptions, getObjectCacheHint,
Properties::NON_VIRTUAL,
__CacheHintOptions__getObjectCacheHint,
"Get whether the Registry::ObjectCache should be used by default. ",
"");
I_Method1(void, setBuildKdTreesHint, IN, osgDB::ReaderWriter::Options::BuildKdTreesHint, hint,
Properties::NON_VIRTUAL,
__void__setBuildKdTreesHint__BuildKdTreesHint,
"Set whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method0(osgDB::ReaderWriter::Options::BuildKdTreesHint, getBuildKdTreesHint,
Properties::NON_VIRTUAL,
__BuildKdTreesHint__getBuildKdTreesHint,
"Get whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method1(void, setAuthenticationMap, IN, osgDB::AuthenticationMap *, authenticationMap,
Properties::NON_VIRTUAL,
__void__setAuthenticationMap__AuthenticationMap_P1,
"Set the password map to be used by plugins when access files from secure locations. ",
"");
I_Method0(const osgDB::AuthenticationMap *, getAuthenticationMap,
Properties::NON_VIRTUAL,
__C5_AuthenticationMap_P1__getAuthenticationMap,
"Get the password map to be used by plugins when access files from secure locations. ",
"");
I_Method2(void, setPluginData, IN, const std::string &, s, IN, void *, v,
Properties::NON_VIRTUAL,
__void__setPluginData__C5_std_string_R1__void_P1,
"Sets a plugindata value PluginData with a string. ",
"");
I_Method1(void *, getPluginData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__void_P1__getPluginData__C5_std_string_R1,
"Get a value from the PluginData. ",
"");
I_Method1(const void *, getPluginData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__C5_void_P1__getPluginData__C5_std_string_R1,
"Get a value from the PluginData. ",
"");
I_Method1(void, removePluginData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__void__removePluginData__C5_std_string_R1,
"Remove a value from the PluginData. ",
"");
I_Method2(void, setPluginStringData, IN, const std::string &, s, IN, const std::string &, v,
Properties::NON_VIRTUAL,
__void__setPluginStringData__C5_std_string_R1__C5_std_string_R1,
"Sets a plugindata value PluginData with a string. ",
"");
I_Method1(std::string, getPluginStringData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__std_string__getPluginStringData__C5_std_string_R1,
"Get a string from the PluginStrData. ",
"");
I_Method1(const std::string, getPluginStringData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__C5_std_string__getPluginStringData__C5_std_string_R1,
"Get a value from the PluginData. ",
"");
I_Method1(void, removePluginStringData, IN, const std::string &, s,
Properties::NON_VIRTUAL,
__void__removePluginStringData__C5_std_string_R1,
"Remove a value from the PluginData. ",
"");
I_SimpleProperty(osgDB::AuthenticationMap *, AuthenticationMap,
0,
__void__setAuthenticationMap__AuthenticationMap_P1);
I_SimpleProperty(osgDB::ReaderWriter::Options::BuildKdTreesHint, BuildKdTreesHint,
__BuildKdTreesHint__getBuildKdTreesHint,
__void__setBuildKdTreesHint__BuildKdTreesHint);
I_SimpleProperty(const std::string &, DatabasePath,
0,
__void__setDatabasePath__C5_std_string_R1);
I_SimpleProperty(osgDB::FilePathList &, DatabasePathList,
__FilePathList_R1__getDatabasePathList,
0);
I_SimpleProperty(osgDB::ReaderWriter::Options::CacheHintOptions, ObjectCacheHint,
__CacheHintOptions__getObjectCacheHint,
__void__setObjectCacheHint__CacheHintOptions);
I_SimpleProperty(const std::string &, OptionString,
__C5_std_string_R1__getOptionString,
__void__setOptionString__C5_std_string_R1);
I_IndexedProperty(void *, PluginData,
__void_P1__getPluginData__C5_std_string_R1,
__void__setPluginData__C5_std_string_R1__void_P1,
0);
I_IndexedProperty(std::string, PluginStringData,
__std_string__getPluginStringData__C5_std_string_R1,
__void__setPluginStringData__C5_std_string_R1__C5_std_string_R1,
0);
END_REFLECTOR
BEGIN_ENUM_REFLECTOR(osgDB::ReaderWriter::ReadResult::ReadStatus)
I_DeclaringFile("osgDB/ReaderWriter");
I_EnumLabel(osgDB::ReaderWriter::ReadResult::NOT_IMPLEMENTED);
@@ -670,7 +491,3 @@ BEGIN_VALUE_REFLECTOR(osgDB::ReaderWriter::WriteResult)
"");
END_REFLECTOR
TYPE_NAME_ALIAS(std::deque< std::string >, osgDB::FilePathList)
STD_VECTOR_REFLECTOR(std::deque< std::string >)

View File

@@ -27,6 +27,7 @@
#include <osgDB/DynamicLibrary>
#include <osgDB/FileCache>
#include <osgDB/Input>
#include <osgDB/Options>
#include <osgDB/Output>
#include <osgDB/ReaderWriter>
#include <osgDB/Registry>
@@ -78,6 +79,12 @@ END_REFLECTOR
TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgDB::ReaderWriter > >, osgDB::Registry::ReaderWriterList)
TYPE_NAME_ALIAS(class osgDB::FindFileCallback, osgDB::Registry::FindFileCallback)
TYPE_NAME_ALIAS(class osgDB::ReadFileCallback, osgDB::Registry::ReadFileCallback)
TYPE_NAME_ALIAS(class osgDB::WriteFileCallback, osgDB::Registry::WriteFileCallback)
BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
I_DeclaringFile("osgDB/Registry");
I_BaseType(osg::Referenced);
@@ -225,6 +232,41 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__bool__writeObject__C5_osg_Object_R1__Output_R1,
"",
"");
I_Method1(void, setFindFileCallback, IN, osgDB::Registry::FindFileCallback *, cb,
Properties::NON_VIRTUAL,
__void__setFindFileCallback__FindFileCallback_P1,
"Set the Registry callback to use in place of the default findFile calls. ",
"");
I_Method0(osgDB::Registry::FindFileCallback *, getFindFileCallback,
Properties::NON_VIRTUAL,
__FindFileCallback_P1__getFindFileCallback,
"Get the findFile callback. ",
"");
I_Method0(const osgDB::Registry::FindFileCallback *, getFindFileCallback,
Properties::NON_VIRTUAL,
__C5_FindFileCallback_P1__getFindFileCallback,
"Get the const findFile callback. ",
"");
I_Method3(std::string, findDataFile, IN, const std::string &, fileName, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
Properties::NON_VIRTUAL,
__std_string__findDataFile__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
"",
"");
I_Method3(std::string, findDataFileImplementation, IN, const std::string &, fileName, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
Properties::NON_VIRTUAL,
__std_string__findDataFileImplementation__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
"",
"");
I_Method3(std::string, findLibraryFile, IN, const std::string &, fileName, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
Properties::NON_VIRTUAL,
__std_string__findLibraryFile__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
"",
"");
I_Method3(std::string, findLibraryFileImplementation, IN, const std::string &, fileName, IN, const osgDB::Options *, options, IN, osgDB::CaseSensitivity, caseSensitivity,
Properties::NON_VIRTUAL,
__std_string__findLibraryFileImplementation__C5_std_string_R1__C5_Options_P1__CaseSensitivity,
"",
"");
I_Method1(void, setReadFileCallback, IN, osgDB::Registry::ReadFileCallback *, cb,
Properties::NON_VIRTUAL,
__void__setReadFileCallback__ReadFileCallback_P1,
@@ -240,64 +282,64 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__C5_ReadFileCallback_P1__getReadFileCallback,
"Get the const readFile callback. ",
"");
I_Method4(osgDB::ReaderWriter::ReadResult, openArchive, IN, const std::string &, fileName, IN, osgDB::ReaderWriter::ArchiveStatus, status, IN, unsigned int, indexBlockSizeHint, IN, const osgDB::ReaderWriter::Options *, options,
I_Method4(osgDB::ReaderWriter::ReadResult, openArchive, IN, const std::string &, fileName, IN, osgDB::ReaderWriter::ArchiveStatus, status, IN, unsigned int, indexBlockSizeHint, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__openArchive__C5_std_string_R1__ReaderWriter_ArchiveStatus__unsigned_int__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__openArchive__C5_std_string_R1__ReaderWriter_ArchiveStatus__unsigned_int__C5_Options_P1,
"",
"");
I_Method4(osgDB::ReaderWriter::ReadResult, openArchiveImplementation, IN, const std::string &, fileName, IN, osgDB::ReaderWriter::ArchiveStatus, status, IN, unsigned int, indexBlockSizeHint, IN, const osgDB::ReaderWriter::Options *, options,
I_Method4(osgDB::ReaderWriter::ReadResult, openArchiveImplementation, IN, const std::string &, fileName, IN, osgDB::ReaderWriter::ArchiveStatus, status, IN, unsigned int, indexBlockSizeHint, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__openArchiveImplementation__C5_std_string_R1__ReaderWriter_ArchiveStatus__unsigned_int__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__openArchiveImplementation__C5_std_string_R1__ReaderWriter_ArchiveStatus__unsigned_int__C5_Options_P1,
"",
"");
I_MethodWithDefaults3(osgDB::ReaderWriter::ReadResult, readObject, IN, const std::string &, fileName, , IN, const osgDB::ReaderWriter::Options *, options, , IN, bool, buildKdTreeIfRequired, true,
I_MethodWithDefaults3(osgDB::ReaderWriter::ReadResult, readObject, IN, const std::string &, fileName, , IN, const osgDB::Options *, options, , IN, bool, buildKdTreeIfRequired, true,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readObject__C5_std_string_R1__C5_ReaderWriter_Options_P1__bool,
__ReaderWriter_ReadResult__readObject__C5_std_string_R1__C5_Options_P1__bool,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readObjectImplementation, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readObjectImplementation, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readObjectImplementation__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readObjectImplementation__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readImage, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readImage, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readImage__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readImage__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readImageImplementation, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readImageImplementation, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readImageImplementation__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readImageImplementation__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readHeightField, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readHeightField, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readHeightField__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readHeightField__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readHeightFieldImplementation, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readHeightFieldImplementation, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readHeightFieldImplementation__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readHeightFieldImplementation__C5_std_string_R1__C5_Options_P1,
"",
"");
I_MethodWithDefaults3(osgDB::ReaderWriter::ReadResult, readNode, IN, const std::string &, fileName, , IN, const osgDB::ReaderWriter::Options *, options, , IN, bool, buildKdTreeIfRequired, true,
I_MethodWithDefaults3(osgDB::ReaderWriter::ReadResult, readNode, IN, const std::string &, fileName, , IN, const osgDB::Options *, options, , IN, bool, buildKdTreeIfRequired, true,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readNode__C5_std_string_R1__C5_ReaderWriter_Options_P1__bool,
__ReaderWriter_ReadResult__readNode__C5_std_string_R1__C5_Options_P1__bool,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readNodeImplementation, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readNodeImplementation, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readNodeImplementation__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readNodeImplementation__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readShader, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readShader, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readShader__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readShader__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readShaderImplementation, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(osgDB::ReaderWriter::ReadResult, readShaderImplementation, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_ReadResult__readShaderImplementation__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_ReadResult__readShaderImplementation__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method1(void, setWriteFileCallback, IN, osgDB::Registry::WriteFileCallback *, cb,
@@ -315,69 +357,69 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__C5_WriteFileCallback_P1__getWriteFileCallback,
"Get the const writeFile callback. ",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeObject, IN, const osg::Object &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeObject, IN, const osg::Object &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeObject__C5_osg_Object_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeObject__C5_osg_Object_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeObjectImplementation, IN, const osg::Object &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeObjectImplementation, IN, const osg::Object &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeObjectImplementation__C5_osg_Object_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeObjectImplementation__C5_osg_Object_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeImage, IN, const osg::Image &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeImage, IN, const osg::Image &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeImage__C5_osg_Image_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeImage__C5_osg_Image_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeImageImplementation, IN, const osg::Image &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeImageImplementation, IN, const osg::Image &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeImageImplementation__C5_osg_Image_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeImageImplementation__C5_osg_Image_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeHeightField, IN, const osg::HeightField &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeHeightField, IN, const osg::HeightField &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeHeightField__C5_osg_HeightField_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeHeightField__C5_osg_HeightField_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeHeightFieldImplementation, IN, const osg::HeightField &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeHeightFieldImplementation, IN, const osg::HeightField &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeHeightFieldImplementation__C5_osg_HeightField_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeHeightFieldImplementation__C5_osg_HeightField_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeNode, IN, const osg::Node &, node, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeNode, IN, const osg::Node &, node, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeNode__C5_osg_Node_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeNode__C5_osg_Node_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeNodeImplementation, IN, const osg::Node &, node, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeNodeImplementation, IN, const osg::Node &, node, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeNodeImplementation__C5_osg_Node_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeNodeImplementation__C5_osg_Node_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeShader, IN, const osg::Shader &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeShader, IN, const osg::Shader &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeShader__C5_osg_Shader_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeShader__C5_osg_Shader_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeShaderImplementation, IN, const osg::Shader &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
I_Method3(osgDB::ReaderWriter::WriteResult, writeShaderImplementation, IN, const osg::Shader &, obj, IN, const std::string &, fileName, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__ReaderWriter_WriteResult__writeShaderImplementation__C5_osg_Shader_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
__ReaderWriter_WriteResult__writeShaderImplementation__C5_osg_Shader_R1__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method2(void, _buildKdTreeIfRequired, IN, osgDB::ReaderWriter::ReadResult &, result, IN, const osgDB::ReaderWriter::Options *, options,
I_Method2(void, _buildKdTreeIfRequired, IN, osgDB::ReaderWriter::ReadResult &, result, IN, const osgDB::Options *, options,
Properties::NON_VIRTUAL,
__void___buildKdTreeIfRequired__ReaderWriter_ReadResult_R1__C5_ReaderWriter_Options_P1,
__void___buildKdTreeIfRequired__ReaderWriter_ReadResult_R1__C5_Options_P1,
"",
"");
I_Method1(void, setBuildKdTreesHint, IN, osgDB::ReaderWriter::Options::BuildKdTreesHint, hint,
I_Method1(void, setBuildKdTreesHint, IN, osgDB::Options::BuildKdTreesHint, hint,
Properties::NON_VIRTUAL,
__void__setBuildKdTreesHint__ReaderWriter_Options_BuildKdTreesHint,
__void__setBuildKdTreesHint__Options_BuildKdTreesHint,
"Set whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method0(osgDB::ReaderWriter::Options::BuildKdTreesHint, getBuildKdTreesHint,
I_Method0(osgDB::Options::BuildKdTreesHint, getBuildKdTreesHint,
Properties::NON_VIRTUAL,
__ReaderWriter_Options_BuildKdTreesHint__getBuildKdTreesHint,
__Options_BuildKdTreesHint__getBuildKdTreesHint,
"Get whether the KdTrees should be built for geometry in the loader model. ",
"");
I_Method1(void, setKdTreeBuilder, IN, osg::KdTreeBuilder *, builder,
@@ -430,19 +472,19 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__bool__getCreateNodeFromImage,
"",
"");
I_Method1(void, setOptions, IN, osgDB::ReaderWriter::Options *, opt,
I_Method1(void, setOptions, IN, osgDB::Options *, opt,
Properties::NON_VIRTUAL,
__void__setOptions__ReaderWriter_Options_P1,
__void__setOptions__Options_P1,
"",
"");
I_Method0(osgDB::ReaderWriter::Options *, getOptions,
I_Method0(osgDB::Options *, getOptions,
Properties::NON_VIRTUAL,
__ReaderWriter_Options_P1__getOptions,
__Options_P1__getOptions,
"",
"");
I_Method0(const osgDB::ReaderWriter::Options *, getOptions,
I_Method0(const osgDB::Options *, getOptions,
Properties::NON_VIRTUAL,
__C5_ReaderWriter_Options_P1__getOptions,
__C5_Options_P1__getOptions,
"",
"");
I_Method0(void, initFilePathLists,
@@ -603,18 +645,18 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__ReaderWriter_ReadResult__read__C5_ReadFunctor_R1,
"",
"");
I_ProtectedMethod2(osgDB::ReaderWriter::ReadResult, readImplementation, IN, const osgDB::Registry::ReadFunctor &, readFunctor, IN, osgDB::ReaderWriter::Options::CacheHintOptions, cacheHint,
I_ProtectedMethod2(osgDB::ReaderWriter::ReadResult, readImplementation, IN, const osgDB::Registry::ReadFunctor &, readFunctor, IN, osgDB::Options::CacheHintOptions, cacheHint,
Properties::NON_VIRTUAL,
Properties::NON_CONST,
__ReaderWriter_ReadResult__readImplementation__C5_ReadFunctor_R1__ReaderWriter_Options_CacheHintOptions,
__ReaderWriter_ReadResult__readImplementation__C5_ReadFunctor_R1__Options_CacheHintOptions,
"",
"");
I_SimpleProperty(osgDB::AuthenticationMap *, AuthenticationMap,
__AuthenticationMap_P1__getAuthenticationMap,
__void__setAuthenticationMap__AuthenticationMap_P1);
I_SimpleProperty(osgDB::ReaderWriter::Options::BuildKdTreesHint, BuildKdTreesHint,
__ReaderWriter_Options_BuildKdTreesHint__getBuildKdTreesHint,
__void__setBuildKdTreesHint__ReaderWriter_Options_BuildKdTreesHint);
I_SimpleProperty(osgDB::Options::BuildKdTreesHint, BuildKdTreesHint,
__Options_BuildKdTreesHint__getBuildKdTreesHint,
__void__setBuildKdTreesHint__Options_BuildKdTreesHint);
I_SimpleProperty(bool, CreateNodeFromImage,
__bool__getCreateNodeFromImage,
__void__setCreateNodeFromImage__bool);
@@ -624,15 +666,18 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
I_SimpleProperty(osgDB::FileCache *, FileCache,
__FileCache_P1__getFileCache,
__void__setFileCache__FileCache_P1);
I_SimpleProperty(osgDB::Registry::FindFileCallback *, FindFileCallback,
__FindFileCallback_P1__getFindFileCallback,
__void__setFindFileCallback__FindFileCallback_P1);
I_SimpleProperty(osg::KdTreeBuilder *, KdTreeBuilder,
__osg_KdTreeBuilder_P1__getKdTreeBuilder,
__void__setKdTreeBuilder__osg_KdTreeBuilder_P1);
I_SimpleProperty(const osgDB::FilePathList &, LibraryFilePathList,
__C5_FilePathList_R1__getLibraryFilePathList,
__void__setLibraryFilePathList__C5_FilePathList_R1);
I_SimpleProperty(osgDB::ReaderWriter::Options *, Options,
__ReaderWriter_Options_P1__getOptions,
__void__setOptions__ReaderWriter_Options_P1);
I_SimpleProperty(osgDB::Options *, Options,
__Options_P1__getOptions,
__void__setOptions__Options_P1);
I_SimpleProperty(osgDB::Registry::ReadFileCallback *, ReadFileCallback,
__ReadFileCallback_P1__getReadFileCallback,
__void__setReadFileCallback__ReadFileCallback_P1);
@@ -647,48 +692,10 @@ BEGIN_OBJECT_REFLECTOR(osgDB::Registry)
__void__setWriteFileCallback__WriteFileCallback_P1);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::Registry::ReadFileCallback)
I_DeclaringFile("osgDB/Registry");
I_VirtualBaseType(osg::Referenced);
I_Constructor0(____ReadFileCallback,
"",
"");
I_Method4(osgDB::ReaderWriter::ReadResult, openArchive, IN, const std::string &, filename, IN, osgDB::ReaderWriter::ArchiveStatus, status, IN, unsigned int, indexBlockSizeHint, IN, const osgDB::ReaderWriter::Options *, useObjectCache,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__openArchive__C5_std_string_R1__ReaderWriter_ArchiveStatus__unsigned_int__C5_ReaderWriter_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readObject, IN, const std::string &, filename, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readObject__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readImage, IN, const std::string &, filename, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readImage__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readHeightField, IN, const std::string &, filename, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readHeightField__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readNode, IN, const std::string &, filename, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readNode__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method2(osgDB::ReaderWriter::ReadResult, readShader, IN, const std::string &, filename, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_ReadResult__readShader__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
END_REFLECTOR
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgDB::Registry::ReadFunctor)
I_DeclaringFile("osgDB/Registry");
I_Constructor2(IN, const std::string &, filename, IN, const osgDB::ReaderWriter::Options *, options,
____ReadFunctor__C5_std_string_R1__C5_ReaderWriter_Options_P1,
I_Constructor2(IN, const std::string &, filename, IN, const osgDB::Options *, options,
____ReadFunctor__C5_std_string_R1__C5_Options_P1,
"",
"");
I_Method1(osgDB::ReaderWriter::ReadResult, doRead, IN, osgDB::ReaderWriter &, rw,
@@ -709,39 +716,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgDB::Registry::ReadFunctor)
I_PublicMemberProperty(std::string, _filename);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::Registry::WriteFileCallback)
I_DeclaringFile("osgDB/Registry");
I_VirtualBaseType(osg::Referenced);
I_Constructor0(____WriteFileCallback,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeObject, IN, const osg::Object &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeObject__C5_osg_Object_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeImage, IN, const osg::Image &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeImage__C5_osg_Image_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeHeightField, IN, const osg::HeightField &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeHeightField__C5_osg_HeightField_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeNode, IN, const osg::Node &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeNode__C5_osg_Node_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
I_Method3(osgDB::ReaderWriter::WriteResult, writeShader, IN, const osg::Shader &, obj, IN, const std::string &, fileName, IN, const osgDB::ReaderWriter::Options *, options,
Properties::VIRTUAL,
__ReaderWriter_WriteResult__writeShader__C5_osg_Shader_R1__C5_std_string_R1__C5_ReaderWriter_Options_P1,
"",
"");
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgDB::ReaderWriter >)
I_DeclaringFile("osg/ref_ptr");
I_Constructor0(____ref_ptr,