OpenTTD Source 20260917-master-gec444f7315
RAILChunkHandler Struct Reference
Inheritance diagram for RAILChunkHandler:
ChunkHandler

Public Member Functions

void Save () const override
 Save the chunk.
void Load () const override
 Load the chunk.
Public Member Functions inherited from ChunkHandler
 ChunkHandler (ChunkId id, ChunkType type)
 Create this ChunkHandler.
virtual ~ChunkHandler ()=default
 Ensure the destructor of the sub classes are called as well.
virtual void FixPointers () const
 Fix the pointers.
virtual void LoadCheck (size_t len=0) const
 Load the chunk for game preview.
std::string GetName () const
 Get the name of this chunk.

Static Public Attributes

static const SaveLoad description []

Additional Inherited Members

Data Fields inherited from ChunkHandler
ChunkId id
 Unique ID (4 letters).
ChunkType type
 Type of the chunk.

Detailed Description

Definition at line 36 of file labelmaps_sl.cpp.

Constructor & Destructor Documentation

◆ RAILChunkHandler()

RAILChunkHandler::RAILChunkHandler ( )
inline

Definition at line 37 of file labelmaps_sl.cpp.

Member Function Documentation

◆ Load()

void RAILChunkHandler::Load ( ) const
inlineoverridevirtual

◆ Save()

void RAILChunkHandler::Save ( ) const
inlineoverridevirtual

Save the chunk.

Must be overridden, unless Chunk type is ChunkType::ReadOnly.

Reimplemented from ChunkHandler.

Definition at line 43 of file labelmaps_sl.cpp.

References GetRailTypeInfo(), LabelObject< T >::label, RailTypeInfo::label, RAILTYPE_END, SlObject(), and SlTableHeader().

Field Documentation

◆ description

const SaveLoad RAILChunkHandler::description[]
inlinestatic
Initial value:
= {
}
#define SLE_OBJECT_ADDRESS(base, variable)
Macro to be able to pass the variable type and construct the SaveLoad::AddressFunction given a base c...
Definition saveload.h:754
Container for a label for rail or road type conversion.
static SaveLoad Variable(std::string name, AddressFunction< T > address_func, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion, size_t extra=0)
Storage of a variable in some savegame versions.
Definition saveload.h:926

Definition at line 39 of file labelmaps_sl.cpp.


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