Irrlicht Engine: irr::io::IFileReadCallBack Class Reference

Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# irr::io::IFileReadCallBack Class Reference

Callback class for file read abstraction. More...

`#include <irrXML.h>`

List of all members.

## Public Member Functions
virtual long | getSize () const =0
| Returns size of file in bytes.
virtual int | read (void *buffer, int sizeToRead)=0
| Reads an amount of bytes from the file.
virtual | ~IFileReadCallBack ()
| Destructor.

## 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()

Definition at line 213 of file irrXML.h.

## Constructor & Destructor Documentation

virtual irr::io::IFileReadCallBack::~IFileReadCallBack | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 218 of file irrXML.h.

## Member Function Documentation

virtual long irr::io::IFileReadCallBack::getSize | ( |  | ) | const`[pure virtual]`

Returns size of file in bytes.

virtual int irr::io::IFileReadCallBack::read | ( | void * | buffer,
|  | int | sizeToRead |
| ) |  |  | `[pure virtual]`

Reads an amount of bytes from the file.

Parameters:

  | buffer,: | Pointer to buffer where to read bytes will be written to.
  | sizeToRead,: | Amount of bytes to read from the file.

Returns:
  Returns how much bytes were read.

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

- irrXML.h

| The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Sun Oct 24 12:42:06 2010 by Doxygen (1.6.2)