OpenTTD Source 20260208-master-g43af8e94d0
LoggedChangeSettingChanged Struct Reference
Inheritance diagram for LoggedChangeSettingChanged:
LoggedChange

Public Member Functions

 LoggedChangeSettingChanged (const std::string &name, int32_t oldval, int32_t newval)
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=GLCT_NONE)

Data Fields

std::string name {}
 name of the setting
int32_t oldval = 0
 old value
int32_t newval = 0
 new value
Data Fields inherited from LoggedChange
GamelogChangeType ct {}

Detailed Description

Definition at line 121 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeSettingChanged() [1/2]

LoggedChangeSettingChanged::LoggedChangeSettingChanged ( )
inline

Definition at line 122 of file gamelog_internal.h.

◆ LoggedChangeSettingChanged() [2/2]

LoggedChangeSettingChanged::LoggedChangeSettingChanged ( const std::string & name,
int32_t oldval,
int32_t newval )
inline

Definition at line 123 of file gamelog_internal.h.

Member Function Documentation

◆ FormatTo()

void LoggedChangeSettingChanged::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 223 of file gamelog.cpp.

References name, newval, and oldval.

Field Documentation

◆ name

std::string LoggedChangeSettingChanged::name {}

name of the setting

Definition at line 127 of file gamelog_internal.h.

Referenced by FormatTo().

◆ newval

int32_t LoggedChangeSettingChanged::newval = 0

new value

Definition at line 129 of file gamelog_internal.h.

Referenced by FormatTo().

◆ oldval

int32_t LoggedChangeSettingChanged::oldval = 0

old value

Definition at line 128 of file gamelog_internal.h.

Referenced by FormatTo().


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