OpenTTD
LangString Struct Reference

Information about a single string. More...

#include <strgen.h>

Public Member Functions

 LangString (const char *name, const char *english, size_t index, int line)
 Create a new string. More...
 
 ~LangString ()
 Free everything we allocated. More...
 
void FreeTranslation ()
 Free all data related to the translation. More...
 

Data Fields

char * name
 Name of the string.
 
char * english
 English text.
 
char * translated
 Translated text.
 
size_t hash_next
 Next hash entry.
 
size_t index
 The index in the language file.
 
int line
 Line of string in source-file.
 
Casetranslated_case
 Cases of the translation.
 

Detailed Description

Information about a single string.

Definition at line 28 of file strgen.h.

Constructor & Destructor Documentation

◆ LangString()

LangString::LangString ( const char *  name,
const char *  english,
size_t  index,
int  line 
)

Create a new string.

Parameters
nameThe name of the string.
englishThe english "translation" of the string.
indexThe index in the string table.
lineThe line this string was found on.

Definition at line 61 of file strgen_base.cpp.

◆ ~LangString()

LangString::~LangString ( )

Free everything we allocated.

Definition at line 68 of file strgen_base.cpp.

References english, free(), name, translated, and translated_case.

Member Function Documentation

◆ FreeTranslation()

void LangString::FreeTranslation ( )

Free all data related to the translation.

Definition at line 77 of file strgen_base.cpp.

References free(), translated, and translated_case.

Referenced by StringData::FreeTranslation().


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