예제 #1
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorCurrentDateAndTime.have_value)
     {
         result.setCurrentDateAndTime(fieldGeneratorCurrentDateAndTime.value);
         fieldGeneratorCurrentDateAndTime.have_value = false;
     }
     else if ((!(result.hasCurrentDateAndTime())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"CurrentDateAndTime\" field was missing.");
     }
     if (fieldGeneratorFlightTravelLocationForClient.have_value)
     {
         result.setFlightTravelLocationForClient(fieldGeneratorFlightTravelLocationForClient.value);
         fieldGeneratorFlightTravelLocationForClient.have_value = false;
     }
     if (fieldGeneratorFlightStatusSearchResults.have_value)
     {
         result.initFlightStatusSearchResults();
         int count = fieldGeneratorFlightStatusSearchResults.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendFlightStatusSearchResults(fieldGeneratorFlightStatusSearchResults.value[num]);
         }
         fieldGeneratorFlightStatusSearchResults.value.Clear();
         fieldGeneratorFlightStatusSearchResults.have_value = false;
     }
 }
예제 #2
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorUberRequestsSpec.have_value)
     {
         result.setUberRequestsSpec(fieldGeneratorUberRequestsSpec.value);
         fieldGeneratorUberRequestsSpec.have_value = false;
     }
     else if ((!(result.hasUberRequestsSpec())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"UberRequestsSpec\" field was missing.");
     }
     if (fieldGeneratorUberProducts.have_value)
     {
         result.setUberProducts(fieldGeneratorUberProducts.value);
         fieldGeneratorUberProducts.have_value = false;
     }
     else if ((!(result.hasUberProducts())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"UberProducts\" field was missing.");
     }
     if (fieldGeneratorCause.have_value)
     {
         result.setCause(fieldGeneratorCause.value);
         fieldGeneratorCause.have_value = false;
     }
 }
예제 #3
0
    private void  fromJSONNativeData(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        TypeNativeDataJSON convert_classy = TypeNativeDataJSON.from_json(json_value, ignore_extras, true);

        setNativeData(convert_classy);
    }
예제 #4
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorCommunicationType.have_value)
     {
         result.setCommunicationType(fieldGeneratorCommunicationType.value);
         fieldGeneratorCommunicationType.have_value = false;
     }
     else if ((!(result.hasCommunicationType())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"CommunicationType\" field was missing.");
     }
     if (fieldGeneratorAutoListen.have_value)
     {
         result.setAutoListen(fieldGeneratorAutoListen.value);
         fieldGeneratorAutoListen.have_value = false;
     }
     if (fieldGeneratorNameWithMissingInfo.have_value)
     {
         result.setNameWithMissingInfo(fieldGeneratorNameWithMissingInfo.value);
         fieldGeneratorNameWithMissingInfo.have_value = false;
     }
     else if ((!(result.hasNameWithMissingInfo())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"NameWithMissingInfo\" field was missing.");
     }
 }
예제 #5
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorTimers.have_value)
     {
         result.initTimers();
         int count = fieldGeneratorTimers.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendTimers(fieldGeneratorTimers.value[num]);
         }
         fieldGeneratorTimers.value.Clear();
         fieldGeneratorTimers.have_value = false;
     }
     else if ((!(result.hasTimers())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Timers\" field was missing.");
     }
     if (fieldGeneratorTimer.have_value)
     {
         result.setTimer(fieldGeneratorTimer.value);
         fieldGeneratorTimer.have_value = false;
     }
     else if ((!(result.hasTimer())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Timer\" field was missing.");
     }
 }
예제 #6
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.");
     }
 }
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorLongResult.have_value)
     {
         result.setLongResult(fieldGeneratorLongResult.value);
         fieldGeneratorLongResult.have_value = false;
     }
     else if ((!(result.hasLongResult())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"LongResult\" field was missing.");
     }
     if (fieldGeneratorShortResult.have_value)
     {
         result.setShortResult(fieldGeneratorShortResult.value);
         fieldGeneratorShortResult.have_value = false;
     }
     else if ((!(result.hasShortResult())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"ShortResult\" field was missing.");
     }
     if (fieldGeneratorConciseResult.have_value)
     {
         result.setConciseResult(fieldGeneratorConciseResult.value);
         fieldGeneratorConciseResult.have_value = false;
     }
     else if ((!(result.hasConciseResult())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"ConciseResult\" field was missing.");
     }
 }
예제 #8
0
 public void setNativeData(TypeNativeDataJSON new_value)
 {
     if (flagHasNativeData)
     {
     }
     flagHasNativeData = true;
     storeNativeData   = new_value;
 }
            protected override void finish()
            {
                TypeNativeDataJSON result = new TypeNativeDataJSON();

                Debug.Assert(result != null);
                finish(result);
                handle_result(result);
            }
예제 #10
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorUberRequest.have_value)
     {
         result.setUberRequest(fieldGeneratorUberRequest.value);
         fieldGeneratorUberRequest.have_value = false;
     }
 }
예제 #11
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorIndexedUserAppsCount.have_value)
     {
         result.setIndexedUserAppsCount(fieldGeneratorIndexedUserAppsCount.value);
         fieldGeneratorIndexedUserAppsCount.have_value = false;
     }
     else if ((!(result.hasIndexedUserAppsCount())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"IndexedUserAppsCount\" field was missing.");
     }
 }
예제 #12
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorUberDeepLinks.have_value)
     {
         result.setUberDeepLinks(fieldGeneratorUberDeepLinks.value);
         fieldGeneratorUberDeepLinks.have_value = false;
     }
     else if ((!(result.hasUberDeepLinks())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"UberDeepLinks\" field was missing.");
     }
 }
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorGameState.have_value)
     {
         result.setGameState(fieldGeneratorGameState.value);
         fieldGeneratorGameState.have_value = false;
     }
     else if ((!(result.hasGameState())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"GameState\" field was missing.");
     }
 }
예제 #14
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorNotUnderstoodWords.have_value)
     {
         result.setNotUnderstoodWords(fieldGeneratorNotUnderstoodWords.value);
         fieldGeneratorNotUnderstoodWords.have_value = false;
     }
     else if ((!(result.hasNotUnderstoodWords())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"NotUnderstoodWords\" field was missing.");
     }
 }
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorRequestedApp.have_value)
     {
         result.setRequestedApp(fieldGeneratorRequestedApp.value);
         fieldGeneratorRequestedApp.have_value = false;
     }
     else if ((!(result.hasRequestedApp())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"RequestedApp\" field was missing.");
     }
 }
예제 #16
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorStatus.have_value)
     {
         result.setStatus(fieldGeneratorStatus.value);
         fieldGeneratorStatus.have_value = false;
     }
     else if ((!(result.hasStatus())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Status\" field was missing.");
     }
     if (fieldGeneratorDescription.have_value)
     {
         result.setDescription(fieldGeneratorDescription.value);
         fieldGeneratorDescription.have_value = false;
     }
 }
예제 #17
0
            protected override void finish()
            {
                TypeNativeDataJSON result = new TypeNativeDataJSON();

                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.extraTypeNativeDataAppendPair(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);
            }
예제 #18
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorImageURL.have_value)
     {
         result.setImageURL(fieldGeneratorImageURL.value);
         fieldGeneratorImageURL.have_value = false;
     }
     else if ((!(result.hasImageURL())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"ImageURL\" field was missing.");
     }
     if (fieldGeneratorBankroll.have_value)
     {
         result.setBankrollText(fieldGeneratorBankroll.value);
         fieldGeneratorBankroll.have_value = false;
     }
     else if ((!(result.hasBankroll())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Bankroll\" field was missing.");
     }
 }
예제 #19
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorRawTranscription.have_value)
     {
         result.setRawTranscription(fieldGeneratorRawTranscription.value);
         fieldGeneratorRawTranscription.have_value = false;
     }
     else if ((!(result.hasRawTranscription())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"RawTranscription\" field was missing.");
     }
     if (fieldGeneratorFormattedTranscription.have_value)
     {
         result.setFormattedTranscription(fieldGeneratorFormattedTranscription.value);
         fieldGeneratorFormattedTranscription.have_value = false;
     }
     else if ((!(result.hasFormattedTranscription())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"FormattedTranscription\" field was missing.");
     }
 }
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorConversionRows.have_value)
     {
         result.initConversionRows();
         int count = fieldGeneratorConversionRows.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendConversionRows(fieldGeneratorConversionRows.value[num]);
         }
         fieldGeneratorConversionRows.value.Clear();
         fieldGeneratorConversionRows.have_value = false;
     }
     else if ((!(result.hasConversionRows())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"ConversionRows\" field was missing.");
     }
     if (fieldGeneratorErrorMessage.have_value)
     {
         result.setErrorMessage(fieldGeneratorErrorMessage.value);
         fieldGeneratorErrorMessage.have_value = false;
     }
 }
예제 #21
0
 protected void finish(TypeNativeDataJSON result)
 {
     if (fieldGeneratorMapLocationSpecs.have_value)
     {
         result.initMapLocationSpecs();
         int count = fieldGeneratorMapLocationSpecs.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendMapLocationSpecs(fieldGeneratorMapLocationSpecs.value[num]);
         }
         fieldGeneratorMapLocationSpecs.value.Clear();
         fieldGeneratorMapLocationSpecs.have_value = false;
     }
     else if ((!(result.hasMapLocationSpecs())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"MapLocationSpecs\" field was missing.");
     }
     if (fieldGeneratorRequestedCoordinates.have_value)
     {
         result.setRequestedCoordinates(fieldGeneratorRequestedCoordinates.value);
         fieldGeneratorRequestedCoordinates.have_value = false;
     }
 }
예제 #22
0
 protected override void handle_result(TypeNativeDataJSON result)
 {
     top.value.Add(result);
 }
예제 #23
0
 protected override void handle_result(TypeNativeDataJSON result)
 {
     //@@@            Debug.Assert(!have_value);
     have_value = true;
     value      = result;
 }
예제 #24
0
 protected abstract void handle_result(TypeNativeDataJSON new_result);