示例#1
0
        protected override void finish()
        {
            StockMarketConversationJSON result = new StockMarketConversationJSON();

            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.extraStockMarketConversationAppendPair(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);
        }
示例#2
0
 protected void finish(StockMarketConversationJSON result)
 {
     if (fieldGeneratorStockAttributes.have_value)
     {
         result.setStockAttributes(fieldGeneratorStockAttributes.value);
         fieldGeneratorStockAttributes.have_value = false;
     }
     else if ((!(result.hasStockAttributes())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"StockAttributes\" field was missing.");
     }
     if (fieldGeneratorCompoundAttributes.have_value)
     {
         result.initCompoundAttributes();
         int count = fieldGeneratorCompoundAttributes.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendCompoundAttributes(fieldGeneratorCompoundAttributes.value[num]);
         }
         fieldGeneratorCompoundAttributes.value.Clear();
         fieldGeneratorCompoundAttributes.have_value = false;
     }
     else if ((!(result.hasCompoundAttributes())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"CompoundAttributes\" field was missing.");
     }
     if (fieldGeneratorStockListings.have_value)
     {
         result.initStockListings();
         int count = fieldGeneratorStockListings.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendStockListings(fieldGeneratorStockListings.value[num]);
         }
         fieldGeneratorStockListings.value.Clear();
         fieldGeneratorStockListings.have_value = false;
     }
     else if ((!(result.hasStockListings())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"StockListings\" field was missing.");
     }
     if (fieldGeneratorRequestedListings.have_value)
     {
         result.initRequestedListings();
         int count = fieldGeneratorRequestedListings.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendRequestedListings(fieldGeneratorRequestedListings.value[num]);
         }
         fieldGeneratorRequestedListings.value.Clear();
         fieldGeneratorRequestedListings.have_value = false;
     }
     else if ((!(result.hasRequestedListings())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"RequestedListings\" field was missing.");
     }
     if (fieldGeneratorMonetaryAmount.have_value)
     {
         result.setMonetaryAmount(fieldGeneratorMonetaryAmount.value);
         fieldGeneratorMonetaryAmount.have_value = false;
     }
 }
示例#3
0
        protected override void handle_result(StockMarketConversationJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
示例#4
0
 protected override void handle_result(StockMarketConversationJSON result)
 {
     top.value.Add(result);
 }
示例#5
0
 protected abstract void handle_result(StockMarketConversationJSON new_result);