Assimp  v3.1.1 (June 2014)
irr::io::IFileReadCallBack Class Referenceabstract

Callback class for file read abstraction. More...

Inherited by Assimp::CIrrXML_IOStreamReader, and irr::io::CFileReadCallBack.

Public Member Functions

virtual int getSize ()=0
 Returns size of file in bytes. More...
 
virtual int read (void *buffer, int sizeToRead)=0
 Reads an amount of bytes from the file. More...
 
virtual ~IFileReadCallBack ()
 virtual destructor More...
 

Detailed Description

Callback class for file read abstraction.

With this, it is possible to make the xml parser read in other things than just files. The Irrlicht engine is using this for example to read xml from compressed .zip files. To make the parser read in any other data, derive a class from this interface, implement the two methods to read your data and give a pointer to an instance of your implementation when calling createIrrXMLReader(), createIrrXMLReaderUTF16() or createIrrXMLReaderUTF32()

Constructor & Destructor Documentation

◆ ~IFileReadCallBack()

virtual irr::io::IFileReadCallBack::~IFileReadCallBack ( )
inlinevirtual

Member Function Documentation

◆ getSize()

virtual int irr::io::IFileReadCallBack::getSize ( )
pure virtual

◆ read()

virtual int irr::io::IFileReadCallBack::read ( void *  buffer,
int  sizeToRead 
)
pure virtual

Reads an amount of bytes from the file.

Parameters
bufferPointer to buffer where to read bytes will be written to.
sizeToReadAmount of bytes to read from the file.
Returns
Returns how much bytes were read.

Implemented in Assimp::CIrrXML_IOStreamReader, and irr::io::CFileReadCallBack.

Examples:
/root/rpmbuild/BUILD/assimp-3.3.1/contrib/irrXML/irrXML.h.

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