OpenTTD Source: StrgenState Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
StrgenState Struct Reference

Global state shared between strgen.cpp, game_text.cpp and strgen_base.cpp. More...

`#include <strgen.h>`

## Data Fields
std::string | file = "(unknown file)"
| The filename of the input, so we can refer to it in errors/warnings.
size_t | cur_line = 0
| The current line we're parsing in the input file.
size_t | errors = 0
size_t | warnings = 0
bool | show_warnings = false
bool | annotate_todos = false
bool | translation = false
| Is the current file actually a translation or not.
LanguagePackHeader | lang
| Header information about a language.

## Detailed Description

Global state shared between strgen.cpp, game_text.cpp and strgen_base.cpp.

Definition at line 161 of file strgen.h.

## Field Documentation

## ◆ annotate_todos

bool StrgenState::annotate_todos = false

Definition at line 167 of file strgen.h.

## ◆ cur_line

size_t StrgenState::cur_line = 0

The current line we're parsing in the input file.

Definition at line 163 of file strgen.h.

Referenced by FatalErrorI(), StringReader::ParseFile(), and LanguageWriter::WriteLang().

## ◆ errors

size_t StrgenState::errors = 0

Definition at line 164 of file strgen.h.

## ◆ file

std::string StrgenState::file = "(unknown file)"

The filename of the input, so we can refer to it in errors/warnings.

Definition at line 162 of file strgen.h.

Referenced by FatalErrorI(), and StringReader::ParseFile().

## ◆ lang

LanguagePackHeader StrgenState::lang

Header information about a language.

Definition at line 169 of file strgen.h.

Referenced by StringReader::ParseFile(), FileStringReader::ParseFile(), and LanguageWriter::WriteLang().

## ◆ show_warnings

bool StrgenState::show_warnings = false

Definition at line 166 of file strgen.h.

## ◆ translation

bool StrgenState::translation = false

Is the current file actually a translation or not.

Definition at line 168 of file strgen.h.

Referenced by StringReader::ParseFile().

## ◆ warnings

size_t StrgenState::warnings = 0

Definition at line 165 of file strgen.h.

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

- src/strgen/strgen.h