OpenTTD Source 20260721-master-g25ec12c62d
FileToSaveLoad Struct Reference

Deals with the type of the savegame, independent of extension. More...

#include <saveload_func.h>

Public Member Functions

void SetMode (const FiosType &ft, SaveLoadOperation fop=SaveLoadOperation::Load)
 Set the mode and file type of the file to save or load.
void Set (const FiosItem &item)
 Set the mode, title and name of the file.

Data Fields

SaveLoadOperation file_op
 File operation to perform.
FiosType ftype
 File type.
std::string name
 Name of the file.
EncodedString title
 Internal name of the game.

Detailed Description

Deals with the type of the savegame, independent of extension.

Definition at line 18 of file saveload_func.h.

Member Function Documentation

◆ Set()

void FileToSaveLoad::Set ( const FiosItem & item)

Set the mode, title and name of the file.

Parameters
itemContainer with mode, title and name.

Definition at line 3506 of file saveload.cpp.

References name, SetMode(), and title.

◆ SetMode()

void FileToSaveLoad::SetMode ( const FiosType & ft,
SaveLoadOperation fop = SaveLoadOperation::Load )

Set the mode and file type of the file to save or load.

Parameters
ftFile type.
fopFile operation being performed.

Definition at line 3490 of file saveload.cpp.

References FiosType::abstract, file_op, ftype, Invalid, and None.

Referenced by Set().

Field Documentation

◆ file_op

SaveLoadOperation FileToSaveLoad::file_op

File operation to perform.

Definition at line 19 of file saveload_func.h.

Referenced by SetMode().

◆ ftype

FiosType FileToSaveLoad::ftype

File type.

Definition at line 20 of file saveload_func.h.

Referenced by SetMode().

◆ name

std::string FileToSaveLoad::name

Name of the file.

Definition at line 21 of file saveload_func.h.

Referenced by Set().

◆ title

EncodedString FileToSaveLoad::title

Internal name of the game.

Definition at line 22 of file saveload_func.h.

Referenced by Set().


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