MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / Load

Method Load

vkconfig_core/setting_float.cpp:39–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39bool SettingMetaFloat::Load(const QJsonObject& json_setting) {
40 this->default_value = ReadFloatValue(json_setting, "default");
41 if (json_setting.value("range") != QJsonValue::Undefined) {
42 const QJsonObject& json_setting_range = ReadObject(json_setting, "range");
43 if (json_setting_range.value("min") != QJsonValue::Undefined) {
44 this->min_value = ReadFloatValue(json_setting_range, "min");
45 }
46 if (json_setting_range.value("max") != QJsonValue::Undefined) {
47 this->max_value = ReadFloatValue(json_setting_range, "max");
48 }
49 if (json_setting_range.value("precision") != QJsonValue::Undefined) {
50 this->precision = ReadIntValue(json_setting_range, "precision");
51 }
52 if (json_setting_range.value("width") != QJsonValue::Undefined) {
53 this->width = ReadIntValue(json_setting_range, "width");
54 }
55 }
56 if (json_setting.value("unit") != QJsonValue::Undefined) {
57 this->unit = ReadStringValue(json_setting, "unit");
58 }
59
60 return true;
61}
62
63std::string SettingMetaFloat::Export(ExportMode export_mode) const {
64 (void)export_mode;

Callers

nothing calls this directly

Calls 5

ReadFloatValueFunction · 0.85
ReadObjectFunction · 0.85
ReadIntValueFunction · 0.85
ReadStringValueFunction · 0.85
ReadBoolValueFunction · 0.85

Tested by

no test coverage detected