OpenTTD Source 20260206-master-g4d4e37dbf1
SlSkipHandler Class Reference

Handler that is assigned when there is a struct read in the savegame which is not known to the code. More...

Inheritance diagram for SlSkipHandler:
SaveLoadHandler

Private Member Functions

void Save (void *) const override
 Save the object to disk.
void Load (void *object) const override
 Load the object from disk.
void LoadCheck (void *object) const override
 Similar to load, but used only to validate savegames.
SaveLoadTable GetDescription () const override
 Get the description of the fields in the savegame.
SaveLoadCompatTable GetCompatDescription () const override
 Get the pre-header description of the fields in the savegame.

Additional Inherited Members

Public Member Functions inherited from SaveLoadHandler
virtual void FixPointers (void *object) const
 A post-load callback to fix SL_REF integers into pointers.
SaveLoadTable GetLoadDescription () const
 Get the description for how to load the chunk.
Data Fields inherited from SaveLoadHandler
std::optional< std::vector< SaveLoad > > load_description
 Description derived from savegame being loaded.

Detailed Description

Handler that is assigned when there is a struct read in the savegame which is not known to the code.

This means we are going to skip it.

Definition at line 1864 of file saveload.cpp.

Member Function Documentation

◆ GetCompatDescription()

SaveLoadCompatTable SlSkipHandler::GetCompatDescription ( ) const
inlineoverrideprivatevirtual

Get the pre-header description of the fields in the savegame.

Returns
Compatibility save load description.

Implements SaveLoadHandler.

Definition at line 1888 of file saveload.cpp.

◆ GetDescription()

SaveLoadTable SlSkipHandler::GetDescription ( ) const
inlineoverrideprivatevirtual

Get the description of the fields in the savegame.

Returns
Save load description.

Implements SaveLoadHandler.

Definition at line 1883 of file saveload.cpp.

◆ Load()

void SlSkipHandler::Load ( void * object) const
inlineoverrideprivatevirtual

Load the object from disk.

Parameters
objectThe object to load.

Reimplemented from SaveLoadHandler.

Definition at line 1870 of file saveload.cpp.

References SaveLoadHandler::GetLoadDescription(), SlGetStructListLength(), and SlObject().

Referenced by LoadCheck().

◆ LoadCheck()

void SlSkipHandler::LoadCheck ( void * object) const
inlineoverrideprivatevirtual

Similar to load, but used only to validate savegames.

Parameters
objectThe object to load.

Reimplemented from SaveLoadHandler.

Definition at line 1878 of file saveload.cpp.

References Load().

◆ Save()

void SlSkipHandler::Save ( void * object) const
inlineoverrideprivatevirtual

Save the object to disk.

Parameters
objectThe object to store.

Reimplemented from SaveLoadHandler.

Definition at line 1865 of file saveload.cpp.


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