OpenTTD Source 20260711-master-g3fb3006dff
LoggedChangeGRFRemoved Struct Reference

A log entry for a NewGRF that was removed. More...

#include <gamelog_internal.h>

Inheritance diagram for LoggedChangeGRFRemoved:
LoggedChange

Public Member Functions

 LoggedChangeGRFRemoved ()
 Constructor for savegame loading.
 LoggedChangeGRFRemoved (GrfID grfid)
 Create a log entry for a removed NewGRF.
void FormatTo (std::back_insert_iterator< std::string > &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override
 Format the content of this change into the given output.
Public Member Functions inherited from LoggedChange
 LoggedChange (GamelogChangeType type=GamelogChangeType::None)
 Create the log entry.
virtual ~LoggedChange ()=default
 Ensure the destructor of the sub classes are called as well.

Data Fields

GrfID grfid {}
 ID of removed GRF.
Data Fields inherited from LoggedChange
GamelogChangeType ct {}
 The type of change.

Detailed Description

A log entry for a NewGRF that was removed.

Definition at line 134 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeGRFRemoved() [1/2]

LoggedChangeGRFRemoved::LoggedChangeGRFRemoved ( )
inline

Constructor for savegame loading.

Definition at line 136 of file gamelog_internal.h.

References LoggedChange::LoggedChange().

◆ LoggedChangeGRFRemoved() [2/2]

LoggedChangeGRFRemoved::LoggedChangeGRFRemoved ( GrfID grfid)
inline

Create a log entry for a removed NewGRF.

Parameters
grfidThe NewGRF that is removed.

Definition at line 142 of file gamelog_internal.h.

References grfid, and LoggedChange::LoggedChange().

Member Function Documentation

◆ FormatTo()

void LoggedChangeGRFRemoved::FormatTo ( std::back_insert_iterator< std::string > & output_iterator,
GrfIDMapping & grf_names,
GamelogActionType action_type )
overridevirtual

Format the content of this change into the given output.

Parameters
output_iteratorDestination of the formatted content.
grf_namesCache/mapping of names of NewGRFs seen in the logs.
action_typeThe context in which this method was called.

Implements LoggedChange.

Definition at line 240 of file gamelog.cpp.

References AddGrfInfo(), grfid, and Load.

Field Documentation

◆ grfid

GrfID LoggedChangeGRFRemoved::grfid {}

ID of removed GRF.

Definition at line 146 of file gamelog_internal.h.

Referenced by FormatTo(), and LoggedChangeGRFRemoved().


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