OpenTTD Source  20240919-master-gdf0233f4c2
UnmappedChoiceList Struct Reference

Helper structure for mapping choice lists. More...

Public Member Functions

 UnmappedChoiceList (StringControlCode type, int offset)
 Initialise the mapping. More...
 
void Flush (const LanguageMap *lm, std::ostringstream &dest)
 Flush this choice list into the destination string. More...
 

Data Fields

StringControlCode type
 The type of choice list.
 
int offset
 The offset for the plural/gender form.
 
std::map< uint8_t, std::stringstream > strings
 Mapping of NewGRF supplied ID to the different strings in the choice list.
 

Detailed Description

Helper structure for mapping choice lists.

Definition at line 108 of file newgrf_text.cpp.

Constructor & Destructor Documentation

◆ UnmappedChoiceList()

UnmappedChoiceList::UnmappedChoiceList ( StringControlCode  type,
int  offset 
)
inline

Initialise the mapping.

Parameters
typeThe type of mapping.
offsetThe offset to get the plural/gender from.

Definition at line 114 of file newgrf_text.cpp.

Member Function Documentation

◆ Flush()

void UnmappedChoiceList::Flush ( const LanguageMap lm,
std::ostringstream &  dest 
)
inline

Flush this choice list into the destination string.

Parameters
lmThe current language mapping.
destTarget to write to.

Definition at line 130 of file newgrf_text.cpp.


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