OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

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 char *exclude)
| Initialise.
void | Scan (const char *directory)
| Scan.
bool | AddFile (const char *filename, size_t basepath_length, const char *tar_filename)
| Add a file with the given filename.

## Private Attributes
GameStrings * | gs
char * | exclude

## Additional Inherited Members
Protected Member Functions inherited from FileScanner
virtual | ~FileScanner ()
| 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.
uint | Scan (const char *extension, const char *directory, bool recursive=true)
| Scan for files with the given extension in the given search path.

## Detailed Description

Scanner to find language files in a GameScript directory.

Definition at line 227 of file game_text.cpp.

## Member Function Documentation

bool LanguageScanner::AddFile | ( | const char * | filename,
|  | size_t | basepath_length,
|  | const char * | tar_filename
| ) |  |
| inline virtual

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 245 of file game_text.cpp.

References SmallVector< T, S >::Append(), GameStrings::raw_strings, and ReadRawLanguageStrings().

Referenced by LoadTranslations().

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

- src/game/game_text.cpp