コード例 #1
0
    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);
    }
コード例 #2
0
        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);
        }
コード例 #3
0
 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;
     }
 }
コード例 #4
0
 protected override void handle_result(WhenJSON new_result)
 {
     handle_result((DateAndOrTimeRangeSpecJSON )new_result);
 }
コード例 #5
0
 protected override void handle_result(WhenJSON result)
 {
     top.value.Add(result);
 }
コード例 #6
0
        protected override void handle_result(WhenJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
コード例 #7
0
 protected abstract void handle_result(WhenJSON new_result);