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...
 
- Public Member Functions inherited from irr::io::IFileReadCallBack
virtual ~IFileReadCallBack ()
 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.");
}

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.

Implements irr::io::IFileReadCallBack.

◆ 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.

Implements irr::io::IFileReadCallBack.


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