OpenTTD Source 20241224-master-gf74b0cf984
|
Interface for filtering a savegame till it is loaded. More...
#include <saveload_filter.h>
Public Member Functions | |
LoadFilter (std::shared_ptr< LoadFilter > chain) | |
Initialise this filter. | |
virtual | ~LoadFilter ()=default |
Make sure the writers are properly closed. | |
virtual size_t | Read (uint8_t *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 | |
std::shared_ptr< LoadFilter > | chain |
Chained to the (savegame) filters. | |
Interface for filtering a savegame till it is loaded.
Definition at line 14 of file saveload_filter.h.
|
inline |
Initialise this filter.
chain | The next filter in this chain. |
Definition at line 22 of file saveload_filter.h.
|
pure virtual |
Read a given number of bytes from the savegame.
buf | The bytes to read. |
len | The number of bytes to read. |
Implemented in FileReader, NoCompLoadFilter, ZlibLoadFilter, LZMALoadFilter, LZOLoadFilter, and PacketReader.
|
inlinevirtual |
Reset this filter to read from the beginning of the file.
Reimplemented in PacketReader, and FileReader.
Definition at line 40 of file saveload_filter.h.
std::shared_ptr<LoadFilter> LoadFilter::chain |
Chained to the (savegame) filters.
Definition at line 16 of file saveload_filter.h.
Referenced by NoCompLoadFilter::Read(), ZlibLoadFilter::Read(), LZMALoadFilter::Read(), and LZOLoadFilter::Read().