openscenegraph
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::Image *&img)
 
InputStreamoperator>> (osg::Array *&a)
 
InputStreamoperator>> (osg::PrimitiveSet *&p)
 
InputStreamoperator>> (osg::Object *&obj)
 
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::ArrayreadArray ()
 
osg::PrimitiveSetreadPrimitiveSet ()
 
osg::ImagereadImage (bool readFromExternal=true)
 
template<typename T >
T * readObjectOfType ()
 
osg::ObjectreadObject (osg::Object *existingObj=0)
 
osg::ObjectreadObjectFields (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

§ ArrayMap

typedef std::map< unsigned int, osg::ref_ptr<osg::Array> > osgDB::InputStream::ArrayMap

§ IdentifierMap

typedef std::map< unsigned int, osg::ref_ptr<osg::Object> > osgDB::InputStream::IdentifierMap

§ VersionMap

typedef std::map<std::string, int> osgDB::InputStream::VersionMap
protected

Member Enumeration Documentation

§ ReadType

Enumerator
READ_UNKNOWN 
READ_SCENE 
READ_IMAGE 
READ_OBJECT 

Constructor & Destructor Documentation

§ InputStream()

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

§ ~InputStream()

virtual osgDB::InputStream::~InputStream ( )
virtual

Member Function Documentation

§ advanceToCurrentEndBracket()

void osgDB::InputStream::advanceToCurrentEndBracket ( )
inline

§ checkStream()

void osgDB::InputStream::checkStream ( )
inlineprotected

§ decompress()

void osgDB::InputStream::decompress ( )

§ getException()

const InputException* osgDB::InputStream::getException ( ) const
inline

§ getFileVersion()

int osgDB::InputStream::getFileVersion ( const std::string &  d = std::string()) const

§ getOptions()

const osgDB::Options* osgDB::InputStream::getOptions ( ) const
inline

§ isBinary()

bool osgDB::InputStream::isBinary ( ) const
inline

§ matchString()

bool osgDB::InputStream::matchString ( const std::string &  str)
inline

§ operator>>() [1/58]

InputStream& osgDB::InputStream::operator>> ( bool &  b)
inline

§ operator>>() [2/58]

InputStream& osgDB::InputStream::operator>> ( char &  c)
inline

§ operator>>() [3/58]

InputStream& osgDB::InputStream::operator>> ( signed char &  c)
inline

§ operator>>() [4/58]

InputStream& osgDB::InputStream::operator>> ( unsigned char &  c)
inline

§ operator>>() [5/58]

InputStream& osgDB::InputStream::operator>> ( short &  s)
inline

§ operator>>() [6/58]

InputStream& osgDB::InputStream::operator>> ( unsigned short &  s)
inline

§ operator>>() [7/58]

InputStream& osgDB::InputStream::operator>> ( int &  i)
inline

§ operator>>() [8/58]

InputStream& osgDB::InputStream::operator>> ( unsigned int &  i)
inline

§ operator>>() [9/58]

InputStream& osgDB::InputStream::operator>> ( long &  l)
inline

§ operator>>() [10/58]

InputStream& osgDB::InputStream::operator>> ( unsigned long &  l)
inline

§ operator>>() [11/58]

InputStream& osgDB::InputStream::operator>> ( float &  f)
inline

§ operator>>() [12/58]

InputStream& osgDB::InputStream::operator>> ( double &  d)
inline

§ operator>>() [13/58]

InputStream& osgDB::InputStream::operator>> ( std::string &  s)
inline

§ operator>>() [14/58]

InputStream& osgDB::InputStream::operator>> ( std::istream &(*)(std::istream &)  fn)
inline

§ operator>>() [15/58]

InputStream& osgDB::InputStream::operator>> ( std::ios_base &(*)(std::ios_base &)  fn)
inline

§ operator>>() [16/58]

InputStream& osgDB::InputStream::operator>> ( ObjectGLenum value)
inline

§ operator>>() [17/58]

InputStream& osgDB::InputStream::operator>> ( ObjectProperty prop)
inline

§ operator>>() [18/58]

InputStream& osgDB::InputStream::operator>> ( ObjectMark mark)
inline

§ operator>>() [19/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2b v)

§ operator>>() [20/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3b v)

§ operator>>() [21/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4b v)

§ operator>>() [22/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2ub v)

§ operator>>() [23/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3ub v)

§ operator>>() [24/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4ub v)

§ operator>>() [25/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2s v)

§ operator>>() [26/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3s v)

§ operator>>() [27/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4s v)

§ operator>>() [28/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2us v)

§ operator>>() [29/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3us v)

§ operator>>() [30/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4us v)

§ operator>>() [31/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2i v)

§ operator>>() [32/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3i v)

§ operator>>() [33/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4i v)

§ operator>>() [34/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2ui v)

§ operator>>() [35/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3ui v)

§ operator>>() [36/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4ui v)

§ operator>>() [37/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2f v)

§ operator>>() [38/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3f v)

§ operator>>() [39/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4f v)

§ operator>>() [40/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec2d v)

§ operator>>() [41/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec3d v)

§ operator>>() [42/58]

InputStream& osgDB::InputStream::operator>> ( osg::Vec4d v)

§ operator>>() [43/58]

InputStream& osgDB::InputStream::operator>> ( osg::Quat q)

§ operator>>() [44/58]

InputStream& osgDB::InputStream::operator>> ( osg::Plane p)

§ operator>>() [45/58]

InputStream& osgDB::InputStream::operator>> ( osg::Matrixf mat)

§ operator>>() [46/58]

InputStream& osgDB::InputStream::operator>> ( osg::Matrixd mat)

§ operator>>() [47/58]

InputStream& osgDB::InputStream::operator>> ( osg::BoundingBoxf bb)

§ operator>>() [48/58]

InputStream& osgDB::InputStream::operator>> ( osg::BoundingBoxd bb)

§ operator>>() [49/58]

InputStream& osgDB::InputStream::operator>> ( osg::BoundingSpheref bs)

§ operator>>() [50/58]

InputStream& osgDB::InputStream::operator>> ( osg::BoundingSphered bs)

§ operator>>() [51/58]

InputStream& osgDB::InputStream::operator>> ( osg::Image *&  img)
inline

§ operator>>() [52/58]

InputStream& osgDB::InputStream::operator>> ( osg::Array *&  a)
inline

§ operator>>() [53/58]

InputStream& osgDB::InputStream::operator>> ( osg::PrimitiveSet *&  p)
inline

§ operator>>() [54/58]

InputStream& osgDB::InputStream::operator>> ( osg::Object *&  obj)
inline

§ operator>>() [55/58]

InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::Image > &  ptr)
inline

§ operator>>() [56/58]

InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::Array > &  ptr)
inline

§ operator>>() [57/58]

InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::PrimitiveSet > &  ptr)
inline

§ operator>>() [58/58]

template<typename T >
InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< T > &  ptr)
inline

§ readArray()

osg::Array* osgDB::InputStream::readArray ( )

§ readArrayImplementation()

template<typename T >
void osgDB::InputStream::readArrayImplementation ( T *  a,
unsigned int  numComponentsPerElements,
unsigned int  componentSizeInBytes 
)
protected

§ readCharArray()

void osgDB::InputStream::readCharArray ( char *  s,
unsigned int  size 
)
inline

§ readComponentArray()

void osgDB::InputStream::readComponentArray ( char *  s,
unsigned int  numElements,
unsigned int  numComponentsPerElements,
unsigned int  componentSizeInBytes 
)
inline

§ readImage()

osg::Image* osgDB::InputStream::readImage ( bool  readFromExternal = true)

§ readObject()

osg::Object* osgDB::InputStream::readObject ( osg::Object existingObj = 0)

§ readObjectFields()

osg::Object* osgDB::InputStream::readObjectFields ( const std::string &  className,
unsigned int  id,
osg::Object existingObj = 0 
)

§ readObjectOfType()

template<typename T >
T* osgDB::InputStream::readObjectOfType ( )
inline

§ readPrimitiveSet()

osg::PrimitiveSet* osgDB::InputStream::readPrimitiveSet ( )

§ readSchema()

void osgDB::InputStream::readSchema ( std::istream &  fin)

§ readSize()

unsigned int osgDB::InputStream::readSize ( )
inline

§ readWrappedString()

void osgDB::InputStream::readWrappedString ( std::string &  str)
inline

§ resetSchema()

void osgDB::InputStream::resetSchema ( )

§ setFileVersion()

void osgDB::InputStream::setFileVersion ( const std::string &  d,
int  v 
)
inline

§ setInputIterator()

void osgDB::InputStream::setInputIterator ( InputIterator ii)
inline

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

§ setWrapperSchema()

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

§ start()

ReadType osgDB::InputStream::start ( InputIterator )

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

§ throwException()

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

Member Data Documentation

§ _arrayMap

ArrayMap osgDB::InputStream::_arrayMap
protected

§ _dataDecompress

std::stringstream* osgDB::InputStream::_dataDecompress
protected

§ _domainVersionMap

VersionMap osgDB::InputStream::_domainVersionMap
protected

§ _dummyReadObject

osg::ref_ptr<osg::Object> osgDB::InputStream::_dummyReadObject
protected

§ _exception

osg::ref_ptr<InputException> osgDB::InputStream::_exception
protected

§ _fields

std::vector<std::string> osgDB::InputStream::_fields
protected

§ _fileVersion

int osgDB::InputStream::_fileVersion
protected

§ _forceReadingImage

bool osgDB::InputStream::_forceReadingImage
protected

§ _identifierMap

IdentifierMap osgDB::InputStream::_identifierMap
protected

§ _in

osg::ref_ptr<InputIterator> osgDB::InputStream::_in
protected

§ _options

osg::ref_ptr<const osgDB::Options> osgDB::InputStream::_options
protected

§ _useSchemaData

bool osgDB::InputStream::_useSchemaData
protected

§ BEGIN_BRACKET

ObjectMark osgDB::InputStream::BEGIN_BRACKET

§ END_BRACKET

ObjectMark osgDB::InputStream::END_BRACKET

§ PROPERTY

ObjectProperty osgDB::InputStream::PROPERTY

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