From e54f46f6309b9a09196a6fcf7a9b29a882f69063 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 22 Nov 2004 14:49:27 +0000 Subject: [PATCH] Removed the cache hints from registery placing them wholly into ReaderWriter's responsibility. --- include/osgDB/ReaderWriter | 2 +- include/osgDB/Registry | 8 -------- src/osgDB/Registry.cpp | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/osgDB/ReaderWriter b/include/osgDB/ReaderWriter index 383c0c2d3..79aae6509 100644 --- a/include/osgDB/ReaderWriter +++ b/include/osgDB/ReaderWriter @@ -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): diff --git a/include/osgDB/Registry b/include/osgDB/Registry index c1f4c37d5..b6fe1fa6b 100644 --- a/include/osgDB/Registry +++ b/include/osgDB/Registry @@ -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; diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index 91325e006..4e2dfd35e 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -138,8 +138,6 @@ Registry::Registry() _createNodeFromImage = false; _openingLibrary = false; - _useObjectCacheHint = ReaderWriter::Options::CACHE_ARCHIVES; - initFilePathLists(); // register file extension alias.