OpenTTD Source 20250506-master-g22fedca77e
|
Class for writing an encoded language. More...
Public Member Functions | |
TranslationWriter (StringList &strings) | |
Writer for the encoded data. | |
void | WriteHeader (const LanguagePackHeader *) override |
Write the header metadata. | |
void | Finalise () override |
Finalise writing the file. | |
void | WriteLength (size_t) override |
Write the length as a simple gamma. | |
void | Write (std::string_view buffer) override |
Write a number of bytes. | |
![]() | |
virtual | ~LanguageWriter ()=default |
Especially destroy the subclasses. | |
virtual void | WriteLang (const StringData &data) |
Actually write the language. | |
Data Fields | |
StringList & | strings |
The encoded strings. | |
Class for writing an encoded language.
Definition at line 105 of file game_text.cpp.
|
inline |
Writer for the encoded data.
strings | The string table to add the strings to. |
Definition at line 112 of file game_text.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Write a number of bytes.
buffer | The buffer to write. |
Implements LanguageWriter.
Definition at line 131 of file game_text.cpp.
|
inlineoverridevirtual |
Write the header metadata.
The multi-byte integers are already converted to the little endian format.
header | The header to write. |
Implements LanguageWriter.
Definition at line 116 of file game_text.cpp.
|
inlineoverridevirtual |
Write the length as a simple gamma.
length | The number to write. |
Reimplemented from LanguageWriter.
Definition at line 126 of file game_text.cpp.
StringList& TranslationWriter::strings |
The encoded strings.
Definition at line 106 of file game_text.cpp.