ReadBuffer Struct Reference

A buffer for reading (and buffering) savegame data. More...

Public Member Functions

 ReadBuffer (LoadFilter *reader)
 Initialise our variables.
FORCEINLINE byte ReadByte ()
size_t GetSize () const
 Get the size of the memory dump made so far.

Data Fields

byte buf [MEMORY_CHUNK_SIZE]
 Buffer we're going to read from.
byte * bufp
 Location we're at reading the buffer.
byte * bufe
 End of the buffer we can read from.
LoadFilterreader
 The filter used to actually read.
size_t read
 The amount of read bytes so far from the filter.

Detailed Description

A buffer for reading (and buffering) savegame data.

Definition at line 258 of file saveload.cpp.


Constructor & Destructor Documentation

ReadBuffer::ReadBuffer ( LoadFilter reader  )  [inline]

Initialise our variables.

Parameters:
reader The filter to actually read data.

Definition at line 269 of file saveload.cpp.


Member Function Documentation

size_t ReadBuffer::GetSize (  )  const [inline]

Get the size of the memory dump made so far.

Returns:
The size.

Definition at line 291 of file saveload.cpp.

References bufe, bufp, and read.

Referenced by SlIterateArray(), SlLoadCheckChunk(), SlLoadChunk(), and SlSkipArray().


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

Generated on Thu Apr 14 00:49:22 2011 for OpenTTD by  doxygen 1.6.1