class OSGDB_EXPORT osgDB::Registry

Registry is a singleton factory which stores the Objects types available at runtime for loading, and any Object reader or writers which are linked in at runtime for reading non-native file formats.

Public Methods

[more] ~Registry()
[more]static Registry* instance()
[more]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.
[more]void addDotOsgWrapper(DotOsgWrapper* wrapper)
[more]void removeDotOsgWrapper(DotOsgWrapper* wrapper)
[more]void addReaderWriter(ReaderWriter* rw)
[more]void removeReaderWriter(ReaderWriter* rw)
[more]std::string createLibraryNameForFile(const std::string& fileName)
create the platform specific library name associated with file
[more]std::string createLibraryNameForExt(const std::string& ext)
create the platform specific library name associated with file extension
[more]bool loadLibrary(const std::string& fileName)
find the library in the SG_LIBRARY_PATH and load it
[more]bool closeLibrary(const std::string& fileName)
close the attached library with specified name
[more]osg::Object* readObjectOfType(const osg::Object& compObj, Input& fr)
[more]osg::Object* readObject(Input& fr)
[more]osg::Image* readImage(Input& fr)
[more]osg::Drawable* readDrawable(Input& fr)
[more]osg::StateAttribute* readStateAttribute(Input& fr)
[more]osg::Node* readNode(Input& fr)
[more]bool writeObject(const osg::Object& obj, Output& fw)
[more]osg::Object* readObject(const std::string& fileName)
[more]bool writeObject(const osg::Object& obj, const std::string& fileName)
[more]osg::Image* readImage(const std::string& fileName)
[more]bool writeImage(const osg::Image& obj, const std::string& fileName)
[more]osg::Node* readNode(const std::string& fileName)
[more]bool writeNode(const osg::Node& node, const std::string& fileName)
[more]void setCreateNodeFromImage(bool flag)
[more]bool getCreateNodeFromImage() const


Documentation

Registry is a singleton factory which stores the Objects types available at runtime for loading, and any Object reader or writers which are linked in at runtime for reading non-native file formats.

The RegisterObjectProxy can be used to automatically register at runtime a Object with the Registry.

The RegisterReaderWriterProxy can be used to automatically register at runtime a reader/writer with the Registry.

o ~Registry()

ostatic Registry* instance()

ovoid 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. 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.

ovoid addDotOsgWrapper(DotOsgWrapper* wrapper)

ovoid removeDotOsgWrapper(DotOsgWrapper* wrapper)

ovoid addReaderWriter(ReaderWriter* rw)

ovoid removeReaderWriter(ReaderWriter* rw)

ostd::string createLibraryNameForFile(const std::string& fileName)
create the platform specific library name associated with file

ostd::string createLibraryNameForExt(const std::string& ext)
create the platform specific library name associated with file extension

obool loadLibrary(const std::string& fileName)
find the library in the SG_LIBRARY_PATH and load it

obool closeLibrary(const std::string& fileName)
close the attached library with specified name

oosg::Object* readObjectOfType(const osg::Object& compObj, Input& fr)

oosg::Object* readObject(Input& fr)

oosg::Image* readImage(Input& fr)

oosg::Drawable* readDrawable(Input& fr)

oosg::StateAttribute* readStateAttribute(Input& fr)

oosg::Node* readNode(Input& fr)

obool writeObject(const osg::Object& obj, Output& fw)

oosg::Object* readObject(const std::string& fileName)

obool writeObject(const osg::Object& obj, const std::string& fileName)

oosg::Image* readImage(const std::string& fileName)

obool writeImage(const osg::Image& obj, const std::string& fileName)

oosg::Node* readNode(const std::string& fileName)

obool writeNode(const osg::Node& node, const std::string& fileName)

ovoid setCreateNodeFromImage(bool flag)

obool getCreateNodeFromImage() const


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.