OpenSceneGraph  3.0.1
Public Types | Public Member Functions
osgDB::Archive Class Reference

Base class for implementing database Archives. More...

Inheritance diagram for osgDB::Archive:
Inheritance graph
[legend]

List of all members.

Public Types

typedef osgDB::DirectoryContents FileNameList

Public Member Functions

 Archive ()
virtual ~Archive ()
virtual const char * libraryName () const
 return the name of the object's library.
virtual const char * className () const
 return the name of the object's class type.
virtual bool acceptsExtension (const std::string &) const
 Return true if ReaderWriter accepts specified file extension.
virtual void close ()=0
 close the archive.
virtual std::string getArchiveFileName () const =0
 Get the file name which represents the archived file.
virtual std::string getMasterFileName () const =0
 Get the file name which represents the master file recorded in the Archive.
virtual bool fileExists (const std::string &filename) const =0
 return true if file exists in archive.
virtual FileType getFileType (const std::string &filename) const =0
 return type of file.
virtual bool getFileNames (FileNameList &fileNames) const =0
 Get the full list of file names available in the archive.
virtual DirectoryContents getDirectoryContents (const std::string &dirName) const
 return the contents of a directory.
virtual ReadResult readObject (const std::string &, const Options *=NULL) const =0
virtual ReadResult readImage (const std::string &, const Options *=NULL) const =0
virtual ReadResult readHeightField (const std::string &, const Options *=NULL) const =0
virtual ReadResult readNode (const std::string &, const Options *=NULL) const =0
virtual ReadResult readShader (const std::string &, const Options *=NULL) const =0
virtual WriteResult writeObject (const osg::Object &, const std::string &, const Options *=NULL) const =0
virtual WriteResult writeImage (const osg::Image &, const std::string &, const Options *=NULL) const =0
virtual WriteResult writeHeightField (const osg::HeightField &, const std::string &, const Options *=NULL) const =0
virtual WriteResult writeNode (const osg::Node &, const std::string &, const Options *=NULL) const =0
virtual WriteResult writeShader (const osg::Shader &, const std::string &, const Options *=NULL) const =0

Detailed Description

Base class for implementing database Archives.

See src/osgPlugins/osga for an example of a concrete implementation.


Member Typedef Documentation


Constructor & Destructor Documentation

osgDB::Archive::Archive ( )
virtual osgDB::Archive::~Archive ( ) [virtual]

Member Function Documentation

virtual bool osgDB::Archive::acceptsExtension ( const std::string &  ) const [inline, virtual]

Return true if ReaderWriter accepts specified file extension.

Reimplemented from osgDB::ReaderWriter.

virtual const char* osgDB::Archive::className ( ) const [inline, virtual]

return the name of the object's class type.

Must be defined by derived classes.

Implements osg::Object.

virtual void osgDB::Archive::close ( ) [pure virtual]

close the archive.

virtual bool osgDB::Archive::fileExists ( const std::string &  filename) const [pure virtual]

return true if file exists in archive.

virtual std::string osgDB::Archive::getArchiveFileName ( ) const [pure virtual]

Get the file name which represents the archived file.

virtual DirectoryContents osgDB::Archive::getDirectoryContents ( const std::string &  dirName) const [virtual]

return the contents of a directory.

returns an empty array on any error.

virtual bool osgDB::Archive::getFileNames ( FileNameList fileNames) const [pure virtual]

Get the full list of file names available in the archive.

virtual FileType osgDB::Archive::getFileType ( const std::string &  filename) const [pure virtual]

return type of file.

virtual std::string osgDB::Archive::getMasterFileName ( ) const [pure virtual]

Get the file name which represents the master file recorded in the Archive.

virtual const char* osgDB::Archive::libraryName ( ) const [inline, virtual]

return the name of the object's library.

Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Implements osg::Object.

virtual ReadResult osgDB::Archive::readHeightField ( const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual ReadResult osgDB::Archive::readImage ( const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual ReadResult osgDB::Archive::readNode ( const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual ReadResult osgDB::Archive::readObject ( const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual ReadResult osgDB::Archive::readShader ( const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual WriteResult osgDB::Archive::writeHeightField ( const osg::HeightField ,
const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual WriteResult osgDB::Archive::writeImage ( const osg::Image ,
const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual WriteResult osgDB::Archive::writeNode ( const osg::Node ,
const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual WriteResult osgDB::Archive::writeObject ( const osg::Object ,
const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.

virtual WriteResult osgDB::Archive::writeShader ( const osg::Shader ,
const std::string &  ,
const Options = NULL 
) const [pure virtual]

Reimplemented from osgDB::ReaderWriter.


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

osg logo
Generated at Mon Oct 3 2011 12:39:46 for the OpenSceneGraph by doxygen 1.7.5.