OpenTTD Source  1.11.0-beta2
IniItem Struct Reference

A single "line" in an ini file. More...

#include <ini_type.h>

Public Member Functions

 IniItem (struct IniGroup *parent, const std::string &name)
 Construct a new in-memory item of an Ini file. More...
 
 ~IniItem ()
 Free everything we loaded.
 
void SetValue (const char *value)
 Replace the current value with another value. More...
 

Data Fields

IniItemnext
 The next item in this group.
 
std::string name
 The name of this item.
 
std::optional< std::string > value
 The value of this item.
 
std::string comment
 The comment associated with this item.
 

Detailed Description

A single "line" in an ini file.

Definition at line 25 of file ini_type.h.

Constructor & Destructor Documentation

◆ IniItem()

IniItem::IniItem ( struct IniGroup parent,
const std::string &  name 
)

Construct a new in-memory item of an Ini file.

Parameters
parentthe group we belong to
namethe name of the item

Definition at line 23 of file ini_load.cpp.

Member Function Documentation

◆ SetValue()

void IniItem::SetValue ( const char *  value)

Replace the current value with another value.

Parameters
valuethe value to replace with.

Definition at line 41 of file ini_load.cpp.

References value.

Referenced by IniSaveSettingList(), and HotkeyList::Save().


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