|
OpenTTD
|
Base class for all language writers. More...
#include <strgen.h>
Public Member Functions | |
| virtual void | WriteHeader (const LanguagePackHeader *header)=0 |
| Write the header metadata. More... | |
| virtual void | Write (const byte *buffer, size_t length)=0 |
| Write a number of bytes. More... | |
| virtual void | Finalise ()=0 |
| Finalise writing the file. | |
| virtual | ~LanguageWriter () |
| Especially destroy the subclasses. More... | |
| virtual void | WriteLength (uint length) |
| Write the length as a simple gamma. More... | |
| virtual void | WriteLang (const StringData &data) |
| Actually write the language. More... | |
|
inlinevirtual |
|
pure virtual |
Write a number of bytes.
| buffer | The buffer to write. |
| length | The amount of byte to write. |
Implemented in LanguageFileWriter, and TranslationWriter.
|
pure virtual |
Write the header metadata.
The multi-byte integers are already converted to the little endian format.
| header | The header to write. |
Implemented in LanguageFileWriter, and TranslationWriter.
|
virtual |
Actually write the language.
| data | The data about the string. |
Definition at line 953 of file strgen_base.cpp.
References AllocaM, StringData::CountInUse(), LanguagePackHeader::offsets, and StringData::tabs.
|
virtual |
Write the length as a simple gamma.
| length | The number to write. |
Reimplemented in TranslationWriter.
Definition at line 934 of file strgen_base.cpp.