OpenTTD Source: NewGRFMappingChunkHandler Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
NewGRFMappingChunkHandler Struct Reference
Inheritance diagram for NewGRFMappingChunkHandler:

## Public Member Functions
| NewGRFMappingChunkHandler (uint32_t id, OverrideManagerBase &mapping)
void | Save () const override
| Save a GRF ID + local id -> OpenTTD's id mapping.
void | Load () const override
| Load a GRF ID + local id -> OpenTTD's id mapping.
Public Member Functions inherited from ChunkHandler
| ChunkHandler (uint32_t id, ChunkType type)
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

## Data Fields
OverrideManagerBase & | mapping
Data Fields inherited from ChunkHandler
uint32_t | id
| Unique ID (4 letters).
ChunkType | type
| Type of the chunk.

## Detailed Description

Definition at line 16 of file newgrf_sl.h.

## Constructor & Destructor Documentation

## ◆ NewGRFMappingChunkHandler()

NewGRFMappingChunkHandler::NewGRFMappingChunkHandler | ( | uint32_t | id,
|  | OverrideManagerBase & | mapping
| ) |  |
| inline

Definition at line 19 of file newgrf_sl.h.

## Member Function Documentation

## ◆ Load()

void NewGRFMappingChunkHandler::Load | ( |  | ) | const
| overridevirtual

Load a GRF ID + local id -> OpenTTD's id mapping.

Implements ChunkHandler.

Definition at line 47 of file newgrf_sl.cpp.

References _newgrf_mapping_desc, _newgrf_mapping_sl_compat, OverrideManagerBase::mappings, OverrideManagerBase::ResetMapping(), SlCompatTableHeader(), SlErrorCorrupt(), SlIterateArray(), and SlObject().

## ◆ Save()

void NewGRFMappingChunkHandler::Save | ( |  | ) | const
| overridevirtual

Save a GRF ID + local id -> OpenTTD's id mapping.

Reimplemented from ChunkHandler.

Definition at line 32 of file newgrf_sl.cpp.

References _newgrf_mapping_desc, OverrideManagerBase::mappings, SlObject(), and SlTableHeader().

## Field Documentation

## ◆ mapping

OverrideManagerBase& NewGRFMappingChunkHandler::mapping

Definition at line 17 of file newgrf_sl.h.

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

- src/saveload/newgrf_sl.h
- src/saveload/newgrf_sl.cpp