Example #1
0
    private void  fromJSONTimePoint(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        TypeTimePointJSON convert_classy = TypeTimePointJSON.from_json(json_value, ignore_extras, true);

        setTimePoint(convert_classy);
    }
Example #2
0
 public void setTimePoint(TypeTimePointJSON new_value)
 {
     if (flagHasTimePoint)
     {
     }
     flagHasTimePoint = true;
     storeTimePoint   = new_value;
 }
Example #3
0
            protected override void finish()
            {
                TypeTimePointJSON result = new TypeTimePointJSON();

                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.extraTypeTimePointAppendPair(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);
            }
Example #4
0
 protected void finish(TypeTimePointJSON result)
 {
     if (fieldGeneratorValue.have_value)
     {
         result.setValueText(fieldGeneratorValue.value);
         fieldGeneratorValue.have_value = false;
     }
     else if ((!(result.hasValue())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Value\" field was missing.");
     }
     if (fieldGeneratorUnit.have_value)
     {
         result.setUnit(fieldGeneratorUnit.value);
         fieldGeneratorUnit.have_value = false;
     }
     else if ((!(result.hasUnit())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"Unit\" field was missing.");
     }
 }
Example #5
0
 protected override void handle_result(TypeTimePointJSON result)
 {
     top.value.Add(result);
 }
Example #6
0
 protected override void handle_result(TypeTimePointJSON result)
 {
     //@@@            Debug.Assert(!have_value);
     have_value = true;
     value      = result;
 }
Example #7
0
 protected abstract void handle_result(TypeTimePointJSON new_result);