# irrklang::IFileReader Class Reference

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

`#include <ik_IFileReader.h>`

Inheritance diagram for irrklang::IFileReader:

List of all members.

## Public Member Functions
virtual | ~IFileReader ()
virtual ik_s32 | read (void *buffer, ik_u32 sizeToRead)=0
virtual bool | seek (ik_s32 finalPos, bool relativeMovement=false)=0
virtual ik_s32 | getSize ()=0
virtual ik_s32 | getPos ()=0
virtual const ik_c8 * | getFileName ()=0

## Detailed Description

Interface providing read acess to a file.

## Constructor & Destructor Documentation

virtual irrklang::IFileReader::~IFileReader | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual const ik_c8* irrklang::IFileReader::getFileName | ( |  | ) | `[pure virtual]`

Returns name of file.

Returns:
  Returns the file name as zero terminated character string.

virtual ik_s32 irrklang::IFileReader::getPos | ( |  | ) | `[pure virtual]`

Returns the current position in the file.

Returns:
  Returns the current position in the file in bytes.

virtual ik_s32 irrklang::IFileReader::getSize | ( |  | ) | `[pure virtual]`

Returns size of file.

Returns:
  Returns the size of the file in bytes.

virtual ik_s32 irrklang::IFileReader::read | ( | void * | buffer,
|  | ik_u32 | 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.

virtual bool irrklang::IFileReader::seek | ( | ik_s32 | finalPos,
|  | bool | relativeMovement = `false` |
| ) |  |  | `[pure virtual]`

Changes position in file, returns true if successful.

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:
  Returns true if successful, otherwise false.

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

- ik_IFileReader.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

| The irrKlang Engine Documentation © 2003-2018 by Nikolaus Gebhardt. Generated by Doxygen (1.6.1)