Removed the cache hints from registery placing them wholly into ReaderWriter's responsibility.
This commit is contained in:
@@ -83,7 +83,7 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
|
||||
};
|
||||
|
||||
|
||||
Options():_useObjectCacheHint(CACHE_NONE) {}
|
||||
Options():_useObjectCacheHint(CACHE_ARCHIVES) {}
|
||||
Options(const std::string& str):_str(str) {}
|
||||
|
||||
Options(const Options& options,const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):
|
||||
|
||||
@@ -334,13 +334,6 @@ class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
/** Add a filename,object,timestamp tripple to the Registry::ObjectCache.*/
|
||||
void addEntryToObjectCache(const std::string& filename, osg::Object* object, double timestamp = 0.0);
|
||||
|
||||
/** Set whether the Registry::ObjectCache should be used by default.*/
|
||||
void setUseObjectCacheHint(ReaderWriter::Options::CacheHintOptions useObjectCache) { _useObjectCacheHint = useObjectCache; }
|
||||
|
||||
/** Get whether the Registry::ObjectCache should be used by default.*/
|
||||
ReaderWriter::Options::CacheHintOptions getUseObjectCacheHint() const { return _useObjectCacheHint; }
|
||||
|
||||
|
||||
/** Add archive to archive cache so that future calls reference this archive.*/
|
||||
void addToArchiveCache(const std::string& fileName, osgDB::Archive* archive);
|
||||
|
||||
@@ -469,7 +462,6 @@ class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
FilePathList _dataFilePath;
|
||||
FilePathList _libraryFilePath;
|
||||
|
||||
ReaderWriter::Options::CacheHintOptions _useObjectCacheHint;
|
||||
ObjectCache _objectCache;
|
||||
OpenThreads::Mutex _objectCacheMutex;
|
||||
|
||||
|
||||
@@ -138,8 +138,6 @@ Registry::Registry()
|
||||
_createNodeFromImage = false;
|
||||
_openingLibrary = false;
|
||||
|
||||
_useObjectCacheHint = ReaderWriter::Options::CACHE_ARCHIVES;
|
||||
|
||||
initFilePathLists();
|
||||
|
||||
// register file extension alias.
|
||||
|
||||
Reference in New Issue
Block a user