OpenTTD Source
20241121-master-g67a0fccfad
|
Interface for filtering a savegame till it is written. More...
#include <saveload_filter.h>
Public Member Functions | |
SaveFilter (std::shared_ptr< SaveFilter > chain) | |
Initialise this filter. More... | |
virtual | ~SaveFilter () |
Make sure the writers are properly closed. | |
virtual void | Write (uint8_t *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 | |
std::shared_ptr< SaveFilter > | chain |
Chained to the (savegame) filters. | |
Interface for filtering a savegame till it is written.
Definition at line 59 of file saveload_filter.h.
|
inline |
Initialise this filter.
chain | The next filter in this chain. |
Definition at line 67 of file saveload_filter.h.
|
pure virtual |
Write a given number of bytes into the savegame.
buf | The bytes to write. |
len | The number of bytes to write. |
Implemented in LZMASaveFilter, ZlibSaveFilter, NoCompSaveFilter, LZOSaveFilter, FileWriter, and PacketWriter.