OpenSceneGraph
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgDB::InputStream Class Reference
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)
 
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 >
TreadObjectOfType ()
 
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.
 
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
 

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
 

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