OpenTTD Source 20260206-master-g4d4e37dbf1
ConfigIniFile Class Reference

IniFile to store a configuration. More...

Inheritance diagram for ConfigIniFile:
IniFile IniLoadFile

Public Member Functions

 ConfigIniFile (const std::string &filename)
Public Member Functions inherited from IniFile
 IniFile (const IniGroupNameList &list_group_names={})
 Create a new ini file with given group names.
bool SaveToDisk (const std::string &filename)
 Save the Ini file's data to the disk.
std::optional< FileHandleOpenFile (std::string_view filename, Subdirectory subdir, size_t *size) override
 Open the INI file.
void ReportFileError (std::string_view message) override
 Report an error about the file contents.
Public Member Functions inherited from IniLoadFile
 IniLoadFile (const IniGroupNameList &list_group_names={}, const IniGroupNameList &seq_group_names={})
 Construct a new in-memory Ini file representation.
const IniGroupGetGroup (std::string_view name) const
 Get the group with the given name.
IniGroupGetGroup (std::string_view name)
 Get the group with the given name.
IniGroupGetOrCreateGroup (std::string_view name)
 Get the group with the given name, and if it doesn't exist create a new group.
IniGroupCreateGroup (std::string_view name)
 Create an group with the given name.
void RemoveGroup (std::string_view name)
 Remove the group with the given name.
void LoadFromDisk (std::string_view filename, Subdirectory subdir)
 Load the Ini file's data from the disk.

Static Private Attributes

static const IniGroupNameList list_group_names

Additional Inherited Members

Public Types inherited from IniLoadFile
using IniGroupNameList = std::initializer_list<const std::string_view>
Data Fields inherited from IniLoadFile
std::list< IniGroupgroups
 all groups in the ini
std::string comment
 last comment in file
const IniGroupNameList list_group_names
 list of group names that are lists
const IniGroupNameList seq_group_names
 list of group names that are sequences.

Detailed Description

IniFile to store a configuration.

Definition at line 140 of file settings.cpp.

Constructor & Destructor Documentation

◆ ConfigIniFile()

ConfigIniFile::ConfigIniFile ( const std::string & filename)
inline

Definition at line 153 of file settings.cpp.

Field Documentation

◆ list_group_names

const IniGroupNameList ConfigIniFile::list_group_names
inlinestaticprivate
Initial value:
= {
"bans",
"newgrf",
"servers",
"server_bind_addresses",
"server_authorized_keys",
"rcon_authorized_keys",
"admin_authorized_keys"
}

Definition at line 142 of file settings.cpp.


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