private void fromJSONCompactDeviceSpecifier(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); HomeAutomationCompactDeviceSpecifierJSON convert_classy = HomeAutomationCompactDeviceSpecifierJSON.from_json(json_value, ignore_extras, true); setCompactDeviceSpecifier(convert_classy); }
public void setCompactDeviceSpecifier(HomeAutomationCompactDeviceSpecifierJSON new_value) { if (flagHasCompactDeviceSpecifier) { } flagHasCompactDeviceSpecifier = true; storeCompactDeviceSpecifier = new_value; }
protected override void finish() { HomeAutomationCompactDeviceSpecifierJSON result = new HomeAutomationCompactDeviceSpecifierJSON(); Debug.Assert(result != null); finish(result); int extra_count = unknownFieldGenerator.field_names.Count; Debug.Assert(extra_count == unknownFieldGenerator.field_values.Count); for (int extra_num = 0; extra_num < extra_count; ++extra_num) { result.extraHomeAutomationCompactDeviceSpecifierAppendPair(unknownFieldGenerator.field_names[extra_num], unknownFieldGenerator.field_values[extra_num]); } unknownFieldGenerator.field_names.Clear(); unknownFieldGenerator.field_values.Clear(); unknownFieldGenerator.index = new Dictionary <string, JSONValue>(); handle_result(result); }
protected override void handle_result(HomeAutomationCompactDeviceSpecifierJSON result) { top.value.Add(result); }
protected override void handle_result(HomeAutomationCompactDeviceSpecifierJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(HomeAutomationCompactDeviceSpecifierJSON new_result);
protected void finish(HomeAutomationCompactDeviceSpecifierJSON result) { if (fieldGeneratorSpecifier.have_value) { result.setSpecifier(fieldGeneratorSpecifier.value); fieldGeneratorSpecifier.have_value = false; } else if ((!(result.hasSpecifier())) && !allow_incomplete) { error("When parsing the object for %what%, the \"Specifier\" field was missing."); } if (fieldGeneratorGroupItems.have_value) { result.initGroupItems(); int count = fieldGeneratorGroupItems.value.Count; for (int num = 0; num < count; ++num) { result.appendGroupItems(fieldGeneratorGroupItems.value[num]); } fieldGeneratorGroupItems.value.Clear(); fieldGeneratorGroupItems.have_value = false; } if (fieldGeneratorDeviceItems.have_value) { result.initDeviceItems(); int count = fieldGeneratorDeviceItems.value.Count; for (int num = 0; num < count; ++num) { result.appendDeviceItems(fieldGeneratorDeviceItems.value[num]); } fieldGeneratorDeviceItems.value.Clear(); fieldGeneratorDeviceItems.have_value = false; } if (fieldGeneratorExcludedGroupItems.have_value) { result.initExcludedGroupItems(); int count = fieldGeneratorExcludedGroupItems.value.Count; for (int num = 0; num < count; ++num) { result.appendExcludedGroupItems(fieldGeneratorExcludedGroupItems.value[num]); } fieldGeneratorExcludedGroupItems.value.Clear(); fieldGeneratorExcludedGroupItems.have_value = false; } if (fieldGeneratorExcludedDeviceItems.have_value) { result.initExcludedDeviceItems(); int count = fieldGeneratorExcludedDeviceItems.value.Count; for (int num = 0; num < count; ++num) { result.appendExcludedDeviceItems(fieldGeneratorExcludedDeviceItems.value[num]); } fieldGeneratorExcludedDeviceItems.value.Clear(); fieldGeneratorExcludedDeviceItems.have_value = false; } if (fieldGeneratorType.have_value) { result.setType(fieldGeneratorType.value); fieldGeneratorType.have_value = false; } if (fieldGeneratorHint.have_value) { result.setHint(fieldGeneratorHint.value); fieldGeneratorHint.have_value = false; } if (fieldGeneratorUnambiguousGroups.have_value) { result.setUnambiguousGroups(fieldGeneratorUnambiguousGroups.value); fieldGeneratorUnambiguousGroups.have_value = false; } if (fieldGeneratorUnambiguousDevices.have_value) { result.setUnambiguousDevices(fieldGeneratorUnambiguousDevices.value); fieldGeneratorUnambiguousDevices.have_value = false; } }