Assimp  v4.1. (December 2018)
Assimp::CIrrXML_IOStreamReader Class Reference

Utility class to make IrrXML work together with our custom IO system See the IrrXML docs for more details. More...

Inherits irr::io::IFileReadCallBack.

Public Member Functions

 CIrrXML_IOStreamReader (IOStream *_stream)
 Construction from an existing IOStream. More...
 
virtual int getSize ()
 Returns size of file in bytes. More...
 
virtual int read (void *buffer, int sizeToRead)
 Reads an amount of bytes from the file. More...
 
virtual ~CIrrXML_IOStreamReader ()
 Virtual destructor. More...
 

Detailed Description

Utility class to make IrrXML work together with our custom IO system See the IrrXML docs for more details.

Construct IrrXML-Reader in BaseImporter::InternReadFile():

// open the file
std::unique_ptr<IOStream> file( pIOHandler->Open( pFile));
if( file.get() == NULL) {
throw DeadlyImportError( "Failed to open file " + pFile + ".");
}
// generate a XML reader for it
std::unique_ptr<CIrrXML_IOStreamReader> mIOWrapper( new CIrrXML_IOStreamReader( file.get()));
mReader = irr::io::createIrrXMLReader( mIOWrapper.get());
if( !mReader) {
ThrowException( "xxxx: Unable to open file.");
}
CIrrXML_IOStreamReader(IOStream *_stream)
Construction from an existing IOStream.
Definition: irrXMLWrapper.h:83
std::runtime_error DeadlyImportError
Definition: glTFCommon.h:95
IrrXMLReader * createIrrXMLReader(const char *filename)
Creates an instance of an UFT-8 or ASCII character xml parser.
Definition: irrXML.cpp:88
file
Definition: materialgen.py:92

Constructor & Destructor Documentation

◆ CIrrXML_IOStreamReader()

Assimp::CIrrXML_IOStreamReader::CIrrXML_IOStreamReader ( IOStream _stream)
inlineexplicit

Construction from an existing IOStream.

◆ ~CIrrXML_IOStreamReader()

virtual Assimp::CIrrXML_IOStreamReader::~CIrrXML_IOStreamReader ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ getSize()

virtual int Assimp::CIrrXML_IOStreamReader::getSize ( )
inlinevirtual

Returns size of file in bytes.

◆ read()

virtual int Assimp::CIrrXML_IOStreamReader::read ( void *  buffer,
int  sizeToRead 
)
inlinevirtual

Reads an amount of bytes from the file.

Parameters
bufferPointer to output buffer.
sizeToReadAmount of bytes to read
Returns
Returns how much bytes were read.

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