Example #1
0
        protected override void finish()
        {
            UnitConverterQueryStateJSON result = new UnitConverterQueryStateJSON();

            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.extraUnitConverterQueryStateAppendPair(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);
        }
Example #2
0
 protected void finish(UnitConverterQueryStateJSON result)
 {
     if (fieldGeneratorUnitConverterCommandKind.have_value)
     {
         result.setUnitConverterCommandKind();
         fieldGeneratorUnitConverterCommandKind.have_value = false;
     }
     else if ((!(result.hasUnitConverterCommandKind())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"UnitConverterCommandKind\" field was missing.");
     }
     if (fieldGeneratorInputValue.have_value)
     {
         result.initInputValue();
         int count = fieldGeneratorInputValue.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendInputValue(fieldGeneratorInputValue.value[num]);
         }
         fieldGeneratorInputValue.value.Clear();
         fieldGeneratorInputValue.have_value = false;
     }
     else if ((!(result.hasInputValue())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"InputValue\" field was missing.");
     }
     if (fieldGeneratorOutputValue.have_value)
     {
         result.initOutputValue();
         int count = fieldGeneratorOutputValue.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendOutputValue(fieldGeneratorOutputValue.value[num]);
         }
         fieldGeneratorOutputValue.value.Clear();
         fieldGeneratorOutputValue.have_value = false;
     }
     else if ((!(result.hasOutputValue())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"OutputValue\" field was missing.");
     }
 }
Example #3
0
 protected override void handle_result(UnitConverterQueryStateJSON result)
 {
     top.value.Add(result);
 }
Example #4
0
        protected override void handle_result(UnitConverterQueryStateJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
Example #5
0
 protected abstract void handle_result(UnitConverterQueryStateJSON new_result);