OpenTTD Source: LoadFilter Struct Reference

OpenTTD Source 12.2

Public Member Functions | Data Fields
LoadFilter Struct Referenceabstract

Interface for filtering a savegame till it is loaded. More...

`#include <saveload_filter.h>`

Inheritance diagram for LoadFilter:

## Public Member Functions
| LoadFilter (LoadFilter *chain)
| Initialise this filter. More...
virtual | ~LoadFilter ()
| Make sure the writers are properly closed.
virtual size_t | Read (byte *buf, size_t len)=0
| Read a given number of bytes from the savegame. More...
virtual void | Reset ()
| Reset this filter to read from the beginning of the file.

## Data Fields
LoadFilter * | chain
| Chained to the (savegame) filters.

## Detailed Description

Interface for filtering a savegame till it is loaded.

Definition at line 14 of file saveload_filter.h.

## Constructor & Destructor Documentation

## ◆ LoadFilter()

LoadFilter::LoadFilter | ( | LoadFilter * | chain | ) |
| inline

Initialise this filter.

Parameters

  chain | The next filter in this chain.

Definition at line 22 of file saveload_filter.h.

## Member Function Documentation

## ◆ Read()

virtual size_t LoadFilter::Read | ( | byte * | buf,
|  | size_t | len
| ) |  |
| pure 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.

Implemented in PacketReader, LZOLoadFilter, LZMALoadFilter, ZlibLoadFilter, NoCompLoadFilter, and FileReader.

Referenced by DoLoad(), and LZMALoadFilter::Read().

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

- src/saveload/saveload_filter.h