OpenSceneGraph 3.6.5
|
Registry is a singleton factory which stores the reader/writers which are linked in at runtime for reading non-native file formats. More...
#include <Registry>
Classes | |
struct | ReadFunctor |
Functor used in internal implementations. More... |
Public Types | |
enum | LoadStatus { NOT_LOADED = 0 , PREVIOUSLY_LOADED , LOADED } |
typedef std::map< std::string, std::string > | MimeTypeExtensionMap |
typedef std::vector< osg::ref_ptr< ReaderWriter > > | ReaderWriterList |
typedef std::vector< osg::ref_ptr< ImageProcessor > > | ImageProcessorList |
typedef class osgDB::FindFileCallback | FindFileCallback |
typedef class osgDB::ReadFileCallback | ReadFileCallback |
typedef class osgDB::WriteFileCallback | WriteFileCallback |
typedef class osgDB::FileLocationCallback | FileLocationCallback |
typedef std::vector< std::string > | ArchiveExtensionList |
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 be the extension name of the readerwriter plugin library. | |
bool | readPluginAliasConfigurationFile (const std::string &file) |
Reads a file that configures extension mappings. | |
void | addMimeTypeExtensionMapping (const std::string fromMimeType, const std::string toExt) |
Registers a mapping of a mime-type to an extension. | |
MimeTypeExtensionMap & | getMimeTypeExtensionMap () |
const MimeTypeExtensionMap & | getMimeTypeExtensionMap () const |
void | addReaderWriter (ReaderWriter *rw) |
void | removeReaderWriter (ReaderWriter *rw) |
void | addImageProcessor (ImageProcessor *ip) |
void | removeImageProcessor (ImageProcessor *ip) |
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. | |
LoadStatus | loadLibrary (const std::string &fileName) |
find the library in the OSG_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. | |
ReaderWriter * | getReaderWriterForMimeType (const std::string &mimeType) |
gets a reader/writer that handles the extension mapped to by one of the registered mime-types. | |
ReaderWriterList & | getReaderWriterList () |
get list of all registered ReaderWriters. | |
const ReaderWriterList & | getReaderWriterList () const |
get const list of all registered ReaderWriters. | |
void | getReaderWriterListForProtocol (const std::string &protocol, ReaderWriterList &results) const |
get a list of registered ReaderWriters which can handle given protocol | |
ReaderWriter * | getReaderWriterForProtocolAndExtension (const std::string &protocol, const std::string &extension) |
ImageProcessor * | getImageProcessor () |
get a image processor if available. | |
ImageProcessor * | getImageProcessorForExtension (const std::string &ext) |
get a image processor which is associated specified extension. | |
ImageProcessorList & | getImageProcessorList () |
get list of all registered ImageProcessors. | |
const ImageProcessorList & | getImageProcessorList () const |
get const list of all registered ImageProcessors. | |
void | setFindFileCallback (FindFileCallback *cb) |
Set the Registry callback to use in place of the default findFile calls. | |
FindFileCallback * | getFindFileCallback () |
Get the findFile callback. | |
const FindFileCallback * | getFindFileCallback () const |
Get the const findFile callback. | |
std::string | findDataFile (const std::string &fileName, const Options *options, CaseSensitivity caseSensitivity) |
std::string | findDataFileImplementation (const std::string &fileName, const Options *options, CaseSensitivity caseSensitivity) |
std::string | findLibraryFile (const std::string &fileName, const Options *options, CaseSensitivity caseSensitivity) |
std::string | findLibraryFileImplementation (const std::string &fileName, const Options *options, CaseSensitivity caseSensitivity) |
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 Options *options) |
ReaderWriter::ReadResult | openArchiveImplementation (const std::string &fileName, ReaderWriter::ArchiveStatus status, unsigned int indexBlockSizeHint, const Options *options) |
ReaderWriter::ReadResult | readObject (const std::string &fileName, const Options *options, bool buildKdTreeIfRequired=true) |
ReaderWriter::ReadResult | readObjectImplementation (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readImage (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readImageImplementation (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readHeightField (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readHeightFieldImplementation (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readNode (const std::string &fileName, const Options *options, bool buildKdTreeIfRequired=true) |
ReaderWriter::ReadResult | readNodeImplementation (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readShader (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readShaderImplementation (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readScript (const std::string &fileName, const Options *options) |
ReaderWriter::ReadResult | readScriptImplementation (const std::string &fileName, const 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, const Options *options) |
ReaderWriter::WriteResult | writeObjectImplementation (const osg::Object &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeImage (const osg::Image &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeImageImplementation (const osg::Image &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeHeightField (const osg::HeightField &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeHeightFieldImplementation (const osg::HeightField &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeNode (const osg::Node &node, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeNodeImplementation (const osg::Node &node, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeShader (const osg::Shader &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeShaderImplementation (const osg::Shader &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeScript (const osg::Script &obj, const std::string &fileName, const Options *options) |
ReaderWriter::WriteResult | writeScriptImplementation (const osg::Script &obj, const std::string &fileName, const Options *options) |
void | _buildKdTreeIfRequired (ReaderWriter::ReadResult &result, const Options *options) |
void | setFileLocationCallback (FileLocationCallback *cb) |
Set the callback to use inform to the DatabasePager whether a file is located on local or remote file system. | |
FileLocationCallback * | getFileLocationCallback () const |
Get the callback to use inform to the DatabasePager whether a file is located on local or remote file system. | |
void | setBuildKdTreesHint (Options::BuildKdTreesHint hint) |
Set whether the KdTrees should be built for geometry in the loader model. | |
Options::BuildKdTreesHint | getBuildKdTreesHint () const |
Get whether the KdTrees should be built for geometry in the loader model. | |
void | setKdTreeBuilder (osg::KdTreeBuilder *builder) |
Set the KdTreeBuilder visitor that is used to build KdTree on loaded models. | |
osg::KdTreeBuilder * | getKdTreeBuilder () |
Get the KdTreeBuilder visitor that is used to build KdTree on loaded models. | |
void | setFileCache (FileCache *fileCache) |
Set the FileCache that is used to manage local storage of files downloaded from the internet. | |
FileCache * | getFileCache () |
Get the FileCache that is used to manage local storage of files downloaded from the internet. | |
const FileCache * | getFileCache () const |
Get the const FileCache that is used to manage local storage of files downloaded from the internet. | |
void | setAuthenticationMap (AuthenticationMap *authenticationMap) |
Set the password map to be used by plugins when access files from secure locations. | |
AuthenticationMap * | getOrCreateAuthenticationMap () |
Get the password map to be used by plugins when access files from secure locations. | |
AuthenticationMap * | getAuthenticationMap () |
Get the password map to be used by plugins when access files from secure locations. | |
const AuthenticationMap * | getAuthenticationMap () const |
Get the password map to be used by plugins when access files from secure locations. | |
void | setCreateNodeFromImage (bool flag) |
bool | getCreateNodeFromImage () const |
void | setOptions (Options *opt) |
Options * | getOptions () |
const Options * | getOptions () const |
void | initFilePathLists () |
initialize 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 () |
initialize 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 delimited 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 () |
initialize 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 delimited 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 | setObjectCache (ObjectCache *objectCache) |
Set the ObjectCache that is used to manage local storage of files downloaded from the internet. | |
ObjectCache * | getObjectCache () |
Get the ObjectCache that is used to manage local storage of files downloaded from the internet. | |
const ObjectCache * | getObjectCache () const |
Get the const ObjectCache that is used to manage local storage of files downloaded from the internet. | |
void | setExpiryDelay (double expiryDelay) |
set hint to viewer code calling removeExpiredObjectsInCache to specify how long it should give before expiring objects in Registry cache, | |
double | getExpiryDelay () const |
void | updateTimeStampOfObjectsInCacheWithExternalReferences (const osg::FrameStamp &frameStamp) |
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 (const osg::FrameStamp &frameStamp) |
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, Options *options=NULL) |
Add a filename,object,timestamp triple to the Registry::ObjectCache. | |
void | removeFromObjectCache (const std::string &fileName, Options *options=NULL) |
Remove Object from cache. | |
osg::Object * | getFromObjectCache (const std::string &fileName, Options *options=NULL) |
Get an Object from the object cache. | |
osg::ref_ptr< osg::Object > | getRefFromObjectCache (const std::string &fileName, Options *options=NULL) |
Get an ref_ptr<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. | |
osg::ref_ptr< osgDB::Archive > | getRefFromArchiveCache (const std::string &fileName) |
Get an ref_ptr<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 | setSharedStateManager (SharedStateManager *SharedStateManager) |
Set the SharedStateManager. | |
SharedStateManager * | getOrCreateSharedStateManager () |
Get the SharedStateManager, creating one if one is not already created. | |
SharedStateManager * | getSharedStateManager () |
Get the SharedStateManager. | |
void | addArchiveExtension (const std::string ext) |
Add an Archive extension. | |
void | registerProtocol (const std::string &protocol) |
registers a protocol | |
bool | isProtocolRegistered (const std::string &protocol) |
returns true, if named protocol is registered | |
ObjectWrapperManager * | getObjectWrapperManager () |
Get the ObjectWrapperManager that is used to store all the ObjectWrappers. | |
DeprecatedDotOsgWrapperManager * | getDeprecatedDotOsgObjectWrapperManager () |
Get the ObjectWrapperManager that is used to store all the ObjectWrappers. | |
const ArchiveExtensionList & | getArchiveExtensions () const |
Public Member Functions inherited from osg::Referenced | |
Referenced () | |
Referenced (bool threadSafeRefUnref) | |
Deprecated, Referenced is now always uses thread safe ref/unref, use default Referenced() constructor instead. | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
virtual void | setThreadSafeRefUnref (bool) |
Deprecated, Referenced is always theadsafe so there method now has no effect and does not need to be called. | |
bool | getThreadSafeRefUnref () const |
Get whether a mutex is used to ensure ref() and unref() are thread safe. | |
OpenThreads::Mutex * | getRefMutex () const |
Get the mutex used to ensure thread safety of ref()/unref(). | |
int | ref () const |
Increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
int | unref () const |
Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. | |
int | unref_nodelete () const |
Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. | |
int | referenceCount () const |
Return the number of pointers currently referencing this object. | |
ObserverSet * | getObserverSet () const |
Get the ObserverSet if one is attached, otherwise return NULL. | |
ObserverSet * | getOrCreateObserverSet () const |
Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet. | |
void | addObserver (Observer *observer) const |
Add a Observer that is observing this object, notify the Observer when this object gets deleted. | |
void | removeObserver (Observer *observer) const |
Remove Observer that is observing this object. |
Static Public Member Functions | |
static Registry * | instance (bool erase=false) |
Static Public Member Functions inherited from osg::Referenced | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
Get the optional global Referenced mutex, this can be shared between all osg::Referenced. | |
static void | setDeleteHandler (DeleteHandler *handler) |
Set a DeleteHandler to which deletion of all referenced counted objects will be delegated. | |
static DeleteHandler * | getDeleteHandler () |
Get a DeleteHandler. |
Protected Types | |
typedef std::vector< osg::ref_ptr< DynamicLibrary > > | DynamicLibraryList |
typedef std::map< std::string, std::string > | ExtensionAliasMap |
typedef std::map< std::string, osg::ref_ptr< osgDB::Archive > > | ArchiveCache |
typedef std::set< std::string > | RegisteredProtocolsSet |
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. | |
void | destruct () |
ReaderWriter::ReadResult | read (const ReadFunctor &readFunctor) |
ReaderWriter::ReadResult | readImplementation (const ReadFunctor &readFunctor, Options::CacheHintOptions cacheHint) |
Protected Member Functions inherited from osg::Referenced | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
Static Protected Member Functions | |
static std::string | trim (const std::string &str) |
Friends | |
struct | ReadFunctor |
struct | ReadObjectFunctor |
struct | ReadImageFunctor |
struct | ReadHeightFieldFunctor |
struct | ReadNodeFunctor |
struct | ReadArchiveFunctor |
struct | ReadShaderFunctor |
struct | ReadScriptFunctor |
class | AvailableReaderWriterIterator |
class | AvailableArchiveIterator |
Registry is a singleton factory which stores the reader/writers which are linked in at runtime for reading non-native file formats.
The RegisterReaderWriterProxy can be used to automatically register at runtime a reader/writer with the Registry.
|
protected |
typedef std::vector< std::string> osgDB::Registry::ArchiveExtensionList |
|
protected |
|
protected |
typedef class osgDB::FindFileCallback osgDB::Registry::FindFileCallback |
typedef std::vector< osg::ref_ptr<ImageProcessor> > osgDB::Registry::ImageProcessorList |
typedef std::map< std::string, std::string> osgDB::Registry::MimeTypeExtensionMap |
typedef std::vector< osg::ref_ptr<ReaderWriter> > osgDB::Registry::ReaderWriterList |
typedef class osgDB::ReadFileCallback osgDB::Registry::ReadFileCallback |
|
protected |
typedef class osgDB::WriteFileCallback osgDB::Registry::WriteFileCallback |
|
protectedvirtual |
|
protected |
constructor is private, as its a singleton, preventing construction other than via the instance() method and therefore ensuring only one copy is ever constructed
Referenced by instance().
|
inline |
References _buildKdTreesHint, _kdTreeBuilder, osg::Node::accept(), osgDB::Options::BUILD_KDTREES, osgDB::Options::getBuildKdTreesHint(), osgDB::ReaderWriter::ReadResult::getNode(), osgDB::Options::NO_PREFERENCE, and osgDB::ReaderWriter::ReadResult::validNode().
Referenced by readNode(), and readObject().
void osgDB::Registry::addArchiveExtension | ( | const std::string | ext | ) |
Add an Archive extension.
void osgDB::Registry::addEntryToObjectCache | ( | const std::string & | filename, |
osg::Object * | object, | ||
double | timestamp = 0.0, | ||
Options * | options = NULL ) |
Add a filename,object,timestamp triple to the Registry::ObjectCache.
References NULL.
void osgDB::Registry::addFileExtensionAlias | ( | const std::string | mapExt, |
const std::string | toExt ) |
register an .fileextension alias to mapExt toExt, the later should be the extension name of the readerwriter plugin library.
For example to map .tif files to the tiff loader, use addExtAlias("tif","tiff") which will enable .tif to be read by the libdb_tiff readerwriter plugin.
void osgDB::Registry::addImageProcessor | ( | ImageProcessor * | ip | ) |
void osgDB::Registry::addMimeTypeExtensionMapping | ( | const std::string | fromMimeType, |
const std::string | toExt ) |
Registers a mapping of a mime-type to an extension.
A process fetching data over HTTP can use this facility to determine the proper ReaderWriter to use when there is no filename extension to rely upon.
void osgDB::Registry::addReaderWriter | ( | ReaderWriter * | rw | ) |
void osgDB::Registry::addToArchiveCache | ( | const std::string & | fileName, |
osgDB::Archive * | archive ) |
Add archive to archive cache so that future calls reference this archive.
void osgDB::Registry::clearArchiveCache | ( | ) |
Remove all archives from the archive cache.
void osgDB::Registry::clearObjectCache | ( | ) |
Remove all objects in the cache regardless of having external references or expiry times.
void osgDB::Registry::closeAllLibraries | ( | ) |
close all libraries.
bool osgDB::Registry::closeLibrary | ( | const std::string & | fileName | ) |
close the attached library with specified name.
std::string osgDB::Registry::createLibraryNameForExtension | ( | const std::string & | ext | ) |
create the platform specific library name associated with file extension.
std::string osgDB::Registry::createLibraryNameForFile | ( | const std::string & | fileName | ) |
create the platform specific library name associated with file.
std::string osgDB::Registry::createLibraryNameForNodeKit | ( | const std::string & | name | ) |
create the platform specific library name associated with nodekit library name.
|
protected |
|
inline |
std::string osgDB::Registry::findDataFileImplementation | ( | const std::string & | fileName, |
const Options * | options, | ||
CaseSensitivity | caseSensitivity ) |
Referenced by findDataFile().
|
inline |
std::string osgDB::Registry::findLibraryFileImplementation | ( | const std::string & | fileName, |
const Options * | options, | ||
CaseSensitivity | caseSensitivity ) |
Referenced by findLibraryFile().
|
inline |
References _archiveExtList.
|
inline |
Get the password map to be used by plugins when access files from secure locations.
References _authenticationMap.
|
inline |
Get the password map to be used by plugins when access files from secure locations.
References _authenticationMap.
|
inline |
Get whether the KdTrees should be built for geometry in the loader model.
References _buildKdTreesHint.
|
inline |
References _createNodeFromImage.
|
inline |
get the data file path which is used when search for data files.
References _dataFilePath.
Referenced by osgDB::getDataFilePathList().
|
inline |
get the const data file path which is used when search for data files.
References _dataFilePath.
|
inline |
Get the ObjectWrapperManager that is used to store all the ObjectWrappers.
References _deprecatedDotOsgWrapperManager.
|
inline |
References _expiryDelay.
|
inline |
Get the FileCache that is used to manage local storage of files downloaded from the internet.
References _fileCache.
|
inline |
Get the const FileCache that is used to manage local storage of files downloaded from the internet.
References _fileCache.
|
inline |
Get the callback to use inform to the DatabasePager whether a file is located on local or remote file system.
References _fileLocationCallback.
|
inline |
Get the findFile callback.
References _findFileCallback.
|
inline |
Get the const findFile callback.
References _findFileCallback.
osgDB::Archive * osgDB::Registry::getFromArchiveCache | ( | const std::string & | fileName | ) |
Get an Archive from the archive cache.
osg::Object * osgDB::Registry::getFromObjectCache | ( | const std::string & | fileName, |
Options * | options = NULL ) |
Get an Object from the object cache.
References NULL.
ImageProcessor * osgDB::Registry::getImageProcessor | ( | ) |
get a image processor if available.
ImageProcessor * osgDB::Registry::getImageProcessorForExtension | ( | const std::string & | ext | ) |
get a image processor which is associated specified extension.
|
inline |
get list of all registered ImageProcessors.
References _ipList.
|
inline |
get const list of all registered ImageProcessors.
References _ipList.
|
inline |
Get the KdTreeBuilder visitor that is used to build KdTree on loaded models.
References _kdTreeBuilder.
DynamicLibrary * osgDB::Registry::getLibrary | ( | const std::string & | fileName | ) |
get the attached library with specified name.
|
inline |
get the library file path which is used when search for library (dso/dll's) files.
References _libraryFilePath.
Referenced by osgDB::getLibraryFilePathList().
|
inline |
get the const library file path which is used when search for library (dso/dll's) files.
References _libraryFilePath.
|
protected |
get the attached library with specified name.
|
inline |
References _mimeTypeExtMap.
|
inline |
References _mimeTypeExtMap.
|
inline |
Get the ObjectCache that is used to manage local storage of files downloaded from the internet.
References _objectCache.
|
inline |
Get the const ObjectCache that is used to manage local storage of files downloaded from the internet.
References _objectCache.
|
inline |
Get the ObjectWrapperManager that is used to store all the ObjectWrappers.
References _objectWrapperManager.
|
inline |
Get the password map to be used by plugins when access files from secure locations.
Create a AuthenticationMap if one isn't already assigned.
References _authenticationMap.
SharedStateManager * osgDB::Registry::getOrCreateSharedStateManager | ( | ) |
Get the SharedStateManager, creating one if one is not already created.
ReaderWriter * osgDB::Registry::getReaderWriterForExtension | ( | const std::string & | ext | ) |
get a reader writer which handles specified extension.
ReaderWriter * osgDB::Registry::getReaderWriterForMimeType | ( | const std::string & | mimeType | ) |
gets a reader/writer that handles the extension mapped to by one of the registered mime-types.
ReaderWriter * osgDB::Registry::getReaderWriterForProtocolAndExtension | ( | const std::string & | protocol, |
const std::string & | extension ) |
|
inline |
get list of all registered ReaderWriters.
References _rwList.
|
inline |
get const list of all registered ReaderWriters.
References _rwList.
void osgDB::Registry::getReaderWriterListForProtocol | ( | const std::string & | protocol, |
ReaderWriterList & | results ) const |
get a list of registered ReaderWriters which can handle given protocol
|
inline |
Get the readFile callback.
References _readFileCallback.
|
inline |
Get the const readFile callback.
References _readFileCallback.
osg::ref_ptr< osgDB::Archive > osgDB::Registry::getRefFromArchiveCache | ( | const std::string & | fileName | ) |
Get an ref_ptr<Archive> from the archive cache.
osg::ref_ptr< osg::Object > osgDB::Registry::getRefFromObjectCache | ( | const std::string & | fileName, |
Options * | options = NULL ) |
Get an ref_ptr<Object> from the object cache.
References NULL.
|
inline |
Get the SharedStateManager.
Return 0 if no SharedStateManager has been assigned.
References _sharedStateManager.
|
inline |
Get the writeFile callback.
References _writeFileCallback.
|
inline |
Get the const writeFile callback.
References _writeFileCallback.
void osgDB::Registry::initDataFilePathList | ( | ) |
initialize the Data FilePath by reading the OSG_FILE_PATH environmental variable.
Referenced by initFilePathLists().
|
inline |
initialize 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.
References initDataFilePathList(), and initLibraryFilePathList().
void osgDB::Registry::initLibraryFilePathList | ( | ) |
initialize the Library FilePath by reading the OSG_LIBRARY_PATH and the appropriate system environmental variables
Referenced by initFilePathLists().
|
static |
References Registry().
Referenced by osgDB::getDataFilePathList(), osgDB::getLibraryFilePathList(), osgDB::readCommandLine(), osgDB::readRefFile(), osgDB::readRefHeightFieldFile(), osgDB::readRefImageFile(), osgDB::readRefNodeFile(), osgDB::readRefNodeFiles(), osgDB::readRefNodeFiles(), osgDB::readRefObjectFile(), osgDB::readRefScriptFile(), osgDB::readRefShaderFile(), osgDB::readRefShaderFile(), osgDB::readRefShaderFileWithFallback(), osgDB::readXmlFile(), osgDB::RegisterImageProcessorProxy< T >::RegisterImageProcessorProxy(), osgDB::RegisterReaderWriterProxy< T >::RegisterReaderWriterProxy(), osgDB::setDataFilePathList(), osgDB::setDataFilePathList(), osgDB::setLibraryFilePathList(), osgDB::setLibraryFilePathList(), osgDB::writeHeightFieldFile(), osgDB::writeImageFile(), osgDB::writeNodeFile(), osgDB::writeObjectFile(), osgDB::writeScriptFile(), osgDB::writeShaderFile(), osgDB::RegisterImageProcessorProxy< T >::~RegisterImageProcessorProxy(), and osgDB::RegisterReaderWriterProxy< T >::~RegisterReaderWriterProxy().
bool osgDB::Registry::isProtocolRegistered | ( | const std::string & | protocol | ) |
returns true, if named protocol is registered
LoadStatus osgDB::Registry::loadLibrary | ( | const std::string & | fileName | ) |
find the library in the OSG_LIBRARY_PATH and load it.
|
inline |
ReaderWriter::ReadResult osgDB::Registry::openArchiveImplementation | ( | const std::string & | fileName, |
ReaderWriter::ArchiveStatus | status, | ||
unsigned int | indexBlockSizeHint, | ||
const Options * | options ) |
Referenced by openArchive().
|
protected |
void osgDB::Registry::readCommandLine | ( | osg::ArgumentParser & | commandLine | ) |
read the command line arguments.
Referenced by osgDB::readCommandLine().
|
inline |
ReaderWriter::ReadResult osgDB::Registry::readHeightFieldImplementation | ( | const std::string & | fileName, |
const Options * | options ) |
Referenced by readHeightField().
|
inline |
ReaderWriter::ReadResult osgDB::Registry::readImageImplementation | ( | const std::string & | fileName, |
const Options * | options ) |
Referenced by readImage().
|
protected |
References AvailableReaderWriterIterator.
|
inline |
ReaderWriter::ReadResult osgDB::Registry::readNodeImplementation | ( | const std::string & | fileName, |
const Options * | options ) |
Referenced by readNode().
|
inline |
ReaderWriter::ReadResult osgDB::Registry::readObjectImplementation | ( | const std::string & | fileName, |
const Options * | options ) |
Referenced by readObject().
bool osgDB::Registry::readPluginAliasConfigurationFile | ( | const std::string & | file | ) |
Reads a file that configures extension mappings.
File is ASCII text and each line contains the parameters to the addFileExtensionAlias method. Lines can be commented out with an initial '#' character.
|
inline |
ReaderWriter::ReadResult osgDB::Registry::readScriptImplementation | ( | const std::string & | fileName, |
const Options * | options ) |
Referenced by readScript().
|
inline |
ReaderWriter::ReadResult osgDB::Registry::readShaderImplementation | ( | const std::string & | fileName, |
const Options * | options ) |
Referenced by readShader().
void osgDB::Registry::registerProtocol | ( | const std::string & | protocol | ) |
registers a protocol
void osgDB::Registry::releaseGLObjects | ( | osg::State * | state = 0 | ) |
If State is non-zero, this function releases OpenGL objects for the specified graphics context.
Otherwise, releases OpenGL objexts for all graphics contexts.
void osgDB::Registry::removeExpiredObjectsInCache | ( | const osg::FrameStamp & | frameStamp | ) |
Removed object in the cache which have a time stamp at or before the specified expiry time.
This would typically be called once per frame by applications which are doing database paging, and need to prune objects that are no longer required, and called after the a called after the call to updateTimeStampOfObjectsInCacheWithExternalReferences(frameStamp).
void osgDB::Registry::removeFromArchiveCache | ( | const std::string & | fileName | ) |
Remove Archive from cache.
void osgDB::Registry::removeFromObjectCache | ( | const std::string & | fileName, |
Options * | options = NULL ) |
Remove Object from cache.
References NULL.
void osgDB::Registry::removeImageProcessor | ( | ImageProcessor * | ip | ) |
void osgDB::Registry::removeReaderWriter | ( | ReaderWriter * | rw | ) |
|
inline |
Set the password map to be used by plugins when access files from secure locations.
References _authenticationMap.
|
inline |
Set whether the KdTrees should be built for geometry in the loader model.
References _buildKdTreesHint.
|
inline |
References _createNodeFromImage.
|
inline |
Set the data file path using a list of paths stored in a FilePath, which is used when search for data files.
References _dataFilePath.
Referenced by osgDB::setDataFilePathList(), and osgDB::setDataFilePathList().
void osgDB::Registry::setDataFilePathList | ( | const std::string & | paths | ) |
Set the data file path using a single string delimited either with ';' (Windows) or ':' (All other platforms), which is used when search for data files.
|
inline |
set hint to viewer code calling removeExpiredObjectsInCache to specify how long it should give before expiring objects in Registry cache,
References _expiryDelay.
|
inline |
Set the FileCache that is used to manage local storage of files downloaded from the internet.
References _fileCache.
|
inline |
Set the callback to use inform to the DatabasePager whether a file is located on local or remote file system.
References _fileLocationCallback.
|
inline |
Set the Registry callback to use in place of the default findFile calls.
References _findFileCallback.
|
inline |
Set the KdTreeBuilder visitor that is used to build KdTree on loaded models.
References _kdTreeBuilder.
|
inline |
Set the library file path using a list of paths stored in a FilePath, which is used when search for data files.
References _libraryFilePath.
Referenced by osgDB::setLibraryFilePathList(), and osgDB::setLibraryFilePathList().
void osgDB::Registry::setLibraryFilePathList | ( | const std::string & | paths | ) |
Set the library file path using a single string delimited either with ';' (Windows) or ':' (All other platforms), which is used when search for data files.
|
inline |
Set the ObjectCache that is used to manage local storage of files downloaded from the internet.
References _objectCache.
|
inline |
Set the Registry callback to use in place of the default readFile calls.
References _readFileCallback.
|
inline |
Set the SharedStateManager.
References _sharedStateManager.
|
inline |
Set the Registry callback to use in place of the default writeFile calls.
References _writeFileCallback.
|
staticprotected |
void osgDB::Registry::updateTimeStampOfObjectsInCacheWithExternalReferences | ( | const osg::FrameStamp & | frameStamp | ) |
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.
This would typically be called once per frame by applications which are doing database paging, and need to prune objects that are no longer required. The time used is taken from the FrameStamp::getReferenceTime().
|
inline |
ReaderWriter::WriteResult osgDB::Registry::writeHeightFieldImplementation | ( | const osg::HeightField & | obj, |
const std::string & | fileName, | ||
const Options * | options ) |
Referenced by writeHeightField().
|
inline |
ReaderWriter::WriteResult osgDB::Registry::writeImageImplementation | ( | const osg::Image & | obj, |
const std::string & | fileName, | ||
const Options * | options ) |
Referenced by writeImage().
|
inline |
ReaderWriter::WriteResult osgDB::Registry::writeNodeImplementation | ( | const osg::Node & | node, |
const std::string & | fileName, | ||
const Options * | options ) |
Referenced by writeNode().
|
inline |
ReaderWriter::WriteResult osgDB::Registry::writeObjectImplementation | ( | const osg::Object & | obj, |
const std::string & | fileName, | ||
const Options * | options ) |
Referenced by writeObject().
|
inline |
ReaderWriter::WriteResult osgDB::Registry::writeScriptImplementation | ( | const osg::Script & | obj, |
const std::string & | fileName, | ||
const Options * | options ) |
Referenced by writeScript().
|
inline |
ReaderWriter::WriteResult osgDB::Registry::writeShaderImplementation | ( | const osg::Shader & | obj, |
const std::string & | fileName, | ||
const Options * | options ) |
Referenced by writeShader().
|
friend |
References AvailableArchiveIterator.
Referenced by AvailableArchiveIterator, and AvailableReaderWriterIterator.
|
friend |
References AvailableArchiveIterator, and AvailableReaderWriterIterator.
Referenced by AvailableReaderWriterIterator, and readImplementation().
|
friend |
References ReadArchiveFunctor.
Referenced by destruct(), and ReadArchiveFunctor.
|
friend |
|
friend |
References ReadHeightFieldFunctor.
Referenced by destruct(), and ReadHeightFieldFunctor.
|
friend |
References ReadImageFunctor.
Referenced by destruct(), and ReadImageFunctor.
|
friend |
References ReadNodeFunctor.
Referenced by destruct(), and ReadNodeFunctor.
|
friend |
References ReadObjectFunctor.
Referenced by destruct(), and ReadObjectFunctor.
|
friend |
References ReadScriptFunctor.
Referenced by destruct(), and ReadScriptFunctor.
|
friend |
References ReadShaderFunctor.
Referenced by destruct(), and ReadShaderFunctor.
|
protected |
|
protected |
|
protected |
Referenced by getArchiveExtensions().
|
protected |
Referenced by getAuthenticationMap(), getAuthenticationMap(), getOrCreateAuthenticationMap(), and setAuthenticationMap().
|
protected |
Referenced by _buildKdTreeIfRequired(), getBuildKdTreesHint(), and setBuildKdTreesHint().
|
protected |
Referenced by getCreateNodeFromImage(), and setCreateNodeFromImage().
|
protected |
Referenced by getDataFilePathList(), getDataFilePathList(), and setDataFilePathList().
|
protected |
Referenced by getDeprecatedDotOsgObjectWrapperManager().
|
protected |
|
protected |
Referenced by getExpiryDelay(), and setExpiryDelay().
|
protected |
|
protected |
Referenced by getFileCache(), getFileCache(), and setFileCache().
|
protected |
Referenced by getFileLocationCallback(), and setFileLocationCallback().
|
protected |
Referenced by findDataFile(), findLibraryFile(), getFindFileCallback(), getFindFileCallback(), and setFindFileCallback().
|
protected |
Referenced by getImageProcessorList(), and getImageProcessorList().
|
protected |
Referenced by _buildKdTreeIfRequired(), getKdTreeBuilder(), and setKdTreeBuilder().
|
protected |
Referenced by getLibraryFilePathList(), getLibraryFilePathList(), and setLibraryFilePathList().
|
protected |
Referenced by getMimeTypeExtensionMap(), and getMimeTypeExtensionMap().
|
protected |
Referenced by getObjectCache(), getObjectCache(), and setObjectCache().
|
protected |
Referenced by getObjectWrapperManager().
|
protected |
|
protected |
Referenced by getOptions(), getOptions(), and setOptions().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by getReaderWriterList(), and getReaderWriterList().
|
protected |
Referenced by getSharedStateManager(), and setSharedStateManager().
|
protected |
![]() | Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0. |