OpenTTD

Public Member Functions | Data Fields
SaveFilter Struct Referenceabstract

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

`#include <saveload_filter.h>`

Inheritance diagram for SaveFilter:

## Public Member Functions
| SaveFilter (SaveFilter *chain)
| Initialise this filter. More...
virtual | ~SaveFilter ()
| Make sure the writers are properly closed. More...
virtual void | Write (byte *buf, size_t len)=0
| Write a given number of bytes into the savegame. More...
virtual void | Finish ()
| Prepare everything to finish writing the savegame.

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

## Detailed Description

Interface for filtering a savegame till it is written.

Definition at line 62 of file saveload_filter.h.

## Constructor & Destructor Documentation

## ◆ SaveFilter()

SaveFilter::SaveFilter | ( | SaveFilter * | chain | ) |
| inline

Initialise this filter.

Parameters

  chain | The next filter in this chain.

Definition at line 70 of file saveload_filter.h.

## ◆ ~SaveFilter()

virtual SaveFilter::~SaveFilter | ( |  | ) |
| inline virtual

Make sure the writers are properly closed.

Definition at line 75 of file saveload_filter.h.

References LoadFilter::chain.

## Member Function Documentation

## ◆ Write()

virtual void SaveFilter::Write | ( | byte * | buf,
|  | size_t | len
| ) |  |
| pure virtual

Write a given number of bytes into the savegame.

Parameters

  buf | The bytes to write.
  len | The number of bytes to write.

Implemented in LZMASaveFilter, ZlibSaveFilter, NoCompSaveFilter, LZOSaveFilter, FileWriter, and PacketWriter.

Referenced by MemoryDumper::Flush().

## Field Documentation

## ◆ chain

SaveFilter* SaveFilter::chain

Chained to the (savegame) filters.

Definition at line 64 of file saveload_filter.h.

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

- src/saveload/saveload_filter.h