class OSGDB_EXPORT osgDB::Registry

Registry is a singleton factory which stores the reader/writers which are linked in at runtime for reading non-native file formats.

Public Methods

[more] ~Registry()
[more]static Registry* instance()
[more]void readCommandLine(std::vector<std::string>& commandLine)
read the command line string list, removing any matched control sequences
[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]ReaderWriter::ReadResult readObject(const std::string& fileName)
[more]ReaderWriter::WriteResult writeObject(const osg::Object& obj, const std::string& fileName)
[more]ReaderWriter::ReadResult readImage(const std::string& fileName)
[more]ReaderWriter::WriteResult writeImage(const osg::Image& obj, const std::string& fileName)
[more]ReaderWriter::ReadResult readNode(const std::string& fileName)
[more]ReaderWriter::WriteResult writeNode(const osg::Node& node, const std::string& fileName)
[more]void setCreateNodeFromImage(bool flag)
[more]bool getCreateNodeFromImage() const
[more]void setOptions(ReaderWriter::Options* opt)
[more]ReaderWriter::Options* getOptions()
[more]const ReaderWriter::Options* getOptions() const


Documentation

Registry is a singleton factory which stores the reader/writers which are linked in at runtime for reading non-native file formats.

The RegisterDotOsgWrapperProxy can be used to automatically register DotOsgWrappers, at runtime with the Registry. A DotOsgWrapper encapsulates the functions that can read and write to the .osg for each osg::Object.

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

o ~Registry()

ostatic Registry* instance()

ovoid readCommandLine(std::vector<std::string>& commandLine)
read the command line string list, removing any matched control sequences

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)

oReaderWriter::ReadResult readObject(const std::string& fileName)

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

oReaderWriter::ReadResult readImage(const std::string& fileName)

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

oReaderWriter::ReadResult readNode(const std::string& fileName)

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

ovoid setCreateNodeFromImage(bool flag)

obool getCreateNodeFromImage() const

ovoid setOptions(ReaderWriter::Options* opt)

oReaderWriter::Options* getOptions()

oconst ReaderWriter::Options* getOptions() const


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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