Changeset 10174 for OpenSceneGraph/trunk/include/osgDB/Options
- Timestamp:
- 05/11/09 13:39:12 (4 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osgDB/Options (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgDB/Options
r10172 r10174 17 17 #include <osgDB/AuthenticationMap> 18 18 #include <osgDB/ReaderWriter> 19 #include <osgDB/FileCache> 19 20 20 21 #include <deque> … … 87 88 }; 88 89 90 class OSGDB_EXPORT FileLocationCallback : public virtual osg::Referenced 91 { 92 public: 93 94 enum Location 95 { 96 LOCAL_FILE, 97 REMOTE_FILE 98 }; 99 100 virtual Location fileLocation(const std::string& filename, const Options* options) = 0; 101 102 virtual bool useFileCache() const = 0; 103 104 protected: 105 virtual ~FileLocationCallback() {} 106 }; 107 108 89 109 /** Options base class used for passing options into plugins to control their operation.*/ 90 class O ptions : public osg::Object110 class OSGDB_EXPORT Options : public osg::Object 91 111 { 92 112 public: … … 234 254 235 255 236 /** Set the Registrycallback to use in place of the default writeFile calls.*/256 /** Set the callback to use in place of the default writeFile calls.*/ 237 257 void setWriteFileCallback( WriteFileCallback* cb) { _writeFileCallback = cb; } 238 258 239 259 /** Get the const writeFile callback.*/ 240 260 WriteFileCallback* getWriteFileCallback() const { return _writeFileCallback.get(); } 261 262 263 /** Set the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/ 264 void setFileLocationCallback( FileLocationCallback* cb) { _fileLocationCallback = cb; } 265 266 /** Get the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/ 267 FileLocationCallback* getFileLocationCallback() const { return _fileLocationCallback.get(); } 268 269 270 /** Set the FileCache that is used to manage local storage of files downloaded from the internet.*/ 271 void setFileCache(FileCache* fileCache) { _fileCache = fileCache; } 272 273 /** Get the FileCache that is used to manage local storage of files downloaded from the internet.*/ 274 FileCache* getFileCache() const { return _fileCache.get(); } 241 275 242 276 … … 259 293 osg::ref_ptr<ReadFileCallback> _readFileCallback; 260 294 osg::ref_ptr<WriteFileCallback> _writeFileCallback; 295 osg::ref_ptr<FileLocationCallback> _fileLocationCallback; 296 297 osg::ref_ptr<FileCache> _fileCache; 261 298 }; 262 299
