Beispiel #1
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.");
     }
 }