Show
Ignore:
Timestamp:
05/11/09 13:39:12 (5 years ago)
Author:
robert
Message:

Moved Registry::ReadFileCallback? + WriteFileCallback?, and osgDB::ReaderWriter::Options into their own separate Options file and into the osgDB namespace.

Introduced a new callback osgDB::FindFileCallback? that overrides the default behavior of findDataFile/findLibraryFile.

Introduced support for assigning ReaderWriter::Options directory to PagedLOD.

Introduced new osgDB::FileLocationCallback? for assistancing the DatabasePager? to know when a file is hosted on a local or remote file system.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgDB/Registry

    r10171 r10174  
    165165        typedef class osgDB::ReadFileCallback ReadFileCallback; 
    166166        typedef class osgDB::WriteFileCallback WriteFileCallback; 
     167        typedef class osgDB::FileLocationCallback FileLocationCallback; 
    167168 
    168169        /** Set the Registry callback to use in place of the default findFile calls.*/ 
     
    327328        } 
    328329 
     330        /** Set the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/ 
     331        void setFileLocationCallback( FileLocationCallback* cb) { _fileLocationCallback = cb; } 
     332 
     333        /** Get the callback to use inform the DatabasePager whether a file is located on local or remote file system..*/ 
     334        FileLocationCallback* getFileLocationCallback() const { return _fileLocationCallback.get(); } 
     335 
     336 
    329337 
    330338        /** Set whether the KdTrees should be built for geometry in the loader model. */ 
     
    339347        /** Get the KdTreeBuilder visitor that is used to build KdTree on loaded models.*/ 
    340348        osg::KdTreeBuilder* getKdTreeBuilder() { return _kdTreeBuilder.get(); } 
     349 
    341350 
    342351        /** Set the FileCache that is used to manage local storage of files downloaded from the internet.*/ 
     
    489498            therefore ensuring only one copy is ever constructed*/ 
    490499        Registry(); 
    491          
     500 
    492501        /** get the attached library with specified name.*/ 
    493502        DynamicLibraryList::iterator getLibraryItr(const std::string& fileName); 
     
    558567        osg::ref_ptr<ReadFileCallback>      _readFileCallback; 
    559568        osg::ref_ptr<WriteFileCallback>     _writeFileCallback; 
     569        osg::ref_ptr<FileLocationCallback>  _fileLocationCallback; 
    560570 
    561571        DotOsgWrapperMap   _objectWrapperMap;