# ScenarioScanner Class Reference

Scanner to find the unique IDs of scenarios. More...

Inheritance diagram for ScenarioScanner:

## Public Member Functions

| ScenarioScanner ()
| Initialise.
void | Scan (bool rescan)
| Scan, but only if it's needed.
bool | AddFile (const char *filename, size_t basepath_length)
| Add a file with the given filename.

## Private Attributes

bool | scanned
| Whether we've already scanned.

## Detailed Description

Scanner to find the unique IDs of scenarios.

Definition at line 553 of file fios.cpp.

## Member Function Documentation

bool ScenarioScanner::AddFile | ( | const char * | filename,
|  | size_t | basepath_length |
| ) |  |  | `[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.

Returns:
  true if the file is added.

< filename without the extension.

Implements FileScanner.

Definition at line 571 of file fios.cpp.

References FioFCloseFile(), FioFOpenFile(), lastof, SCENARIO_DIR, and strecpy().

void ScenarioScanner::Scan | ( | bool | rescan | ) | `[inline]`

Scan, but only if it's needed.

Parameters:

  | rescan | whether to force scanning even when it's not necessary

Definition at line 563 of file fios.cpp.

References FileScanner::Scan(), and SCENARIO_DIR.

Referenced by HasScenario(), and ScanScenarios().

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

- src/fios.cpp