OpenTTD Source 20241224-master-gee860a5c8e
StringNameWriter Struct Reference

Class for writing the string IDs. More...

Inheritance diagram for StringNameWriter:
HeaderWriter

Public Member Functions

 StringNameWriter (StringList &strings)
 Writer for the string names.
 
void WriteStringID (const std::string &name, int stringid) override
 Write the string ID.
 
void Finalise (const StringData &) override
 Finalise writing the file.
 
- Public Member Functions inherited from HeaderWriter
virtual ~HeaderWriter ()=default
 Especially destroy the subclasses.
 
void WriteHeader (const StringData &data)
 Write the header information.
 

Data Fields

StringListstrings
 The string names.
 

Detailed Description

Class for writing the string IDs.

Definition at line 144 of file game_text.cpp.

Constructor & Destructor Documentation

◆ StringNameWriter()

StringNameWriter::StringNameWriter ( StringList strings)
inline

Writer for the string names.

Parameters
stringsThe string table to add the strings to.

Definition at line 151 of file game_text.cpp.

Member Function Documentation

◆ Finalise()

void StringNameWriter::Finalise ( const StringData data)
inlineoverridevirtual

Finalise writing the file.

Parameters
dataThe data about the string.

Implements HeaderWriter.

Definition at line 160 of file game_text.cpp.

◆ WriteStringID()

void StringNameWriter::WriteStringID ( const std::string &  name,
int  stringid 
)
inlineoverridevirtual

Write the string ID.

Parameters
nameThe name of the string.
stringidThe ID of the string.

Implements HeaderWriter.

Definition at line 155 of file game_text.cpp.

Field Documentation

◆ strings

StringList& StringNameWriter::strings

The string names.

Definition at line 145 of file game_text.cpp.


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