public static DateAndOrTimeRangeSpecJSON from_WhenJSON_json(WhenJSON ancestor, bool ignore_extras) { Debug.Assert(ancestor != null); DateAndOrTimeRangeSpecJSON result; { HoldingGenerator handler = new HoldingGenerator("Type DateAndOrTimeRangeSpec", ignore_extras); ancestor.write_as_json(handler); result = handler.value; } return(result); }
protected override void finish() { WhenJSON result = new WhenJSON(); 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.extraWhenAppendPair(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 void finish(WhenJSON result) { if (fieldGeneratorInstant.have_value) { result.setInstant(fieldGeneratorInstant.value); fieldGeneratorInstant.have_value = false; } if (fieldGeneratorStart.have_value) { result.setStart(fieldGeneratorStart.value); fieldGeneratorStart.have_value = false; } if (fieldGeneratorEnd.have_value) { result.setEnd(fieldGeneratorEnd.value); fieldGeneratorEnd.have_value = false; } if (fieldGeneratorDetails.have_value) { result.setDetails(fieldGeneratorDetails.value); fieldGeneratorDetails.have_value = false; } }
protected override void handle_result(WhenJSON new_result) { handle_result((DateAndOrTimeRangeSpecJSON )new_result); }
protected override void handle_result(WhenJSON result) { top.value.Add(result); }
protected override void handle_result(WhenJSON result) { //@@@ Debug.Assert(!have_value); have_value = true; value = result; }
protected abstract void handle_result(WhenJSON new_result);