OpenSceneGraph  3.5.1
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgDB::InputStream Class Reference

Public Types

enum  ReadType { READ_UNKNOWN = 0, READ_SCENE, READ_IMAGE, READ_OBJECT }
 
typedef std::map< unsigned int, osg::ref_ptr< osg::Array > > ArrayMap
 
typedef std::map< unsigned int, osg::ref_ptr< osg::Object > > IdentifierMap
 

Public Member Functions

 InputStream (const osgDB::Options *options)
 
virtual ~InputStream ()
 
void setFileVersion (const std::string &d, int v)
 
int getFileVersion (const std::string &d=std::string()) const
 
bool isBinary () const
 
const osgDB::OptionsgetOptions () const
 
InputStreamoperator>> (bool &b)
 
InputStreamoperator>> (char &c)
 
InputStreamoperator>> (signed char &c)
 
InputStreamoperator>> (unsigned char &c)
 
InputStreamoperator>> (short &s)
 
InputStreamoperator>> (unsigned short &s)
 
InputStreamoperator>> (int &i)
 
InputStreamoperator>> (unsigned int &i)
 
InputStreamoperator>> (long &l)
 
InputStreamoperator>> (unsigned long &l)
 
InputStreamoperator>> (float &f)
 
InputStreamoperator>> (double &d)
 
InputStreamoperator>> (std::string &s)
 
InputStreamoperator>> (std::istream &(*fn)(std::istream &))
 
InputStreamoperator>> (std::ios_base &(*fn)(std::ios_base &))
 
InputStreamoperator>> (ObjectGLenum &value)
 
InputStreamoperator>> (ObjectProperty &prop)
 
InputStreamoperator>> (ObjectMark &mark)
 
InputStreamoperator>> (osg::Vec2b &v)
 
InputStreamoperator>> (osg::Vec3b &v)
 
InputStreamoperator>> (osg::Vec4b &v)
 
InputStreamoperator>> (osg::Vec2ub &v)
 
InputStreamoperator>> (osg::Vec3ub &v)
 
InputStreamoperator>> (osg::Vec4ub &v)
 
InputStreamoperator>> (osg::Vec2s &v)
 
InputStreamoperator>> (osg::Vec3s &v)
 
InputStreamoperator>> (osg::Vec4s &v)
 
InputStreamoperator>> (osg::Vec2us &v)
 
InputStreamoperator>> (osg::Vec3us &v)
 
InputStreamoperator>> (osg::Vec4us &v)
 
InputStreamoperator>> (osg::Vec2i &v)
 
InputStreamoperator>> (osg::Vec3i &v)
 
InputStreamoperator>> (osg::Vec4i &v)
 
InputStreamoperator>> (osg::Vec2ui &v)
 
InputStreamoperator>> (osg::Vec3ui &v)
 
InputStreamoperator>> (osg::Vec4ui &v)
 
InputStreamoperator>> (osg::Vec2f &v)
 
InputStreamoperator>> (osg::Vec3f &v)
 
InputStreamoperator>> (osg::Vec4f &v)
 
InputStreamoperator>> (osg::Vec2d &v)
 
InputStreamoperator>> (osg::Vec3d &v)
 
InputStreamoperator>> (osg::Vec4d &v)
 
InputStreamoperator>> (osg::Quat &q)
 
InputStreamoperator>> (osg::Plane &p)
 
InputStreamoperator>> (osg::Matrixf &mat)
 
InputStreamoperator>> (osg::Matrixd &mat)
 
InputStreamoperator>> (osg::BoundingBoxf &bb)
 
InputStreamoperator>> (osg::BoundingBoxd &bb)
 
InputStreamoperator>> (osg::BoundingSpheref &bs)
 
InputStreamoperator>> (osg::BoundingSphered &bs)
 
InputStreamoperator>> (osg::ref_ptr< osg::Image > &ptr)
 
InputStreamoperator>> (osg::ref_ptr< osg::Array > &ptr)
 
InputStreamoperator>> (osg::ref_ptr< osg::PrimitiveSet > &ptr)
 
template<typename T >
InputStreamoperator>> (osg::ref_ptr< T > &ptr)
 
bool matchString (const std::string &str)
 
void advanceToCurrentEndBracket ()
 
void readWrappedString (std::string &str)
 
void readCharArray (char *s, unsigned int size)
 
void readComponentArray (char *s, unsigned int numElements, unsigned int numComponentsPerElements, unsigned int componentSizeInBytes)
 
unsigned int readSize ()
 
osg::ref_ptr< osg::ArrayreadArray ()
 
osg::ref_ptr< osg::PrimitiveSetreadPrimitiveSet ()
 
osg::ref_ptr< osg::ImagereadImage (bool readFromExternal=true)
 
template<typename T >
osg::ref_ptr< T > readObjectOfType ()
 
osg::ref_ptr< osg::ObjectreadObject (osg::Object *existingObj=0)
 
osg::ref_ptr< osg::ObjectreadObjectFields (const std::string &className, unsigned int id, osg::Object *existingObj=0)
 
template<typename T >
osg::ref_ptr< T > readObjectFieldsOfType (const std::string &className, unsigned int id, osg::Object *existingObj=0)
 
void setInputIterator (InputIterator *ii)
 set an input iterator, used directly when not using InputStream with a traditional file releated stream. More...
 
ReadType start (InputIterator *)
 start reading from InputStream treating it as a traditional file releated stream, handles headers and versioning More...
 
void decompress ()
 
void readSchema (std::istream &fin)
 
void resetSchema ()
 
void throwException (const std::string &msg)
 
const InputExceptiongetException () const
 

Public Attributes

ObjectProperty PROPERTY
 
ObjectMark BEGIN_BRACKET
 
ObjectMark END_BRACKET
 

Protected Types

typedef std::map< std::string, int > VersionMap
 

Protected Member Functions

void checkStream ()
 
void setWrapperSchema (const std::string &name, const std::string &properties)
 
template<typename T >
void readArrayImplementation (T *a, unsigned int numComponentsPerElements, unsigned int componentSizeInBytes)
 

Protected Attributes

ArrayMap _arrayMap
 
IdentifierMap _identifierMap
 
VersionMap _domainVersionMap
 
int _fileVersion
 
bool _useSchemaData
 
bool _forceReadingImage
 
std::vector< std::string > _fields
 
osg::ref_ptr< InputIterator_in
 
osg::ref_ptr< InputException_exception
 
osg::ref_ptr< const osgDB::Options_options
 
osg::ref_ptr< osg::Object_dummyReadObject
 
std::stringstream * _dataDecompress
 

Member Typedef Documentation

typedef std::map< unsigned int, osg::ref_ptr<osg::Array> > osgDB::InputStream::ArrayMap
typedef std::map< unsigned int, osg::ref_ptr<osg::Object> > osgDB::InputStream::IdentifierMap
typedef std::map<std::string, int> osgDB::InputStream::VersionMap
protected

Member Enumeration Documentation

Enumerator
READ_UNKNOWN 
READ_SCENE 
READ_IMAGE 
READ_OBJECT 

Constructor & Destructor Documentation

osgDB::InputStream::InputStream ( const osgDB::Options options)
virtual osgDB::InputStream::~InputStream ( )
virtual

Member Function Documentation

void osgDB::InputStream::advanceToCurrentEndBracket ( )
inline
void osgDB::InputStream::checkStream ( )
inlineprotected
void osgDB::InputStream::decompress ( )
const InputException* osgDB::InputStream::getException ( ) const
inline
int osgDB::InputStream::getFileVersion ( const std::string &  d = std::string()) const
const osgDB::Options* osgDB::InputStream::getOptions ( ) const
inline
bool osgDB::InputStream::isBinary ( ) const
inline
bool osgDB::InputStream::matchString ( const std::string &  str)
inline
InputStream& osgDB::InputStream::operator>> ( bool &  b)
inline
InputStream& osgDB::InputStream::operator>> ( char &  c)
inline
InputStream& osgDB::InputStream::operator>> ( signed char &  c)
inline
InputStream& osgDB::InputStream::operator>> ( unsigned char &  c)
inline
InputStream& osgDB::InputStream::operator>> ( short &  s)
inline
InputStream& osgDB::InputStream::operator>> ( unsigned short &  s)
inline
InputStream& osgDB::InputStream::operator>> ( int &  i)
inline
InputStream& osgDB::InputStream::operator>> ( unsigned int &  i)
inline
InputStream& osgDB::InputStream::operator>> ( long &  l)
inline
InputStream& osgDB::InputStream::operator>> ( unsigned long &  l)
inline
InputStream& osgDB::InputStream::operator>> ( float &  f)
inline
InputStream& osgDB::InputStream::operator>> ( double &  d)
inline
InputStream& osgDB::InputStream::operator>> ( std::string &  s)
inline
InputStream& osgDB::InputStream::operator>> ( std::istream &(*)(std::istream &)  fn)
inline
InputStream& osgDB::InputStream::operator>> ( std::ios_base &(*)(std::ios_base &)  fn)
inline
InputStream& osgDB::InputStream::operator>> ( ObjectGLenum value)
inline
InputStream& osgDB::InputStream::operator>> ( ObjectProperty prop)
inline
InputStream& osgDB::InputStream::operator>> ( ObjectMark mark)
inline
InputStream& osgDB::InputStream::operator>> ( osg::Vec2b v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3b v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4b v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec2ub v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3ub v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4ub v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec2s v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3s v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4s v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec2us v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3us v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4us v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec2i v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3i v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4i v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec2ui v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3ui v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4ui v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec2f v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3f v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4f v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec2d v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec3d v)
InputStream& osgDB::InputStream::operator>> ( osg::Vec4d v)
InputStream& osgDB::InputStream::operator>> ( osg::Quat q)
InputStream& osgDB::InputStream::operator>> ( osg::Plane p)
InputStream& osgDB::InputStream::operator>> ( osg::Matrixf mat)
InputStream& osgDB::InputStream::operator>> ( osg::Matrixd mat)
InputStream& osgDB::InputStream::operator>> ( osg::BoundingBoxf bb)
InputStream& osgDB::InputStream::operator>> ( osg::BoundingBoxd bb)
InputStream& osgDB::InputStream::operator>> ( osg::BoundingSpheref bs)
InputStream& osgDB::InputStream::operator>> ( osg::BoundingSphered bs)
InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::Image > &  ptr)
inline
InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::Array > &  ptr)
inline
InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::PrimitiveSet > &  ptr)
inline
template<typename T >
InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< T > &  ptr)
inline
osg::ref_ptr<osg::Array> osgDB::InputStream::readArray ( )
template<typename T >
void osgDB::InputStream::readArrayImplementation ( T *  a,
unsigned int  numComponentsPerElements,
unsigned int  componentSizeInBytes 
)
protected
void osgDB::InputStream::readCharArray ( char *  s,
unsigned int  size 
)
inline
void osgDB::InputStream::readComponentArray ( char *  s,
unsigned int  numElements,
unsigned int  numComponentsPerElements,
unsigned int  componentSizeInBytes 
)
inline
osg::ref_ptr<osg::Image> osgDB::InputStream::readImage ( bool  readFromExternal = true)
osg::ref_ptr<osg::Object> osgDB::InputStream::readObject ( osg::Object existingObj = 0)
osg::ref_ptr<osg::Object> osgDB::InputStream::readObjectFields ( const std::string &  className,
unsigned int  id,
osg::Object existingObj = 0 
)
template<typename T >
osg::ref_ptr<T> osgDB::InputStream::readObjectFieldsOfType ( const std::string &  className,
unsigned int  id,
osg::Object existingObj = 0 
)
inline
template<typename T >
osg::ref_ptr<T> osgDB::InputStream::readObjectOfType ( )
inline
osg::ref_ptr<osg::PrimitiveSet> osgDB::InputStream::readPrimitiveSet ( )
void osgDB::InputStream::readSchema ( std::istream &  fin)
unsigned int osgDB::InputStream::readSize ( )
inline
void osgDB::InputStream::readWrappedString ( std::string &  str)
inline
void osgDB::InputStream::resetSchema ( )
void osgDB::InputStream::setFileVersion ( const std::string &  d,
int  v 
)
inline
void osgDB::InputStream::setInputIterator ( InputIterator ii)
inline

set an input iterator, used directly when not using InputStream with a traditional file releated stream.

void osgDB::InputStream::setWrapperSchema ( const std::string &  name,
const std::string &  properties 
)
protected
ReadType osgDB::InputStream::start ( InputIterator )

start reading from InputStream treating it as a traditional file releated stream, handles headers and versioning

void osgDB::InputStream::throwException ( const std::string &  msg)
inline

Member Data Documentation

ArrayMap osgDB::InputStream::_arrayMap
protected
std::stringstream* osgDB::InputStream::_dataDecompress
protected
VersionMap osgDB::InputStream::_domainVersionMap
protected
osg::ref_ptr<osg::Object> osgDB::InputStream::_dummyReadObject
protected
osg::ref_ptr<InputException> osgDB::InputStream::_exception
protected
std::vector<std::string> osgDB::InputStream::_fields
protected
int osgDB::InputStream::_fileVersion
protected
bool osgDB::InputStream::_forceReadingImage
protected
IdentifierMap osgDB::InputStream::_identifierMap
protected
osg::ref_ptr<InputIterator> osgDB::InputStream::_in
protected
osg::ref_ptr<const osgDB::Options> osgDB::InputStream::_options
protected
bool osgDB::InputStream::_useSchemaData
protected
ObjectMark osgDB::InputStream::BEGIN_BRACKET
ObjectMark osgDB::InputStream::END_BRACKET
ObjectProperty osgDB::InputStream::PROPERTY

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

osg logo
Generated at Wed Nov 11 2015 22:14:54 for the OpenSceneGraph by doxygen 1.8.10.