OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
LoadFilter Struct Reference

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.
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.
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 16 of file saveload_filter.h.

## Constructor & Destructor Documentation

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

Initialise this filter.

Parameters

  chain | The next filter in this chain.

Definition at line 24 of file saveload_filter.h.

virtual LoadFilter::~LoadFilter | ( |  | ) |
| inline virtual

Make sure the writers are properly closed.

Definition at line 29 of file saveload_filter.h.

References chain.

## Member Function Documentation

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 LZMALoadFilter, ZlibLoadFilter, NoCompLoadFilter, LZOLoadFilter, FileReader, and PacketReader.

Referenced by DoLoad(), LZOLoadFilter::Read(), NoCompLoadFilter::Read(), ZlibLoadFilter::Read(), and LZMALoadFilter::Read().

## Field Documentation

LoadFilter* LoadFilter::chain

Chained to the (savegame) filters.

Definition at line 18 of file saveload_filter.h.

Referenced by LZOLoadFilter::Read(), NoCompLoadFilter::Read(), ZlibLoadFilter::Read(), LZMALoadFilter::Read(), Reset(), and ~LoadFilter().

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

- src/saveload/saveload_filter.h