osgEarth 2.1.1
|
Public Types | |
typedef std::map< std::string, osg::observer_ptr< VPBDatabase > > | VPBDatabaseMap |
Public Member Functions | |
VPBSourceFactory () | |
virtual const char * | className () |
virtual ReadResult | readObject (const std::string &file_name, const Options *options) const |
Public Attributes | |
OpenThreads::Mutex | vpbDatabaseMapMutex |
VPBDatabaseMap | vpbDatabaseMap |
Definition at line 634 of file ReaderWriterVPB.cpp.
typedef std::map<std::string, osg::observer_ptr<VPBDatabase> > VPBSourceFactory::VPBDatabaseMap |
Definition at line 673 of file ReaderWriterVPB.cpp.
VPBSourceFactory::VPBSourceFactory | ( | ) | [inline] |
Definition at line 637 of file ReaderWriterVPB.cpp.
{ supportsExtension( "osgearth_vpb", "VirtualPlanetBuilder data" ); }
virtual const char* VPBSourceFactory::className | ( | ) | [inline, virtual] |
Definition at line 642 of file ReaderWriterVPB.cpp.
{ return "VirtualPlanetBuilder ReaderWriter"; }
virtual ReadResult VPBSourceFactory::readObject | ( | const std::string & | file_name, |
const Options * | options | ||
) | const [inline, virtual] |
Definition at line 647 of file ReaderWriterVPB.cpp.
{ if ( !acceptsExtension(osgDB::getLowerCaseFileExtension( file_name ))) return ReadResult::FILE_NOT_HANDLED; VPBOptions vpbOptions( getTileSourceOptions(options) ); URI url = vpbOptions.url().value(); if ( !url.empty() ) { OpenThreads::ScopedLock<OpenThreads::Mutex> lock(vpbDatabaseMapMutex); osg::observer_ptr<VPBDatabase>& db_ptr = vpbDatabaseMap[*url]; //get or create if (!db_ptr) db_ptr = new VPBDatabase( vpbOptions ); if (db_ptr.valid()) return new VPBSource( db_ptr.get(), vpbOptions ); else return ReadResult::FILE_NOT_FOUND; } else { return ReadResult::FILE_NOT_HANDLED; } }
Definition at line 675 of file ReaderWriterVPB.cpp.
OpenThreads::Mutex VPBSourceFactory::vpbDatabaseMapMutex [mutable] |
Definition at line 674 of file ReaderWriterVPB.cpp.