OpenTTD Source 20260621-master-g720d10536d
settings_internal.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef SETTINGS_INTERNAL_H
11#define SETTINGS_INTERNAL_H
12
13#include <variant>
14#include "saveload/saveload.h"
15#include "core/enum_type.hpp"
16
33
36
45enum SettingCategory : uint8_t {
46 SC_NONE = 0,
47
48 /* Filters for the list */
49 SC_BASIC_LIST = 1 << 0,
51 SC_EXPERT_LIST = 1 << 2,
52
53 /* Setting classification */
57
58 SC_END,
59};
60
71
72struct IniItem;
73
79template <typename T, typename TTo>
80concept ConvertibleThroughBaseOrUnderlyingOrTo = ConvertibleThroughBaseOrTo<T, TTo> || (is_scoped_enum_v<T> && std::is_convertible_v<std::underlying_type_t<T>, TTo>);
81
83struct SettingDesc {
84 SettingDesc(const SaveLoad &save, SettingFlags flags, bool startup) :
87 virtual ~SettingDesc() = default;
88
90 bool startup;
92
93 bool IsEditable(bool do_command = false) const;
94 SettingType GetType() const;
95
100 constexpr const std::string &GetName() const
101 {
102 return this->save.name;
103 }
104
109 virtual bool IsIntSetting() const { return false; }
110
115 virtual bool IsStringSetting() const { return false; }
116
117 const struct IntSettingDesc *AsIntSetting() const;
118 const struct StringSettingDesc *AsStringSetting() const;
119
125 virtual std::string FormatValue(const void *object) const = 0;
126
132 virtual void ParseValue(const IniItem *item, void *object) const = 0;
133
143 virtual bool IsSameValue(const IniItem *item, void *object) const = 0;
144
151 virtual bool IsDefaultValue(void *object) const = 0;
152
157 virtual void ResetToDefault(void *object) const = 0;
158};
159
161struct IntSettingDesc : SettingDesc {
167 using GetTitleCallback = StringID(const IntSettingDesc &sd);
168
174 using GetHelpCallback = StringID(const IntSettingDesc &sd);
175
182 using GetValueParamsCallback = std::pair<StringParameter, StringParameter>(const IntSettingDesc &sd, int32_t value);
183
189 using GetDefaultValueCallback = int32_t(const IntSettingDesc &sd);
190
196 using GetRangeCallback = std::tuple<int32_t, uint32_t>(const IntSettingDesc &sd);
197
206 using PreChangeCheck = bool(int32_t &value);
211 using PostChangeCallback = void(int32_t new_value);
212
213 template <ConvertibleThroughBaseOrUnderlyingOrTo<int32_t> Tdef, ConvertibleThroughBaseOrUnderlyingOrTo<int32_t> Tmin, ConvertibleThroughBaseOrUnderlyingOrTo<uint32_t> Tmax, ConvertibleThroughBaseOrUnderlyingOrTo<int32_t> Tinterval>
214 IntSettingDesc(const SaveLoad &save, SettingFlags flags, bool startup, Tdef def,
215 Tmin min, Tmax max, Tinterval interval, StringID str, StringID str_help, StringID str_val,
217 GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, GetValueParamsCallback get_value_params_cb,
219 SettingDesc(save, flags, startup),
222 get_title_cb(get_title_cb), get_help_cb(get_help_cb), get_value_params_cb(get_value_params_cb),
223 get_def_cb(get_def_cb), get_range_cb(get_range_cb)
224 {
225 if constexpr (ConvertibleThroughBase<Tdef>) {
226 this->def = def.base();
227 } else if constexpr (is_scoped_enum_v<Tdef>) {
228 this->def = to_underlying(def);
229 } else {
230 this->def = def;
231 }
232
233 if constexpr (ConvertibleThroughBase<Tmin>) {
234 this->min = min.base();
235 } else if constexpr (is_scoped_enum_v<Tmin>) {
236 this->min = to_underlying(min);
237 } else {
238 this->min = min;
239 }
240
241 if constexpr (ConvertibleThroughBase<Tmax>) {
242 this->max = max.base();
243 } else if constexpr (is_scoped_enum_v<Tmax>) {
244 this->max = to_underlying(max);
245 } else {
246 this->max = max;
247 }
248
249 if constexpr (ConvertibleThroughBase<Tinterval>) {
250 this->interval = interval.base();
251 } else if constexpr (is_scoped_enum_v<Tinterval>) {
253 } else {
254 this->interval = interval;
255 }
256 }
257
258 int32_t def;
259 int32_t min;
260 uint32_t max;
261 int32_t interval;
268 GetTitleCallback *get_title_cb;
269 GetHelpCallback *get_help_cb;
270 GetValueParamsCallback *get_value_params_cb;
272 GetRangeCallback *get_range_cb;
273
274 StringID GetTitle() const;
275 StringID GetHelp() const;
276 std::pair<StringParameter, StringParameter> GetValueParams(int32_t value) const;
277 int32_t GetDefaultValue() const;
278 std::tuple<int32_t, uint32_t> GetRange() const;
279
284 virtual bool IsBoolSetting() const { return false; }
285 bool IsIntSetting() const override { return true; }
286
287 void ChangeValue(const void *object, int32_t newvalue) const;
288 void MakeValueValidAndWrite(const void *object, int32_t value) const;
289
290 virtual int32_t ParseValue(std::string_view str) const;
291 std::string FormatValue(const void *object) const override;
292 void ParseValue(const IniItem *item, void *object) const override;
293 static std::optional<int32_t> ParseSingleValue(std::string_view str, int32_t min, uint32_t max);
294
295 bool IsSameValue(const IniItem *item, void *object) const override;
296 bool IsDefaultValue(void *object) const override;
297 void ResetToDefault(void *object) const override;
298 int32_t Read(const void *object) const;
299
300private:
301 void MakeValueValid(int32_t &value) const;
302 void Write(const void *object, int32_t value) const;
303};
304
306struct BoolSettingDesc : IntSettingDesc {
307 BoolSettingDesc(const SaveLoad &save, SettingFlags flags, bool startup, bool def,
310 GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, GetValueParamsCallback get_value_params_cb,
312 IntSettingDesc(save, flags, startup, def ? 1 : 0, 0, 1, 0, str, str_help, str_val, cat,
313 pre_check, post_callback, get_title_cb, get_help_cb, get_value_params_cb, get_def_cb, nullptr) {}
314
315 static std::optional<bool> ParseSingleValue(std::string_view str);
316
317 bool IsBoolSetting() const override { return true; }
318 int32_t ParseValue(std::string_view str) const override;
319 std::string FormatValue(const void *object) const override;
320};
321
323struct OneOfManySettingDesc : IntSettingDesc {
324 typedef std::optional<uint32_t> OnConvert(std::string_view value);
325
326 template <ConvertibleThroughBaseOrUnderlyingOrTo<int32_t> Tdef, ConvertibleThroughBaseOrUnderlyingOrTo<uint32_t> Tmax>
327 OneOfManySettingDesc(const SaveLoad &save, SettingFlags flags, bool startup, Tdef def,
330 GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, GetValueParamsCallback get_value_params_cb,
331 GetDefaultValueCallback get_def_cb, std::initializer_list<std::string_view> many, OnConvert *many_cnvt) :
332 IntSettingDesc(save, flags, startup, def, 0, max, 0, str, str_help, str_val, cat,
333 pre_check, post_callback, get_title_cb, get_help_cb, get_value_params_cb, get_def_cb, nullptr), many_cnvt(many_cnvt)
334 {
335 for (auto one : many) this->many.push_back(one);
336 }
337
338 std::vector<std::string_view> many;
340
341 static std::optional<uint32_t> ParseSingleValue(std::string_view str, std::span<const std::string_view> many);
342 std::string FormatSingleValue(uint id) const;
343
344 int32_t ParseValue(std::string_view str) const override;
345 std::string FormatValue(const void *object) const override;
346};
347
349struct ManyOfManySettingDesc : OneOfManySettingDesc {
350 template <ConvertibleThroughBaseOrTo<int32_t> Tdef>
351 ManyOfManySettingDesc(const SaveLoad &save, SettingFlags flags, bool startup,
354 GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, GetValueParamsCallback get_value_params_cb,
355 GetDefaultValueCallback get_def_cb, std::initializer_list<std::string_view> many, OnConvert *many_cnvt) :
356 OneOfManySettingDesc(save, flags, startup, def, (1 << many.size()) - 1, str, str_help,
357 str_val, cat, pre_check, post_callback, get_title_cb, get_help_cb, get_value_params_cb, get_def_cb, many, many_cnvt) {}
358
359 int32_t ParseValue(std::string_view str) const override;
360 std::string FormatValue(const void *object) const override;
361};
362
364struct StringSettingDesc : SettingDesc {
373 typedef bool PreChangeCheck(std::string &value);
378 typedef void PostChangeCallback(const std::string &value);
379
380 StringSettingDesc(const SaveLoad &save, SettingFlags flags, bool startup, std::string_view def,
382 SettingDesc(save, flags, startup), def(def), max_length(max_length),
384
385 std::string_view def;
386 uint32_t max_length;
389
390 bool IsStringSetting() const override { return true; }
391 void ChangeValue(const void *object, std::string &&newval) const;
392
393 std::string FormatValue(const void *object) const override;
394 void ParseValue(const IniItem *item, void *object) const override;
395 bool IsSameValue(const IniItem *item, void *object) const override;
396 bool IsDefaultValue(void *object) const override;
397 void ResetToDefault(void *object) const override;
398 const std::string &Read(const void *object) const;
399
400private:
401 void MakeValueValid(std::string &str) const;
402 void Write(const void *object, std::string_view str) const;
403};
404
406struct ListSettingDesc : SettingDesc {
407 ListSettingDesc(const SaveLoad &save, SettingFlags flags, bool startup, std::string_view def) :
408 SettingDesc(save, flags, startup), def(def) {}
409
410 std::string_view def;
411
412 std::string FormatValue(const void *object) const override;
413 void ParseValue(const IniItem *item, void *object) const override;
414 bool IsSameValue(const IniItem *item, void *object) const override;
415 bool IsDefaultValue(void *object) const override;
416 void ResetToDefault(void *object) const override;
417};
418
420struct NullSettingDesc : SettingDesc {
421 NullSettingDesc(const SaveLoad &save) :
422 SettingDesc(save, SettingFlag::NotInConfig, false) {}
423
424 std::string FormatValue(const void *) const override { NOT_REACHED(); }
425 void ParseValue(const IniItem *, void *) const override { NOT_REACHED(); }
426 bool IsSameValue(const IniItem *, void *) const override { NOT_REACHED(); }
427 bool IsDefaultValue(void *) const override { NOT_REACHED(); }
428 void ResetToDefault(void *) const override { NOT_REACHED(); }
429};
430
431typedef std::variant<IntSettingDesc, BoolSettingDesc, OneOfManySettingDesc, ManyOfManySettingDesc, StringSettingDesc, ListSettingDesc, NullSettingDesc> SettingVariant;
432
438static constexpr const SettingDesc *GetSettingDesc(const SettingVariant &desc)
439{
440 return std::visit([](auto&& arg) -> const SettingDesc * { return &arg; }, desc);
441}
442
443typedef std::span<const SettingVariant> SettingTable;
444
445const SettingDesc *GetSettingFromName(std::string_view name);
446void GetSaveLoadFromSettingTable(SettingTable settings, std::vector<SaveLoad> &saveloads);
447SettingTable GetSaveLoadSettingTable();
448bool SetSettingValue(const IntSettingDesc *sd, int32_t value, bool force_newgame = false);
449bool SetSettingValue(const StringSettingDesc *sd, std::string_view value, bool force_newgame = false);
450
451std::vector<const SettingDesc *> GetFilteredSettingCollection(std::function<bool(const SettingDesc &desc)> func);
452
453#endif /* SETTINGS_INTERNAL_H */
Enum-as-bit-set wrapper.
Type is convertible to TTo, either directly or through ConvertibleThroughBase.
Type is convertible to TTo, either directly, through ConvertibleThroughBase or through to_underlying.
A type is considered 'convertible through base()' when it has a 'base()' function that returns someth...
Type (helpers) for enums.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23).
Definition enum_type.hpp:21
constexpr bool is_scoped_enum_v
Implementation of std::is_scoped_enum_v (from C++23).
Definition enum_type.hpp:24
fluid_settings_t * settings
FluidSynth settings handle.
Functions/types related to saving and loading games.
const SettingDesc * GetSettingFromName(std::string_view name)
Given a name of any setting, return any setting description of it.
SettingFlag
Flags describing the behaviour of a setting.
@ NotInSave
Do not save with savegame, basically client-based.
@ GuiCurrency
The number represents money, so when reading value multiply by exchange rate.
@ Sandbox
This setting is a sandbox setting.
@ SceneditOnly
This setting can only be changed in the scenario editor.
@ PerCompany
This setting can be different for each company (saved in company struct).
@ NewgameOnly
This setting cannot be changed in a game.
@ GuiZeroIsSpecial
A value of zero is possible and has a custom string (the one after "strval").
@ NoNetwork
This setting does not apply to network games; it may not be changed during the game.
@ NotInConfig
Do not save to config file.
@ GuiDropdown
The value represents a limited number of string-options (internally integer) presented as dropdown.
@ SceneditToo
This setting can be changed in the scenario editor (only makes sense when SettingFlag::NewgameOnly is...
@ NoNetworkSync
Do not synchronize over network (but it is saved if SettingFlag::NotInSave is not set).
@ NetworkOnly
This setting only applies to network games.
std::vector< const SettingDesc * > GetFilteredSettingCollection(std::function< bool(const SettingDesc &desc)> func)
Get a collection of settings matching a custom filter.
SettingType
Type of settings for filtering.
@ ST_CLIENT
Client setting.
@ ST_ALL
Used in setting filter to match all types.
@ ST_GAME
Game setting.
@ ST_COMPANY
Company setting.
EnumBitSet< SettingFlag, uint16_t > SettingFlags
Bitset of SettingFlag elements.
void GetSaveLoadFromSettingTable(SettingTable settings, std::vector< SaveLoad > &saveloads)
Get the SaveLoad for all settings in the settings table.
bool SetSettingValue(const IntSettingDesc *sd, int32_t value, bool force_newgame=false)
Top function to save the new value of an element of the Settings struct.
SettingTable GetSaveLoadSettingTable()
Create a single table with all settings that should be stored/loaded in the savegame.
SettingCategory
A SettingCategory defines a grouping of the settings.
@ SC_ADVANCED
Advanced settings are part of advanced and expert list.
@ SC_EXPERT
Expert settings can only be seen in the expert list.
@ SC_ADVANCED_LIST
Settings displayed in the list of advanced settings.
@ SC_EXPERT_LIST
Settings displayed in the list of expert settings.
@ SC_BASIC_LIST
Settings displayed in the list of basic settings.
@ SC_BASIC
Basic settings are part of all lists.
static constexpr const SettingDesc * GetSettingDesc(const SettingVariant &desc)
Helper to convert the type of the iterated settings description to a pointer to it.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
std::string FormatValue(const void *object) const override
Format the value of the setting associated with this object.
Definition settings.cpp:771
bool IsBoolSetting() const override
Check whether this setting is a boolean type setting.
static std::optional< bool > ParseSingleValue(std::string_view str)
Find whether a string was a boolean true or a boolean false.
Definition settings.cpp:232
int32_t ParseValue(std::string_view str) const override
Convert a string representation (external) of an integer-like setting to an integer.
Definition settings.cpp:434
A single "line" in an ini file.
Definition ini_type.h:23
Base integer type, including boolean, settings.
StringID(const IntSettingDesc &sd) GetHelpCallback
Callback to get the help description for the settings panel of this setting.
std::tuple< int32_t, uint32_t >(const IntSettingDesc &sd) GetRangeCallback
Callback to get range of valid values for this setting.
static std::optional< int32_t > ParseSingleValue(std::string_view str, int32_t min, uint32_t max)
Find whether a string was a valid int setting.
Definition settings.cpp:194
StringID str_help
(Translated) string with help text; gui only.
StringID str_val
(Translated) first string describing the value.
void MakeValueValid(int32_t &value) const
Make the value valid given the limitations of this setting.
Definition settings.cpp:526
void(int32_t new_value) PostChangeCallback
A callback to denote that a setting has been changed.
void ResetToDefault(void *object) const override
Reset the setting to its default value.
Definition settings.cpp:790
std::string FormatValue(const void *object) const override
Format the value of the setting associated with this object.
Definition settings.cpp:760
int32_t def
default value given when none is present
SettingCategory cat
assigned categories of the setting
bool IsIntSetting() const override
Check whether this setting is an integer type setting.
std::tuple< int32_t, uint32_t > GetRange() const
Get the min/max range for the setting.
Definition settings.cpp:500
StringID GetTitle() const
Get the title of the setting.
Definition settings.cpp:450
StringID(const IntSettingDesc &sd) GetTitleCallback
Callback to get the title for the settings panel of this setting.
void ChangeValue(const void *object, int32_t newvalue) const
Handle changing a value.
uint32_t max
maximum values
GetDefaultValueCallback * get_def_cb
Callback to set the correct default value.
bool IsSameValue(const IniItem *item, void *object) const override
Check whether the value in the Ini item is the same as is saved in this setting in the object.
Definition settings.cpp:777
int32_t min
minimum values
std::pair< StringParameter, StringParameter >(const IntSettingDesc &sd, int32_t value) GetValueParamsCallback
Callback to parameters for string formatting for this setting.
bool(int32_t &value) PreChangeCheck
A check to be performed before the setting gets changed.
PreChangeCheck * pre_check
Callback to check for the validity of the setting.
int32_t GetDefaultValue() const
Get the default value of the setting.
Definition settings.cpp:491
void Write(const void *object, int32_t value) const
Set the value of a setting.
Definition settings.cpp:580
StringID GetHelp() const
Get the help text of the setting.
Definition settings.cpp:459
virtual bool IsBoolSetting() const
Check whether this setting is a boolean type setting.
PostChangeCallback * post_callback
Callback when the setting has been changed.
StringID str
(translated) string with descriptive text; gui and console
void MakeValueValidAndWrite(const void *object, int32_t value) const
Make the value valid and then write it to the setting.
Definition settings.cpp:511
int32_t(const IntSettingDesc &sd) GetDefaultValueCallback
Callback to get default value for this setting.
std::pair< StringParameter, StringParameter > GetValueParams(int32_t value) const
Get parameters for drawing the value of the setting.
Definition settings.cpp:469
int32_t Read(const void *object) const
Read the integer from the the actual setting.
Definition settings.cpp:591
int32_t interval
the interval to use between settings in the 'settings' window. If interval is '0' the interval is dyn...
virtual int32_t ParseValue(std::string_view str) const
Convert a string representation (external) of an integer-like setting to an integer.
Definition settings.cpp:390
bool IsDefaultValue(void *object) const override
Check whether the value is the same as the default value.
Definition settings.cpp:784
void ParseValue(const IniItem *item, void *object) const override
Parse/read the value from the Ini item into the setting associated with this object.
Definition settings.cpp:698
void ResetToDefault(void *object) const override
Reset the setting to its default value.
Definition settings.cpp:844
bool IsSameValue(const IniItem *item, void *object) const override
Check whether the value in the Ini item is the same as is saved in this setting in the object.
Definition settings.cpp:832
std::string_view def
default value given when none is present
std::string FormatValue(const void *object) const override
Convert a list to a string representation.
Definition settings.cpp:333
bool IsDefaultValue(void *object) const override
Check whether the value is the same as the default value.
Definition settings.cpp:838
int32_t ParseValue(std::string_view str) const override
Convert a string representation (external) of an integer-like setting to an integer.
Definition settings.cpp:423
std::string FormatValue(const void *object) const override
Format the value of the setting associated with this object.
Definition settings.cpp:370
bool IsSameValue(const IniItem *, void *) const override
Check whether the value in the Ini item is the same as is saved in this setting in the object.
void ParseValue(const IniItem *, void *) const override
Parse/read the value from the Ini item into the setting associated with this object.
std::string FormatValue(const void *) const override
Format the value of the setting associated with this object.
bool IsDefaultValue(void *) const override
Check whether the value is the same as the default value.
void ResetToDefault(void *) const override
Reset the setting to its default value.
OnConvert * many_cnvt
callback procedure when loading value mechanism fails
std::optional< uint32_t > OnConvert(std::string_view value)
callback prototype for conversion error
std::string FormatValue(const void *object) const override
Format the value of the setting associated with this object.
Definition settings.cpp:364
static std::optional< uint32_t > ParseSingleValue(std::string_view str, std::span< const std::string_view > many)
Find the index value of a ONEofMANY type in a string.
Definition settings.cpp:214
std::vector< std::string_view > many
possible values for this type
int32_t ParseValue(std::string_view str) const override
Convert a string representation (external) of an integer-like setting to an integer.
Definition settings.cpp:409
SaveLoad type struct.
Definition saveload.h:757
std::string name
Name of this field (optional, used for tables).
Definition saveload.h:758
Properties of config file settings.
virtual void ParseValue(const IniItem *item, void *object) const =0
Parse/read the value from the Ini item into the setting associated with this object.
bool IsEditable(bool do_command=false) const
Check whether the setting is editable in the current gamemode.
Definition settings.cpp:918
SettingFlags flags
Handles how a setting would show up in the GUI (text/currency, etc.).
virtual bool IsStringSetting() const
Check whether this setting is an string type setting.
virtual void ResetToDefault(void *object) const =0
Reset the setting to its default value.
SettingType GetType() const
Return the type of the setting.
Definition settings.cpp:935
constexpr const std::string & GetName() const
Get the name of this setting.
bool startup
Setting has to be loaded directly at startup?.
virtual std::string FormatValue(const void *object) const =0
Format the value of the setting associated with this object.
const struct StringSettingDesc * AsStringSetting() const
Get the setting description of this setting as a string setting.
Definition settings.cpp:955
virtual ~SettingDesc()=default
Ensure the destructor of the sub classes are called as well.
virtual bool IsSameValue(const IniItem *item, void *object) const =0
Check whether the value in the Ini item is the same as is saved in this setting in the object.
virtual bool IsDefaultValue(void *object) const =0
Check whether the value is the same as the default value.
SaveLoad save
Internal structure (going to savegame, parts to config).
virtual bool IsIntSetting() const
Check whether this setting is an integer type setting.
const struct IntSettingDesc * AsIntSetting() const
Get the setting description of this setting as an integer setting.
Definition settings.cpp:945
String settings.
const std::string & Read(const void *object) const
Read the string from the the actual setting.
Definition settings.cpp:630
void PostChangeCallback(const std::string &value)
A callback to denote that a setting has been changed.
std::string_view def
Default value given when none is present.
void Write(const void *object, std::string_view str) const
Write a string to the actual setting.
Definition settings.cpp:620
uint32_t max_length
Maximum length of the string, 0 means no maximum length.
PreChangeCheck * pre_check
Callback to check for the validity of the setting.
void ChangeValue(const void *object, std::string &&newval) const
Handle changing a string value.
void MakeValueValid(std::string &str) const
Make the value valid given the limitations of this setting.
Definition settings.cpp:604
bool IsSameValue(const IniItem *item, void *object) const override
Check whether the value in the Ini item is the same as is saved in this setting in the object.
Definition settings.cpp:811
bool IsDefaultValue(void *object) const override
Check whether the value is the same as the default value.
Definition settings.cpp:821
PostChangeCallback * post_callback
Callback when the setting has been changed.
void ResetToDefault(void *object) const override
Reset the setting to its default value.
Definition settings.cpp:827
bool PreChangeCheck(std::string &value)
A check to be performed before the setting gets changed.
std::string FormatValue(const void *object) const override
Format the value of the setting associated with this object.
Definition settings.cpp:795
bool IsStringSetting() const override
Check whether this setting is an string type setting.
void ParseValue(const IniItem *item, void *object) const override
Parse/read the value from the Ini item into the setting associated with this object.
Definition settings.cpp:691