Public Member Functions | Data Fields

FileReader Struct Reference

Yes, simply reading from a file. More...

Inheritance diagram for FileReader:
LoadFilter

Public Member Functions

 FileReader (FILE *file)
 Create the file reader, so it reads from a specific file.
 ~FileReader ()
 Make sure everything is cleaned up.
size_t Read (byte *buf, size_t size)
 Read a given number of bytes from the savegame.
void Reset ()
 Reset this filter to read from the beginning of the file.

Data Fields

FILE * file
 The file to read from.
long begin
 The begin of the file.

Detailed Description

Yes, simply reading from a file.

Definition at line 1795 of file saveload.cpp.


Constructor & Destructor Documentation

FileReader::FileReader ( FILE *  file  )  [inline]

Create the file reader, so it reads from a specific file.

Parameters:
file The file to read from.

Definition at line 1803 of file saveload.cpp.

FileReader::~FileReader (  )  [inline]

Make sure everything is cleaned up.

Definition at line 1808 of file saveload.cpp.

References file, and SaveLoadParams::sf.


Member Function Documentation

size_t FileReader::Read ( byte *  buf,
size_t  len 
) [inline, virtual]

Read a given number of bytes from the savegame.

Parameters:
buf The bytes to read.
len The number of bytes to read.
Returns:
The number of actually read bytes.

Implements LoadFilter.

Definition at line 1817 of file saveload.cpp.

References file.


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