OpenSceneGraph  3.0.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
osgDB::InputStream Class Reference

List of all members.

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 ()
bool isBinary () const
int getFileVersion () 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::Vec4ub &v)
InputStreamoperator>> (osg::Vec2s &v)
InputStreamoperator>> (osg::Vec3s &v)
InputStreamoperator>> (osg::Vec4s &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::Array *&a)
InputStreamoperator>> (osg::Image *&img)
InputStreamoperator>> (osg::PrimitiveSet *&p)
InputStreamoperator>> (osg::Object *&obj)
InputStreamoperator>> (osg::ref_ptr< osg::Array > &ptr)
InputStreamoperator>> (osg::ref_ptr< osg::Image > &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)
unsigned int readSize ()
osg::ArrayreadArray ()
osg::PrimitiveSetreadPrimitiveSet ()
osg::ImagereadImage (bool readFromExternal=true)
osg::ObjectreadObject (osg::Object *existingObj=0)
osg::ObjectreadObjectFields (const std::string &className, osg::Object *existingObj=0)
void setInputIterator (InputIterator *ii)
 set an input iterator, used directly when not using InputStream with a traditional file releated stream.
ReadType start (InputIterator *)
 start reading from InputStream treating it as a traditional file releated stream, handles headers and versioning
void decompress ()
void readSchema (std::istream &fin)
void resetSchema ()
void throwException (const std::string &msg)
const InputExceptiongetException () const

Protected Member Functions

void checkStream ()
void setWrapperSchema (const std::string &name, const std::string &properties)
template<typename T >
void readArrayImplementation (T *a, int read_size, bool useByteSwap=false)

Protected Attributes

ArrayMap _arrayMap
IdentifierMap _identifierMap
int _fileVersion
int _byteSwap
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
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

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

References _in, and throwException().

void osgDB::InputStream::decompress ( )
const InputException* osgDB::InputStream::getException ( ) const
inline
int osgDB::InputStream::getFileVersion ( ) const
inline
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::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::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::Array *&  a)
inline
InputStream& osgDB::InputStream::operator>> ( osg::Image *&  img)
inline

References osg::readImage().

InputStream& osgDB::InputStream::operator>> ( osg::PrimitiveSet *&  p)
inline
InputStream& osgDB::InputStream::operator>> ( osg::Object *&  obj)
inline
InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::Array > &  ptr)
inline
InputStream& osgDB::InputStream::operator>> ( osg::ref_ptr< osg::Image > &  ptr)
inline

References osg::readImage().

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::Array* osgDB::InputStream::readArray ( )
template<typename T >
void osgDB::InputStream::readArrayImplementation ( T *  a,
int  read_size,
bool  useByteSwap = false 
)
protected
void osgDB::InputStream::readCharArray ( char *  s,
unsigned int  size 
)
inline
osg::Image* osgDB::InputStream::readImage ( bool  readFromExternal = true)
osg::Object* osgDB::InputStream::readObject ( osg::Object existingObj = 0)
osg::Object* osgDB::InputStream::readObjectFields ( const std::string &  className,
osg::Object existingObj = 0 
)
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::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

References _exception, and _fields.

Referenced by checkStream().


Member Data Documentation

ArrayMap osgDB::InputStream::_arrayMap
protected
int osgDB::InputStream::_byteSwap
protected
std::stringstream* osgDB::InputStream::_dataDecompress
protected
osg::ref_ptr<InputException> osgDB::InputStream::_exception
protected

Referenced by throwException().

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

Referenced by throwException().

int osgDB::InputStream::_fileVersion
protected
bool osgDB::InputStream::_forceReadingImage
protected
IdentifierMap osgDB::InputStream::_identifierMap
protected
osg::ref_ptr<InputIterator> osgDB::InputStream::_in
protected

Referenced by checkStream().

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

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

osg logo
Generated at Fri Nov 2 2012 21:39:43 for the OpenSceneGraph by doxygen 1.8.1.1.