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:
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <osgDB/FieldReaderIterator>
|
||||
#include <osgDB/ReaderWriter>
|
||||
#include <osgDB/Options>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
@@ -39,8 +40,8 @@ class OSGDB_EXPORT Input : public FieldReaderIterator
|
||||
Input();
|
||||
virtual ~Input();
|
||||
|
||||
void setOptions(const ReaderWriter::Options* options) { _options = options; }
|
||||
const ReaderWriter::Options* getOptions() const { return _options.get(); }
|
||||
void setOptions(const Options* options) { _options = options; }
|
||||
const Options* getOptions() const { return _options.get(); }
|
||||
|
||||
virtual osg::Object* readObjectOfType(const osg::Object& compObj);
|
||||
virtual osg::Object* readObjectOfType(const basic_type_wrapper &btw);
|
||||
@@ -87,7 +88,7 @@ class OSGDB_EXPORT Input : public FieldReaderIterator
|
||||
typedef std::map< std::string, osg::ref_ptr<osg::Object> > UniqueIDToObjectMapping;
|
||||
UniqueIDToObjectMapping _uniqueIDToObjectMap;
|
||||
|
||||
osg::ref_ptr<const ReaderWriter::Options> _options;
|
||||
osg::ref_ptr<const Options> _options;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user