OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgDB::InputStream Class Reference

#include <InputStream.h>

Collaboration diagram for osgDB::InputStream:
Collaboration graph
[legend]

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
 

Detailed Description

Definition at line 63 of file InputStream.h.

Member Typedef Documentation

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

Definition at line 66 of file InputStream.h.

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

Definition at line 67 of file InputStream.h.

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

Definition at line 212 of file InputStream.h.

Member Enumeration Documentation

Enumerator
READ_UNKNOWN 
READ_SCENE 
READ_IMAGE 
READ_OBJECT 

Definition at line 69 of file InputStream.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void osgDB::InputStream::advanceToCurrentEndBracket ( )
inline

Definition at line 154 of file InputStream.h.

void osgDB::InputStream::checkStream ( )
inlineprotected

Definition at line 234 of file InputStream.h.

Here is the call graph for this function:

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

Definition at line 195 of file InputStream.h.

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

Here is the caller graph for this function:

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

Definition at line 84 of file InputStream.h.

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

Definition at line 83 of file InputStream.h.

Here is the caller graph for this function:

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

Definition at line 153 of file InputStream.h.

Here is the caller graph for this function:

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

Definition at line 87 of file InputStream.h.

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

Definition at line 88 of file InputStream.h.

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

Definition at line 89 of file InputStream.h.

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

Definition at line 90 of file InputStream.h.

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

Definition at line 91 of file InputStream.h.

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

Definition at line 92 of file InputStream.h.

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

Definition at line 93 of file InputStream.h.

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

Definition at line 94 of file InputStream.h.

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

Definition at line 95 of file InputStream.h.

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

Definition at line 96 of file InputStream.h.

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

Definition at line 97 of file InputStream.h.

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

Definition at line 98 of file InputStream.h.

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

Definition at line 99 of file InputStream.h.

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

Definition at line 100 of file InputStream.h.

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

Definition at line 101 of file InputStream.h.

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

Definition at line 103 of file InputStream.h.

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

Definition at line 104 of file InputStream.h.

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

Definition at line 105 of file InputStream.h.

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::Image *&  img)
inline

Definition at line 140 of file InputStream.h.

Here is the call graph for this function:

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

Definition at line 141 of file InputStream.h.

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

Definition at line 142 of file InputStream.h.

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

Definition at line 143 of file InputStream.h.

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

Definition at line 145 of file InputStream.h.

Here is the call graph for this function:

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

Definition at line 146 of file InputStream.h.

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

Definition at line 147 of file InputStream.h.

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

Definition at line 149 of file InputStream.h.

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

Definition at line 156 of file InputStream.h.

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

Definition at line 157 of file InputStream.h.

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

osg::Object* osgDB::InputStream::readObjectFields ( const std::string &  className,
unsigned int  id,
osg::Object existingObj = 0 
)
template<typename T >
T* osgDB::InputStream::readObjectOfType ( )
inline

Definition at line 168 of file InputStream.h.

Here is the call graph for this function:

osg::PrimitiveSet* osgDB::InputStream::readPrimitiveSet ( )
void osgDB::InputStream::readSchema ( std::istream &  fin)
unsigned int osgDB::InputStream::readSize ( )
inline

Definition at line 160 of file InputStream.h.

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

Definition at line 155 of file InputStream.h.

Here is the caller graph for this function:

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

Definition at line 80 of file InputStream.h.

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

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

Definition at line 182 of file InputStream.h.

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

Definition at line 229 of file InputStream.h.

Here is the caller graph for this function:

Member Data Documentation

ArrayMap osgDB::InputStream::_arrayMap
protected

Definition at line 209 of file InputStream.h.

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

Definition at line 226 of file InputStream.h.

VersionMap osgDB::InputStream::_domainVersionMap
protected

Definition at line 213 of file InputStream.h.

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

Definition at line 223 of file InputStream.h.

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

Definition at line 219 of file InputStream.h.

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

Definition at line 217 of file InputStream.h.

int osgDB::InputStream::_fileVersion
protected

Definition at line 214 of file InputStream.h.

bool osgDB::InputStream::_forceReadingImage
protected

Definition at line 216 of file InputStream.h.

IdentifierMap osgDB::InputStream::_identifierMap
protected

Definition at line 210 of file InputStream.h.

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

Definition at line 218 of file InputStream.h.

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

Definition at line 220 of file InputStream.h.

bool osgDB::InputStream::_useSchemaData
protected

Definition at line 215 of file InputStream.h.

ObjectMark osgDB::InputStream::BEGIN_BRACKET

Definition at line 199 of file InputStream.h.

ObjectMark osgDB::InputStream::END_BRACKET

Definition at line 200 of file InputStream.h.

ObjectProperty osgDB::InputStream::PROPERTY

Definition at line 198 of file InputStream.h.


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