OpenTTD Source 20241224-master-gf74b0cf984
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.
 
virtual SaveLoadTable GetDescription () const override
 Get the description of the fields in the savegame.
 
virtual 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
 

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 1750 of file saveload.cpp.

Member Function Documentation

◆ GetCompatDescription()

virtual SaveLoadCompatTable SlSkipHandler::GetCompatDescription ( ) const
inlineoverrideprivatevirtual

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

Implements SaveLoadHandler.

Definition at line 1774 of file saveload.cpp.

◆ GetDescription()

virtual SaveLoadTable SlSkipHandler::GetDescription ( ) const
inlineoverrideprivatevirtual

Get the description of the fields in the savegame.

Implements SaveLoadHandler.

Definition at line 1769 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 1756 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 1764 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 1751 of file saveload.cpp.


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