OpenTTD
Public Member Functions | Data Fields
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. More...
 
void WriteStringID (const char *name, int stringid)
 Write the string ID. More...
 
void Finalise (const StringData &data)
 Finalise writing the file. More...
 
- Public Member Functions inherited from HeaderWriter
virtual ~HeaderWriter ()
 Especially destroy the subclasses. More...
 
void WriteHeader (const StringData &data)
 Write the header information. More...
 

Data Fields

StringListstrings
 The string names.
 

Detailed Description

Class for writing the string IDs.

Definition at line 202 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 209 of file game_text.cpp.

Member Function Documentation

◆ Finalise()

void StringNameWriter::Finalise ( const StringData data)
inlinevirtual

Finalise writing the file.

Parameters
dataThe data about the string.

Implements HeaderWriter.

Definition at line 218 of file game_text.cpp.

◆ WriteStringID()

void StringNameWriter::WriteStringID ( const char *  name,
int  stringid 
)
inlinevirtual

Write the string ID.

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

Implements HeaderWriter.

Definition at line 213 of file game_text.cpp.

References SmallVector< T, S >::Append(), SmallVector< T, S >::Length(), and stredup().


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