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,23 +23,23 @@ namespace osgDB {
|
||||
class OSGDB_EXPORT FileCache : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
FileCache(const std::string& path);
|
||||
|
||||
const std::string& getFileCachePath() const { return _fileCachePath; }
|
||||
|
||||
virtual std::string createCacheFileName(const std::string& originalFileName) const;
|
||||
|
||||
|
||||
virtual bool existsInCache(const std::string& originalFileName) const;
|
||||
|
||||
virtual ReaderWriter::ReadResult readNode(const std::string& originalFileName, const osgDB::ReaderWriter::Options* options, bool buildKdTreeIfRequired=true) const;
|
||||
|
||||
virtual ReaderWriter::WriteResult writeNode(const osg::Node& node, const std::string& originalFileName, const osgDB::ReaderWriter::Options* options) const;
|
||||
|
||||
virtual ReaderWriter::ReadResult readNode(const std::string& originalFileName, const osgDB::Options* options, bool buildKdTreeIfRequired=true) const;
|
||||
|
||||
virtual ReaderWriter::WriteResult writeNode(const osg::Node& node, const std::string& originalFileName, const osgDB::Options* options) const;
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~FileCache();
|
||||
|
||||
|
||||
std::string _fileCachePath;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user