Class for writing an encoded language. More...
Public Member Functions | |
| TranslationWriter (StringList *strings) | |
| Writer for the encoded data. | |
| void | WriteHeader (const LanguagePackHeader *header) |
| Write the header metadata. | |
| void | Finalise () |
| Finalise writing the file. | |
| void | WriteLength (uint length) |
| Write the length as a simple gamma. | |
| void | Write (const byte *buffer, size_t length) |
| Write a number of bytes. | |
Data Fields | |
| StringList * | strings |
| The encoded strings. | |
Class for writing an encoded language.
Definition at line 153 of file game_text.cpp.
| TranslationWriter::TranslationWriter | ( | StringList * | strings | ) | [inline] |
Writer for the encoded data.
| strings | The string table to add the strings to. |
Definition at line 160 of file game_text.cpp.
| void TranslationWriter::Write | ( | const byte * | buffer, | |
| size_t | length | |||
| ) | [inline, virtual] |
Write a number of bytes.
| buffer | The buffer to write. | |
| length | The amount of byte to write. |
Implements LanguageWriter.
Definition at line 179 of file game_text.cpp.
References SmallVector< T, S >::Append(), and strings.
| void TranslationWriter::WriteHeader | ( | const LanguagePackHeader * | header | ) | [inline, virtual] |
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 164 of file game_text.cpp.
| void TranslationWriter::WriteLength | ( | uint | length | ) | [inline, virtual] |
Write the length as a simple gamma.
| length | The number to write. |
Reimplemented from LanguageWriter.
Definition at line 174 of file game_text.cpp.
1.7.1