示例#1
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorFormula.have_value)
     {
         result.setFormula(fieldGeneratorFormula.value);
         fieldGeneratorFormula.have_value = false;
     }
     else if ((!(result.hasFormula())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Formula\" field was missing.");
     }
     if (fieldGeneratorResult.have_value)
     {
         result.setResult(fieldGeneratorResult.value);
         fieldGeneratorResult.have_value = false;
     }
     else if ((!(result.hasResult())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Result\" field was missing.");
     }
     if (fieldGeneratorTextResponse.have_value)
     {
         result.setTextResponse(fieldGeneratorTextResponse.value);
         fieldGeneratorTextResponse.have_value = false;
     }
     else if ((!(result.hasTextResponse())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"TextResponse\" field was missing.");
     }
 }