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

Method Load

vkconfig_core/setting_flags.cpp:34–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 : SettingMeta(layer, key, setting_type) {}
33
34bool SettingMetaEnumeration::Load(const QJsonObject& json_setting) {
35 const QJsonArray& json_array_flags = ReadArray(json_setting, "flags");
36 for (int i = 0, n = json_array_flags.size(); i < n; ++i) {
37 const QJsonObject& json_object = json_array_flags[i].toObject();
38
39 SettingEnumValue setting_enum_value;
40 setting_enum_value.key = ReadStringValue(json_object, "key");
41 setting_enum_value.platform_flags = this->platform_flags;
42 setting_enum_value.status = this->status;
43 setting_enum_value.view = this->view;
44 LoadMetaHeader(setting_enum_value, json_object);
45
46 this->enum_values.push_back(setting_enum_value);
47
48 for (std::size_t i = 0, n = this->enum_values.size(); i < n; ++i) {
49 if (this->enum_values[i].key != setting_enum_value.key) {
50 continue;
51 }
52
53 if (json_object.value("settings") != QJsonValue::Undefined) {
54 this->layer.AddSettingsSet(this->enum_values[i].settings, this, json_object.value("settings"));
55 }
56 }
57 }
58 return true;
59}
60
61bool SettingMetaEnumeration::Equal(const SettingMeta& other) const {
62 if (!SettingMeta::Equal(other)) return false;

Callers

nothing calls this directly

Calls 6

ReadArrayFunction · 0.85
ReadStringValueFunction · 0.85
LoadMetaHeaderFunction · 0.85
ReadStringArrayFunction · 0.85
ReadBoolValueFunction · 0.85
AddSettingsSetMethod · 0.80

Tested by

no test coverage detected