Closed ChristianVonMach closed 2 years ago
reading of values is done similiere to Parameters
.
Settings sets;
std::cout << sets.get("physical_parameters/t_end") << "\n";
std::cout << sets.get_real("physical_parameters/t_end") << "\n";
sets.set("physical_parameters/t_end", "101.314");
std::cout << sets.get_real("physical_parameters/t_end") << "\n";
Output
100.
100
101.314
Logs
[2021-11-18 00:46:36.658] [P8Settings] [debug] first time reading: "physical_parameters/t_end" with value: " 100. "
[2021-11-18 00:46:36.658] [P8Settings] [debug] set: "physical_parameters/t_end" to value: " 100. "
[2021-11-18 00:46:36.658] [P8Settings] [debug] reading: "physical_parameters/t_end" with value: " 100. "
[2021-11-18 00:46:36.658] [P8Settings] [debug] reading: "physical_parameters/t_end" with value: " 100. "
[2021-11-18 00:46:36.658] [P8Settings] [debug] set: "physical_parameters/t_end" to value: "101.314"
[2021-11-18 00:46:36.658] [P8Settings] [debug] reading: "physical_parameters/t_end" with value: "101.314"
attempt to implement a proxy for
Parameters
bei classSettings
.Settings
uses a hash_map for fast access of already read values and the possibility to overwrite settings at runtime. InternSettings
continues usingParameters
to read the XML.