OpenTTD Source 20260711-master-g3fb3006dff
LoggedChangeRevision Struct Reference

A log entry for a change in OpenTTD version. More...

#include <gamelog_internal.h>

Inheritance diagram for LoggedChangeRevision:
LoggedChange

Public Member Functions

 LoggedChangeRevision ()
 Constructor for savegame loading.
 LoggedChangeRevision (const std::string &text, uint32_t newgrf, uint16_t slver, uint8_t modified)
 Create the new log entry.
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

std::string text {}
 revision string, _openttd_revision
uint32_t newgrf = 0
 _openttd_newgrf_version
uint16_t slver = 0
 _sl_version
uint8_t modified = 0
 _openttd_revision_modified
Data Fields inherited from LoggedChange
GamelogChangeType ct {}
 The type of change.

Detailed Description

A log entry for a change in OpenTTD version.

Definition at line 80 of file gamelog_internal.h.

Constructor & Destructor Documentation

◆ LoggedChangeRevision() [1/2]

LoggedChangeRevision::LoggedChangeRevision ( )
inline

Constructor for savegame loading.

Definition at line 82 of file gamelog_internal.h.

References LoggedChange::LoggedChange().

◆ LoggedChangeRevision() [2/2]

LoggedChangeRevision::LoggedChangeRevision ( const std::string & text,
uint32_t newgrf,
uint16_t slver,
uint8_t modified )
inline

Create the new log entry.

Parameters
textThe string representation of the version.
newgrfThe NewGRF version.
slverThe savegame version.
modifiedWhether the executable was modified.

Definition at line 91 of file gamelog_internal.h.

References LoggedChange::LoggedChange(), modified, newgrf, slver, and text.

Member Function Documentation

◆ FormatTo()

void LoggedChangeRevision::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 176 of file gamelog.cpp.

References modified, newgrf, slver, and text.

Field Documentation

◆ modified

uint8_t LoggedChangeRevision::modified = 0

_openttd_revision_modified

Definition at line 98 of file gamelog_internal.h.

Referenced by FormatTo(), Gamelog::Info(), LoggedChangeRevision(), and Gamelog::TestRevision().

◆ newgrf

uint32_t LoggedChangeRevision::newgrf = 0

_openttd_newgrf_version

Definition at line 96 of file gamelog_internal.h.

Referenced by FormatTo(), Gamelog::Info(), LoggedChangeRevision(), and Gamelog::TestRevision().

◆ slver

uint16_t LoggedChangeRevision::slver = 0

_sl_version

Definition at line 97 of file gamelog_internal.h.

Referenced by FormatTo(), and LoggedChangeRevision().

◆ text

std::string LoggedChangeRevision::text {}

revision string, _openttd_revision

Definition at line 95 of file gamelog_internal.h.

Referenced by FormatTo(), LoggedChangeRevision(), and Gamelog::TestRevision().


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