Loading...
Searching...
No Matches
irr::io::IReadFile Class Referenceabstract

Interface providing read acess to a file. More...

`#include <IReadFile.h>`

Inheritance diagram for irr::io::IReadFile:

## Public Member Functions

virtual const io::path & | getFileName () const =0
| Get name of file.
virtual long | getPos () const =0
| Get the current position in the file.
virtual long | getSize () const =0
| Get size of file.
virtual s32 | read (void *buffer, u32 sizeToRead)=0
| Reads an amount of bytes from the file.
virtual bool | seek (long finalPos, bool relativeMovement=false)=0
| Changes position in file.
Public Member Functions inherited from irr::IReferenceCounted
| IReferenceCounted ()
| Constructor.
virtual | ~IReferenceCounted ()
| Destructor.
bool | drop () const
| Drops the object. Decrements the reference counter by one.
const c8 * | getDebugName () const
| Returns the debug name of the object.
s32 | getReferenceCount () const
| Get the reference count.
void | grab () const
| Grabs the object. Increments the reference counter by one.

## Additional Inherited Members

Protected Member Functions inherited from irr::IReferenceCounted
void | setDebugName (const c8 *newName)
| Sets the debug name of the object.

## Detailed Description

Interface providing read acess to a file.

Definition at line 17 of file IReadFile.h.

## Member Function Documentation

## getFileName()

virtual const io::path & irr::io::IReadFile::getFileName | ( |  | ) | const

pure virtual

Get name of file.

Returns
  File name as zero terminated character string.

## getPos()

virtual long irr::io::IReadFile::getPos | ( |  | ) | const

pure virtual

Get the current position in the file.

Returns
  Current position in the file in bytes.

## getSize()

virtual long irr::io::IReadFile::getSize | ( |  | ) | const

pure virtual

Get size of file.

Returns
  Size of the file in bytes.

## read()

virtual s32 irr::io::IReadFile::read | ( | void * | buffer,
|  | u32 | sizeToRead )

pure virtual

Reads an amount of bytes from the file.

Parameters

  buffer | Pointer to buffer where read bytes are written to.
  sizeToRead | Amount of bytes to read from the file.

Returns
  How many bytes were read.

## seek()

virtual bool irr::io::IReadFile::seek | ( | long | finalPos,
|  | bool | relativeMovement = false )

pure virtual

Changes position in file.

Parameters

  finalPos | Destination position in the file.
  relativeMovement | If set to true, the position in the file is changed relative to current position. Otherwise the position is changed from beginning of file.

Returns
  True if successful, otherwise false.

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

- IReadFile.h

- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0