OpenTTD Source  20241121-master-g67a0fccfad
saveload_filter.h File Reference

Declaration of filters used for saving and loading savegames. More...

Go to the source code of this file.

Data Structures

struct  LoadFilter
 Interface for filtering a savegame till it is loaded. More...
 
struct  SaveFilter
 Interface for filtering a savegame till it is written. More...
 

Functions

template<typename T >
std::shared_ptr< LoadFilterCreateLoadFilter (std::shared_ptr< LoadFilter > chain)
 Instantiator for a load filter. More...
 
template<typename T >
std::shared_ptr< SaveFilterCreateSaveFilter (std::shared_ptr< SaveFilter > chain, uint8_t compression_level)
 Instantiator for a save filter. More...
 

Detailed Description

Declaration of filters used for saving and loading savegames.

Definition in file saveload_filter.h.

Function Documentation

◆ CreateLoadFilter()

template<typename T >
std::shared_ptr<LoadFilter> CreateLoadFilter ( std::shared_ptr< LoadFilter chain)

Instantiator for a load filter.

Parameters
chainThe next filter in this chain.
Template Parameters
TThe type of load filter to create.

Definition at line 53 of file saveload_filter.h.

◆ CreateSaveFilter()

template<typename T >
std::shared_ptr<SaveFilter> CreateSaveFilter ( std::shared_ptr< SaveFilter chain,
uint8_t  compression_level 
)

Instantiator for a save filter.

Parameters
chainThe next filter in this chain.
compression_levelThe requested level of compression.
Template Parameters
TThe type of save filter to create.

Definition at line 98 of file saveload_filter.h.