OpenTTD Source: LanguageScanner Class Reference

OpenTTD Source 14.1

Public Member Functions | Private Attributes
LanguageScanner Class Reference

Scanner to find language files in a GameScript directory. More...

Inheritance diagram for LanguageScanner:

## Public Member Functions
| LanguageScanner (GameStrings *gs, const std::string &exclude)
| Initialise.
void | Scan (const char *directory)
| Scan.
bool | AddFile (const std::string &filename, size_t, const std::string &) override
| Add a file with the given filename. More...

## Private Attributes
GameStrings * | gs
std::string | exclude

## Additional Inherited Members
Protected Member Functions inherited from FileScanner
virtual | ~FileScanner ()=default
| Destruct the proper one...
uint | Scan (const char *extension, Subdirectory sd, bool tars=true, bool recursive=true)
| Scan for files with the given extension in the given search path. More...
uint | Scan (const char *extension, const std::string &directory, bool recursive=true)
| Scan for files with the given extension in the given search path. More...
Protected Attributes inherited from FileScanner
Subdirectory | subdir
| The current sub directory we are searching through.

## Detailed Description

Scanner to find language files in a GameScript directory.

Definition at line 171 of file game_text.cpp.

## Member Function Documentation

## ◆ AddFile()

bool LanguageScanner::AddFile | ( | const std::string & | filename,
|  | size_t | basepath_length,
|  | const std::string & | tar_filename
| ) |  |
| inlineoverridevirtual

Add a file with the given filename.

Parameters

  filename | the full path to the file to read
  basepath_length | amount of characters to chop of before to get a filename relative to the search path.
  tar_filename | the name of the tar file the file is read from.

Returns
  true if the file is added.

Implements FileScanner.

Definition at line 188 of file game_text.cpp.

References GameStrings::raw_strings, and ReadRawLanguageStrings().

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

- src/game/game_text.cpp