Public Member Functions | Data Fields

TranslationWriter Struct Reference

Class for writing an encoded language. More...

Inheritance diagram for TranslationWriter:
LanguageWriter

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

StringListstrings
 The encoded strings.

Detailed Description

Class for writing an encoded language.

Definition at line 158 of file game_text.cpp.


Constructor & Destructor Documentation

TranslationWriter::TranslationWriter ( StringList strings  )  [inline]

Writer for the encoded data.

Parameters:
strings The string table to add the strings to.

Definition at line 165 of file game_text.cpp.


Member Function Documentation

void TranslationWriter::Write ( const byte *  buffer,
size_t  length 
) [inline, virtual]

Write a number of bytes.

Parameters:
buffer The buffer to write.
length The amount of byte to write.

Implements LanguageWriter.

Definition at line 184 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.

Parameters:
header The header to write.

Implements LanguageWriter.

Definition at line 169 of file game_text.cpp.

void TranslationWriter::WriteLength ( uint  length  )  [inline, virtual]

Write the length as a simple gamma.

Parameters:
length The number to write.

Reimplemented from LanguageWriter.

Definition at line 179 of file game_text.cpp.


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