|
Public Member Functions |
| void | readCommandLine (osg::ArgumentParser &commandLine) |
| | read the command line arguments.
|
| void | addFileExtensionAlias (const std::string mapExt, const std::string toExt) |
| | register an .fileextension alias to mapExt toExt, the later should the the extension name of the readerwriter plugin library.
|
| void | addDotOsgWrapper (DotOsgWrapper *wrapper) |
| void | removeDotOsgWrapper (DotOsgWrapper *wrapper) |
| void | addReaderWriter (ReaderWriter *rw) |
| void | removeReaderWriter (ReaderWriter *rw) |
| std::string | createLibraryNameForFile (const std::string &fileName) |
| | create the platform specific library name associated with file.
|
| std::string | createLibraryNameForExtension (const std::string &ext) |
| | create the platform specific library name associated with file extension.
|
| std::string | createLibraryNameForNodeKit (const std::string &name) |
| | create the platform specific library name associated with nodekit library name.
|
| bool | loadLibrary (const std::string &fileName) |
| | find the library in the SG_LIBRARY_PATH and load it.
|
| bool | closeLibrary (const std::string &fileName) |
| | close the attached library with specified name.
|
| void | closeAllLibraries () |
| | close all libraries.
|
| ReaderWriter * | getReaderWriterForExtension (const std::string &ext) |
| | get a reader writer which handles specified extension.
|
| osg::Object * | readObjectOfType (const osg::Object &compObj, Input &fr) |
| osg::Object * | readObjectOfType (const basic_type_wrapper &btw, Input &fr) |
| osg::Object * | readObject (Input &fr) |
| osg::Image * | readImage (Input &fr) |
| osg::Drawable * | readDrawable (Input &fr) |
| osg::Uniform * | readUniform (Input &fr) |
| osg::StateAttribute * | readStateAttribute (Input &fr) |
| osg::Node * | readNode (Input &fr) |
| bool | writeObject (const osg::Object &obj, Output &fw) |
| void | setReadFileCallback (ReadFileCallback *cb) |
| | Set the Registry callback to use in place of the default readFile calls.
|
| ReadFileCallback * | getReadFileCallback () |
| | Get the readFile callback.
|
| const ReadFileCallback * | getReadFileCallback () const |
| | Get the const readFile callback.
|
| ReaderWriter::ReadResult | openArchive (const std::string &fileName, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | openArchiveImplementation (const std::string &fileName, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readObject (const std::string &fileName, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readObjectImplementation (const std::string &fileName, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readImage (const std::string &fileName, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readImageImplementation (const std::string &fileName, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readHeightField (const std::string &fileName, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readHeightFieldImplementation (const std::string &fileName, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readNode (const std::string &fileName, const ReaderWriter::Options *options) |
| ReaderWriter::ReadResult | readNodeImplementation (const std::string &fileName, const ReaderWriter::Options *options) |
| void | setWriteFileCallback (WriteFileCallback *cb) |
| | Set the Registry callback to use in place of the default writeFile calls.
|
| WriteFileCallback * | getWriteFileCallback () |
| | Get the writeFile callback.
|
| const WriteFileCallback * | getWriteFileCallback () const |
| | Get the const writeFile callback.
|
| ReaderWriter::WriteResult | writeObject (const osg::Object &obj, const std::string &fileName) |
| ReaderWriter::WriteResult | writeObjectImplementation (const osg::Object &obj, const std::string &fileName) |
| ReaderWriter::WriteResult | writeImage (const osg::Image &obj, const std::string &fileName) |
| ReaderWriter::WriteResult | writeImageImplementation (const osg::Image &obj, const std::string &fileName) |
| ReaderWriter::WriteResult | writeHeightField (const osg::HeightField &obj, const std::string &fileName) |
| ReaderWriter::WriteResult | writeHeightFieldImplementation (const osg::HeightField &obj, const std::string &fileName) |
| ReaderWriter::WriteResult | writeNode (const osg::Node &node, const std::string &fileName) |
| ReaderWriter::WriteResult | writeNodeImplementation (const osg::Node &node, const std::string &fileName) |
| void | setCreateNodeFromImage (bool flag) |
| bool | getCreateNodeFromImage () const |
| void | setOptions (ReaderWriter::Options *opt) |
| ReaderWriter::Options * | getOptions () |
| const ReaderWriter::Options * | getOptions () const |
| void | initFilePathLists () |
| | initilize both the Data and Library FilePaths, by default called by the constructor, so it should only be required if you want to force the re-reading of environmental variables.
|
| void | initDataFilePathList () |
| | initilize the Data FilePath by reading the OSG_FILE_PATH environmental variable.
|
| void | setDataFilePathList (const FilePathList &filepath) |
| | Set the data file path using a list of paths stored in a FilePath, which is used when search for data files.
|
| void | setDataFilePathList (const std::string &paths) |
| | Set the data file path using a single string deliminated either with ';' (Windows) or ':' (All other platforms), which is used when search for data files.
|
| FilePathList & | getDataFilePathList () |
| | get the data file path which is used when search for data files.
|
| const FilePathList & | getDataFilePathList () const |
| | get the const data file path which is used when search for data files.
|
| void | initLibraryFilePathList () |
| | initilize the Library FilePath by reading the OSG_LIBRARY_PATH and the appropriate system environmental variables
|
| void | setLibraryFilePathList (const FilePathList &filepath) |
| | Set the library file path using a list of paths stored in a FilePath, which is used when search for data files.
|
| void | setLibraryFilePathList (const std::string &paths) |
| | Set the library file path using a single string deliminated either with ';' (Windows) or ':' (All other platforms), which is used when search for data files.
|
| FilePathList & | getLibraryFilePathList () |
| | get the library file path which is used when search for library (dso/dll's) files.
|
| const FilePathList & | getLibraryFilePathList () const |
| | get the const library file path which is used when search for library (dso/dll's) files.
|
| void | updateTimeStampOfObjectsInCacheWithExtenalReferences (double currentTime) |
| | For each object in the cache which has an reference count greater than 1 (and therefore referenced by elsewhere in the application) set the time stamp for that object in the cache to specified time.
|
| void | removeExpiredObjectsInCache (double expiryTime) |
| | Removed object in the cache which have a time stamp at or before the specified expiry time.
|
| void | clearObjectCache () |
| | Remove all objects in the cache regardless of having external references or expiry times.
|
| void | addEntryToObjectCache (const std::string &filename, osg::Object *object, double timestamp=0.0) |
| | Add a filename,object,timestamp tripple to the Registry::ObjectCache.
|
| osg::Object * | getFromObjectCache (const std::string &fileName) |
| | Get an object from the object cache.
|
| void | addToArchiveCache (const std::string &fileName, osgDB::Archive *archive) |
| | Add archive to archive cache so that future calls reference this archive.
|
| void | removeFromArchiveCache (const std::string &fileName) |
| | Remove archive from cache.
|
| osgDB::Archive * | getFromArchiveCache (const std::string &fileName) |
| | Get an archive from the archive cache.
|
| void | clearArchiveCache () |
| | Remove all archives from the archive cache.
|
| void | releaseGLObjects (osg::State *state=0) |
| | If State is non-zero, this function releases OpenGL objects for the specified graphics context.
|
| DynamicLibrary * | getLibrary (const std::string &fileName) |
| | get the attached library with specified name.
|
| void | setDatabasePager (DatabasePager *databasePager) |
| | Set the DatabasePager.
|
| DatabasePager * | getOrCreateDatabasePager () |
| | Get the DatabasePager, creating one if one is not already created.
|
| DatabasePager * | getDatabasePager () |
| | Get the DatabasePager.
|
| void | setSharedStateManager (SharedStateManager *SharedStateManager) |
| | Set the SharedStateManager.
|
| SharedStateManager * | getOrCreateSharedStateManager () |
| | Get the SharedStateManager, creating one if one is not already created.
|
| SharedStateManager * | getSharedStateManager () |
| | Get the SharedStateManager.
|
Static Public Member Functions |
| Registry * | instance (bool erase=false) |
Protected Types |
typedef std::vector< osg::ref_ptr<
ReaderWriter > > | ReaderWriterList |
typedef std::map< std::string,
osg::ref_ptr< DotOsgWrapper > > | DotOsgWrapperMap |
typedef std::vector< osg::ref_ptr<
DynamicLibrary > > | DynamicLibraryList |
typedef std::map< std::string,
std::string > | ExtensionAliasMap |
typedef std::pair< osg::ref_ptr<
osg::Object >, double > | ObjectTimeStampPair |
typedef std::map< std::string,
ObjectTimeStampPair > | ObjectCache |
typedef std::map< std::string,
osg::ref_ptr< osgDB::Archive > > | ArchiveCache |
Protected Member Functions |
| virtual | ~Registry () |
| | Registry () |
| | constructor is private, as its a singleton, preventing construction other than via the instance() method and therefore ensuring only one copy is ever constructed
|
| DynamicLibraryList::iterator | getLibraryItr (const std::string &fileName) |
| | get the attached library with specified name.
|
| osg::Object * | readObject (DotOsgWrapperMap &dowMap, Input &fr) |
| void | eraseWrapper (DotOsgWrapperMap &wrappermap, DotOsgWrapper *wrapper) |
| ReaderWriter::ReadResult | read (const ReadFunctor &readFunctor) |
| ReaderWriter::ReadResult | readImplementation (const ReadFunctor &readFunctor, bool useObjectCache) |
Protected Attributes |
| bool | _createNodeFromImage |
| osg::ref_ptr< ReadFileCallback > | _readFileCallback |
| osg::ref_ptr< WriteFileCallback > | _writeFileCallback |
| DotOsgWrapperMap | _objectWrapperMap |
| DotOsgWrapperMap | _imageWrapperMap |
| DotOsgWrapperMap | _drawableWrapperMap |
| DotOsgWrapperMap | _stateAttrWrapperMap |
| DotOsgWrapperMap | _uniformWrapperMap |
| DotOsgWrapperMap | _nodeWrapperMap |
| DotOsgWrapperMap | _classNameWrapperMap |
| ReaderWriterList | _rwList |
| DynamicLibraryList | _dlList |
| bool | _openingLibrary |
| ExtensionAliasMap | _extAliasMap |
| osg::ref_ptr< ReaderWriter::Options > | _options |
| FilePathList | _dataFilePath |
| FilePathList | _libraryFilePath |
| ObjectCache | _objectCache |
| OpenThreads::Mutex | _objectCacheMutex |
| ArchiveCache | _archiveCache |
| OpenThreads::Mutex | _archiveCacheMutex |
| osg::ref_ptr< DatabasePager > | _databasePager |
| osg::ref_ptr< SharedStateManager > | _sharedStateManager |