Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends

osgDB::Registry Class Reference

Inheritance diagram for osgDB::Registry:
osg::Referenced

List of all members.

Classes

class  ReadFileCallback
struct  ReadFunctor
class  WriteFileCallback

Public Types

enum  LoadStatus { NOT_LOADED = 0, PREVIOUSLY_LOADED, LOADED }
typedef std::vector
< osg::ref_ptr< ReaderWriter > > 
ReaderWriterList

Public Member Functions

void readCommandLine (osg::ArgumentParser &commandLine)
void addFileExtensionAlias (const std::string mapExt, const std::string toExt)
bool readPluginAliasConfigurationFile (const std::string &file)
void addDotOsgWrapper (DotOsgWrapper *wrapper)
void removeDotOsgWrapper (DotOsgWrapper *wrapper)
void addReaderWriter (ReaderWriter *rw)
void removeReaderWriter (ReaderWriter *rw)
std::string createLibraryNameForFile (const std::string &fileName)
std::string createLibraryNameForExtension (const std::string &ext)
std::string createLibraryNameForNodeKit (const std::string &name)
LoadStatus loadLibrary (const std::string &fileName)
bool closeLibrary (const std::string &fileName)
void closeAllLibraries ()
ReaderWriter * getReaderWriterForExtension (const std::string &ext)
ReaderWriterList & getReaderWriterList ()
const ReaderWriterList & getReaderWriterList () const
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)
osg::Shader * readShader (Input &fr)
bool writeObject (const osg::Object &obj, Output &fw)
void setReadFileCallback (ReadFileCallback *cb)
ReadFileCallback * getReadFileCallback ()
const ReadFileCallback * getReadFileCallback () const
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, bool buildKdTreeIfRequired=true)
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, bool buildKdTreeIfRequired=true)
ReaderWriter::ReadResult readNodeImplementation (const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::ReadResult readShader (const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::ReadResult readShaderImplementation (const std::string &fileName, const ReaderWriter::Options *options)
void setWriteFileCallback (WriteFileCallback *cb)
WriteFileCallback * getWriteFileCallback ()
const WriteFileCallback * getWriteFileCallback () const
ReaderWriter::WriteResult writeObject (const osg::Object &obj, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeObjectImplementation (const osg::Object &obj, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeImage (const osg::Image &obj, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeImageImplementation (const osg::Image &obj, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeHeightField (const osg::HeightField &obj, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeHeightFieldImplementation (const osg::HeightField &obj, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeNode (const osg::Node &node, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeNodeImplementation (const osg::Node &node, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeShader (const osg::Shader &obj, const std::string &fileName, const ReaderWriter::Options *options)
ReaderWriter::WriteResult writeShaderImplementation (const osg::Shader &obj, const std::string &fileName, const ReaderWriter::Options *options)
void _buildKdTreeIfRequired (ReaderWriter::ReadResult &result, const ReaderWriter::Options *options)
void setBuildKdTreesHint (ReaderWriter::Options::BuildKdTreesHint hint)
ReaderWriter::Options::BuildKdTreesHint getBuildKdTreesHint () const
void setKdTreeBuilder (osg::KdTreeBuilder *builder)
osg::KdTreeBuilder * getKdTreeBuilder ()
void setFileCache (FileCache *fileCache)
FileCache * getFileCache ()
const FileCache * getFileCache () const
void setAuthenticationMap (AuthenticationMap *authenticationMap)
AuthenticationMap * getAuthenticationMap ()
const AuthenticationMap * getAuthenticationMap () const
void setCreateNodeFromImage (bool flag)
bool getCreateNodeFromImage () const
void setOptions (ReaderWriter::Options *opt)
ReaderWriter::Options * getOptions ()
const ReaderWriter::Options * getOptions () const
void initFilePathLists ()
void initDataFilePathList ()
void setDataFilePathList (const FilePathList &filepath)
void setDataFilePathList (const std::string &paths)
FilePathList & getDataFilePathList ()
const FilePathList & getDataFilePathList () const
void initLibraryFilePathList ()
void setLibraryFilePathList (const FilePathList &filepath)
void setLibraryFilePathList (const std::string &paths)
FilePathList & getLibraryFilePathList ()
const FilePathList & getLibraryFilePathList () const
void updateTimeStampOfObjectsInCacheWithExternalReferences (const osg::FrameStamp &frameStamp)
void removeExpiredObjectsInCache (const osg::FrameStamp &frameStamp)
void setExpiryDelay (double expiryDelay)
double getExpiryDelay () const
void clearObjectCache ()
void addEntryToObjectCache (const std::string &filename, osg::Object *object, double timestamp=0.0)
osg::Object * getFromObjectCache (const std::string &fileName)
void addToArchiveCache (const std::string &fileName, osgDB::Archive *archive)
void removeFromArchiveCache (const std::string &fileName)
osgDB::Archive * getFromArchiveCache (const std::string &fileName)
void clearArchiveCache ()
void releaseGLObjects (osg::State *state=0)
DynamicLibrary * getLibrary (const std::string &fileName)
void setSharedStateManager (SharedStateManager *SharedStateManager)
SharedStateManager * getOrCreateSharedStateManager ()
SharedStateManager * getSharedStateManager ()
void addArchiveExtension (const std::string ext)

Static Public Member Functions

static Registry * instance (bool erase=false)

Protected Types

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::vector< std::string > ArchiveExtensionList
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 ()
DynamicLibraryList::iterator getLibraryItr (const std::string &fileName)
osg::Object * readObject (DotOsgWrapperMap &dowMap, Input &fr)
void eraseWrapper (DotOsgWrapperMap &wrappermap, DotOsgWrapper *wrapper)
void destruct ()
ReaderWriter::ReadResult read (const ReadFunctor &readFunctor)
ReaderWriter::ReadResult readImplementation (const ReadFunctor &readFunctor, bool useObjectCache)

Static Protected Member Functions

static std::string trim (const std::string &str)

Protected Attributes

ReaderWriter::Options::BuildKdTreesHint _buildKdTreesHint
osg::ref_ptr< osg::KdTreeBuilder > _kdTreeBuilder
osg::ref_ptr< FileCache > _fileCache
osg::ref_ptr< AuthenticationMap > _authenticationMap
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 _shaderWrapperMap
DotOsgWrapperMap _classNameWrapperMap
OpenThreads::ReentrantMutex _pluginMutex
ReaderWriterList _rwList
DynamicLibraryList _dlList
bool _openingLibrary
ExtensionAliasMap _extAliasMap
osg::ref_ptr
< ReaderWriter::Options > 
_options
FilePathList _dataFilePath
FilePathList _libraryFilePath
double _expiryDelay
ObjectCache _objectCache
OpenThreads::Mutex _objectCacheMutex
ArchiveCache _archiveCache
OpenThreads::Mutex _archiveCacheMutex
ArchiveExtensionList _archiveExtList
osg::ref_ptr< SharedStateManager > _sharedStateManager

Friends

struct ReadFunctor
struct ReadObjectFunctor
struct ReadImageFunctor
struct ReadHeightFieldFunctor
struct ReadNodeFunctor
struct ReadArchiveFunctor
struct ReadShaderFunctor
class AvailableReaderWriterIterator

Detailed Description

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.


Member Typedef Documentation

typedef std::map<std::string, osg::ref_ptr<osgDB::Archive> > osgDB::Registry::ArchiveCache [protected]
typedef std::vector< std::string> osgDB::Registry::ArchiveExtensionList [protected]
typedef std::map< std::string, osg::ref_ptr<DotOsgWrapper> > osgDB::Registry::DotOsgWrapperMap [protected]
typedef std::map< std::string, std::string> osgDB::Registry::ExtensionAliasMap [protected]
typedef std::map<std::string, ObjectTimeStampPair > osgDB::Registry::ObjectCache [protected]
typedef std::pair<osg::ref_ptr<osg::Object>, double > osgDB::Registry::ObjectTimeStampPair [protected]

Member Enumeration Documentation

Enumerator:
NOT_LOADED 
PREVIOUSLY_LOADED 
LOADED 

Constructor & Destructor Documentation

virtual osgDB::Registry::~Registry (  )  [protected, virtual]
osgDB::Registry::Registry (  )  [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


Member Function Documentation

void osgDB::Registry::addArchiveExtension ( const std::string  ext  ) 

Add an Archive extension.

void osgDB::Registry::addDotOsgWrapper ( DotOsgWrapper *  wrapper  ) 
void osgDB::Registry::addEntryToObjectCache ( const std::string &  filename,
osg::Object *  object,
double  timestamp = 0.0 
)

Add a filename,object,timestamp triple to the Registry::ObjectCache.

void osgDB::Registry::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.

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.

void osgDB::Registry::destruct (  )  [protected]
void osgDB::Registry::eraseWrapper ( DotOsgWrapperMap &  wrappermap,
DotOsgWrapper *  wrapper 
) [protected]
AuthenticationMap* osgDB::Registry::getAuthenticationMap (  )  [inline]

Get the password map to be used by plugins when access files from secure locations.

const AuthenticationMap* osgDB::Registry::getAuthenticationMap (  )  const [inline]

Get the password map to be used by plugins when access files from secure locations.

ReaderWriter::Options::BuildKdTreesHint osgDB::Registry::getBuildKdTreesHint (  )  const [inline]

Get whether the KdTrees should be built for geometry in the loader model.

bool osgDB::Registry::getCreateNodeFromImage (  )  const [inline]
FilePathList& osgDB::Registry::getDataFilePathList (  )  [inline]

get the data file path which is used when search for data files.

Referenced by osgDB::getDataFilePathList().

const FilePathList& osgDB::Registry::getDataFilePathList (  )  const [inline]

get the const data file path which is used when search for data files.

double osgDB::Registry::getExpiryDelay (  )  const [inline]
FileCache* osgDB::Registry::getFileCache (  )  [inline]

Get the FileCache that is used to manage local storage of files downloaded from the internet.

const FileCache* osgDB::Registry::getFileCache (  )  const [inline]

Get the const FileCache that is used to manage local storage of files downloaded from the internet.

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  ) 

Get an object from the object cache

osg::KdTreeBuilder* osgDB::Registry::getKdTreeBuilder (  )  [inline]

Get the KdTreeBuilder visitor that is used to build KdTree on loaded models.

DynamicLibrary* osgDB::Registry::getLibrary ( const std::string &  fileName  ) 

get the attached library with specified name.

const FilePathList& osgDB::Registry::getLibraryFilePathList (  )  const [inline]

get the const library file path which is used when search for library (dso/dll's) files.

FilePathList& osgDB::Registry::getLibraryFilePathList (  )  [inline]

get the library file path which is used when search for library (dso/dll's) files.

Referenced by osgDB::getLibraryFilePathList().

DynamicLibraryList::iterator osgDB::Registry::getLibraryItr ( const std::string &  fileName  )  [protected]

get the attached library with specified name.

ReaderWriter::Options* osgDB::Registry::getOptions (  )  [inline]
const ReaderWriter::Options* osgDB::Registry::getOptions (  )  const [inline]
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.

ReaderWriterList& osgDB::Registry::getReaderWriterList (  )  [inline]

get list of all registered ReaderWriters.

const ReaderWriterList& osgDB::Registry::getReaderWriterList (  )  const [inline]

get const list of all registered ReaderWriters.

ReadFileCallback* osgDB::Registry::getReadFileCallback (  )  [inline]

Get the readFile callback.

const ReadFileCallback* osgDB::Registry::getReadFileCallback (  )  const [inline]

Get the const readFile callback.

SharedStateManager* osgDB::Registry::getSharedStateManager (  )  [inline]

Get the SharedStateManager. Return 0 if no SharedStateManager has been assigned.

WriteFileCallback* osgDB::Registry::getWriteFileCallback (  )  [inline]

Get the writeFile callback.

const WriteFileCallback* osgDB::Registry::getWriteFileCallback (  )  const [inline]

Get the const writeFile callback.

void osgDB::Registry::initDataFilePathList (  ) 

initialize the Data FilePath by reading the OSG_FILE_PATH environmental variable.

void osgDB::Registry::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.

void osgDB::Registry::initLibraryFilePathList (  ) 

initialize the Library FilePath by reading the OSG_LIBRARY_PATH and the appropriate system environmental variables

LoadStatus osgDB::Registry::loadLibrary ( const std::string &  fileName  ) 

find the library in the OSG_LIBRARY_PATH and load it.

ReaderWriter::ReadResult osgDB::Registry::openArchive ( const std::string &  fileName,
ReaderWriter::ArchiveStatus  status,
unsigned int  indexBlockSizeHint,
const ReaderWriter::Options *  options 
) [inline]
ReaderWriter::ReadResult osgDB::Registry::openArchiveImplementation ( const std::string &  fileName,
ReaderWriter::ArchiveStatus  status,
unsigned int  indexBlockSizeHint,
const ReaderWriter::Options *  options 
)
ReaderWriter::ReadResult osgDB::Registry::read ( const ReadFunctor &  readFunctor  )  [protected]
void osgDB::Registry::readCommandLine ( osg::ArgumentParser &  commandLine  ) 

read the command line arguments.

Referenced by osgDB::readCommandLine().

osg::Drawable* osgDB::Registry::readDrawable ( Input &  fr  ) 
ReaderWriter::ReadResult osgDB::Registry::readHeightField ( const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
ReaderWriter::ReadResult osgDB::Registry::readHeightFieldImplementation ( const std::string &  fileName,
const ReaderWriter::Options *  options 
)
ReaderWriter::ReadResult osgDB::Registry::readImage ( const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
osg::Image* osgDB::Registry::readImage ( Input &  fr  ) 
ReaderWriter::ReadResult osgDB::Registry::readImageImplementation ( const std::string &  fileName,
const ReaderWriter::Options *  options 
)
ReaderWriter::ReadResult osgDB::Registry::readImplementation ( const ReadFunctor &  readFunctor,
bool  useObjectCache 
) [protected]
ReaderWriter::ReadResult osgDB::Registry::readNode ( const std::string &  fileName,
const ReaderWriter::Options *  options,
bool  buildKdTreeIfRequired = true 
) [inline]
osg::Node* osgDB::Registry::readNode ( Input &  fr  ) 
ReaderWriter::ReadResult osgDB::Registry::readNodeImplementation ( const std::string &  fileName,
const ReaderWriter::Options *  options 
)
ReaderWriter::ReadResult osgDB::Registry::readObject ( const std::string &  fileName,
const ReaderWriter::Options *  options,
bool  buildKdTreeIfRequired = true 
) [inline]
osg::Object* osgDB::Registry::readObject ( Input &  fr  ) 
osg::Object* osgDB::Registry::readObject ( DotOsgWrapperMap &  dowMap,
Input &  fr 
) [protected]
ReaderWriter::ReadResult osgDB::Registry::readObjectImplementation ( const std::string &  fileName,
const ReaderWriter::Options *  options 
)
osg::Object* osgDB::Registry::readObjectOfType ( const osg::Object &  compObj,
Input &  fr 
)
osg::Object* osgDB::Registry::readObjectOfType ( const basic_type_wrapper &  btw,
Input &  fr 
)
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.

ReaderWriter::ReadResult osgDB::Registry::readShader ( const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
osg::Shader* osgDB::Registry::readShader ( Input &  fr  ) 
ReaderWriter::ReadResult osgDB::Registry::readShaderImplementation ( const std::string &  fileName,
const ReaderWriter::Options *  options 
)
osg::StateAttribute* osgDB::Registry::readStateAttribute ( Input &  fr  ) 
osg::Uniform* osgDB::Registry::readUniform ( Input &  fr  ) 
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::removeDotOsgWrapper ( DotOsgWrapper *  wrapper  ) 
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::removeReaderWriter ( ReaderWriter *  rw  ) 
void osgDB::Registry::setAuthenticationMap ( AuthenticationMap *  authenticationMap  )  [inline]

Set the password map to be used by plugins when access files from secure locations.

void osgDB::Registry::setBuildKdTreesHint ( ReaderWriter::Options::BuildKdTreesHint  hint  )  [inline]

Set whether the KdTrees should be built for geometry in the loader model.

void osgDB::Registry::setCreateNodeFromImage ( bool  flag  )  [inline]
void osgDB::Registry::setDataFilePathList ( const FilePathList &  filepath  )  [inline]

Set the data file path using a list of paths stored in a FilePath, which is used when search for data files.

Referenced by 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.

void osgDB::Registry::setExpiryDelay ( double  expiryDelay  )  [inline]

set hint to viewer code calling removeExpiredObjectsInCache to specify how long it should give before expiring objects in Registry cache,

void osgDB::Registry::setFileCache ( FileCache *  fileCache  )  [inline]

Set the FileCache that is used to manage local storage of files downloaded from the internet.

void osgDB::Registry::setKdTreeBuilder ( osg::KdTreeBuilder *  builder  )  [inline]

Set the KdTreeBuilder visitor that is used to build KdTree on loaded models.

void osgDB::Registry::setLibraryFilePathList ( const FilePathList &  filepath  )  [inline]

Set the library file path using a list of paths stored in a FilePath, which is used when search for data files.

Referenced by 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.

void osgDB::Registry::setOptions ( ReaderWriter::Options *  opt  )  [inline]
void osgDB::Registry::setReadFileCallback ( ReadFileCallback *  cb  )  [inline]

Set the Registry callback to use in place of the default readFile calls.

void osgDB::Registry::setSharedStateManager ( SharedStateManager *  SharedStateManager  )  [inline]
void osgDB::Registry::setWriteFileCallback ( WriteFileCallback *  cb  )  [inline]

Set the Registry callback to use in place of the default writeFile calls.

static std::string osgDB::Registry::trim ( const std::string &  str  )  [static, protected]
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().

ReaderWriter::WriteResult osgDB::Registry::writeHeightField ( const osg::HeightField &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
ReaderWriter::WriteResult osgDB::Registry::writeHeightFieldImplementation ( const osg::HeightField &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
)
ReaderWriter::WriteResult osgDB::Registry::writeImage ( const osg::Image &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
ReaderWriter::WriteResult osgDB::Registry::writeImageImplementation ( const osg::Image &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
)
ReaderWriter::WriteResult osgDB::Registry::writeNode ( const osg::Node &  node,
const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
ReaderWriter::WriteResult osgDB::Registry::writeNodeImplementation ( const osg::Node &  node,
const std::string &  fileName,
const ReaderWriter::Options *  options 
)
bool osgDB::Registry::writeObject ( const osg::Object &  obj,
Output &  fw 
)
ReaderWriter::WriteResult osgDB::Registry::writeObject ( const osg::Object &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
ReaderWriter::WriteResult osgDB::Registry::writeObjectImplementation ( const osg::Object &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
)
ReaderWriter::WriteResult osgDB::Registry::writeShader ( const osg::Shader &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
) [inline]
ReaderWriter::WriteResult osgDB::Registry::writeShaderImplementation ( const osg::Shader &  obj,
const std::string &  fileName,
const ReaderWriter::Options *  options 
)

Friends And Related Function Documentation

friend class AvailableReaderWriterIterator [friend]
friend struct ReadArchiveFunctor [friend]
friend struct ReadFunctor [friend]
friend struct ReadHeightFieldFunctor [friend]
friend struct ReadImageFunctor [friend]
friend struct ReadNodeFunctor [friend]
friend struct ReadObjectFunctor [friend]
friend struct ReadShaderFunctor [friend]

Member Data Documentation

double osgDB::Registry::_expiryDelay [protected]

The documentation for this class was generated from the following file: