FileWriter Struct Reference

Yes, simply writing to a file. More...

Inheritance diagram for FileWriter:
SaveFilter

Public Member Functions

 FileWriter (FILE *file)
 Create the file writer, so it writes to a specific file.
 ~FileWriter ()
 Make sure everything is cleaned up.
void Write (byte *buf, size_t size)
 Write a given number of bytes into the savegame.
void Finish ()
 Prepare everything to finish writing the savegame.

Data Fields

FILE * file
 The file to write to.

Detailed Description

Yes, simply writing to a file.

Definition at line 1780 of file saveload.cpp.


Constructor & Destructor Documentation

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

Create the file writer, so it writes to a specific file.

Parameters:
file The file to write to.

Definition at line 1787 of file saveload.cpp.

FileWriter::~FileWriter (  )  [inline]

Make sure everything is cleaned up.

Definition at line 1792 of file saveload.cpp.

References Finish(), and SaveLoadParams::sf.


Member Function Documentation

void FileWriter::Write ( byte *  buf,
size_t  len 
) [inline, virtual]

Write a given number of bytes into the savegame.

Parameters:
buf The bytes to write.
len The number of bytes to write.

Implements SaveFilter.

Definition at line 1800 of file saveload.cpp.

References file, and SlError().


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

Generated on Sun Jan 9 16:02:51 2011 for OpenTTD by  doxygen 1.6.1