Beispiel #1
0
        protected override void finish()
        {
            TimeBetweenLocationsConversationStateJSON result = new TimeBetweenLocationsConversationStateJSON();

            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.extraTimeBetweenLocationsConversationStateAppendPair(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);
        }
Beispiel #2
0
 protected void finish(TimeBetweenLocationsConversationStateJSON result)
 {
     if (fieldGeneratorDateAndTimeKind.have_value)
     {
         result.setDateAndTimeKind();
         fieldGeneratorDateAndTimeKind.have_value = false;
     }
     else if ((!(result.hasDateAndTimeKind())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DateAndTimeKind\" field was missing.");
     }
     if (fieldGeneratorSourceMapLocation.have_value)
     {
         result.setSourceMapLocation(fieldGeneratorSourceMapLocation.value);
         fieldGeneratorSourceMapLocation.have_value = false;
     }
     if (fieldGeneratorDestinationMapLocation.have_value)
     {
         result.setDestinationMapLocation(fieldGeneratorDestinationMapLocation.value);
         fieldGeneratorDestinationMapLocation.have_value = false;
     }
     else if ((!(result.hasDestinationMapLocation())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DestinationMapLocation\" field was missing.");
     }
     if (fieldGeneratorMapLocation.have_value)
     {
         result.setMapLocation(fieldGeneratorMapLocation.value);
         fieldGeneratorMapLocation.have_value = false;
     }
     else if ((!(result.hasMapLocation())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"MapLocation\" field was missing.");
     }
     if (fieldGeneratorOffset.have_value)
     {
         result.setOffsetText(fieldGeneratorOffset.value);
         fieldGeneratorOffset.have_value = false;
     }
     else if ((!(result.hasOffset())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Offset\" field was missing.");
     }
     if (fieldGeneratorUnits.have_value)
     {
         result.setUnits(fieldGeneratorUnits.value);
         fieldGeneratorUnits.have_value = false;
     }
     else if ((!(result.hasUnits())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Units\" field was missing.");
     }
     if (fieldGeneratorDateTimeRangeSpec.have_value)
     {
         result.setDateTimeRangeSpec(fieldGeneratorDateTimeRangeSpec.value);
         fieldGeneratorDateTimeRangeSpec.have_value = false;
     }
     else if ((!(result.hasDateTimeRangeSpec())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DateTimeRangeSpec\" field was missing.");
     }
     if (fieldGeneratorSourceDateAndTime.have_value)
     {
         result.setSourceDateAndTime(fieldGeneratorSourceDateAndTime.value);
         fieldGeneratorSourceDateAndTime.have_value = false;
     }
     else if ((!(result.hasSourceDateAndTime())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"SourceDateAndTime\" field was missing.");
     }
     if (fieldGeneratorDestinationDateAndTime.have_value)
     {
         result.setDestinationDateAndTime(fieldGeneratorDestinationDateAndTime.value);
         fieldGeneratorDestinationDateAndTime.have_value = false;
     }
     else if ((!(result.hasDestinationDateAndTime())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"DestinationDateAndTime\" field was missing.");
     }
 }
Beispiel #3
0
        protected override void handle_result(TimeBetweenLocationsConversationStateJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
Beispiel #4
0
 protected override void handle_result(TimeBetweenLocationsConversationStateJSON result)
 {
     top.value.Add(result);
 }
Beispiel #5
0
 protected abstract void handle_result(TimeBetweenLocationsConversationStateJSON new_result);