Ejemplo n.º 1
0
            protected override void finish(int winning_index)
            {
                TypeArgumentData result = new TypeArgumentData();

                result.key = winning_index;
                switch (winning_index)
                {
                case 0:
                {
                    Debug.Assert(field0.have_value);
                    result.u.choice0 = field0.value;
                    break;
                }

                case 1:
                {
                    Debug.Assert(field1.have_value);
                    result.u.choice1 = field1.value;
                    break;
                }

                default:
                {
                    Debug.Assert(false);
                    break;
                }
                }
                handle_result(result);
            }
Ejemplo n.º 2
0
 public HolderArgumentData(HolderArgumentData other)
 {
     have_data = other.haveData();
     data      = other.referenced();
     if (have_data)
     {
     }
 }
Ejemplo n.º 3
0
 public HolderArgumentData(TypeArgumentData init_data)
 {
     have_data = true;
     data      = init_data;
     if (have_data)
     {
     }
 }
Ejemplo n.º 4
0
    private void  fromJSONArgumentData(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        TypeArgumentData or_result = new TypeArgumentData();
        bool             or_done   = false;

        if (!or_done)
        {
            try
            {
                SportsStatsArgumentTypeModifierJSON convert_classy = SportsStatsArgumentTypeModifierJSON.from_json(json_value, ignore_extras, true);
                or_result.u.choice0 = convert_classy;
                or_result.key       = 0;
                or_done             = true;
            }
            catch (Exception)
            {
            }
        }
        if (!or_done)
        {
            try
            {
                SportsSeasonJSON convert_classy = SportsSeasonJSON.from_json(json_value, ignore_extras, true);
                or_result.u.choice1 = convert_classy;
                or_result.key       = 1;
                or_done             = true;
            }
            catch (Exception)
            {
            }
        }
        if (!or_done)
        {
            throw new Exception("The value for field ArgumentData of SportsStatsArgumentJSON is not one of the allowed values.");
        }
        setArgumentData(or_result);
        switch (or_result.key)
        {
        case 0:
            break;

        case 1:
            break;

        default:
            Debug.Assert(false);
            break;
        }
    }
Ejemplo n.º 5
0
    public void setArgumentData(TypeArgumentData new_value)
    {
        switch (new_value.key)
        {
        case 0:
            break;

        case 1:
            break;

        default:
            Debug.Assert(false);
            break;
        }
        if (flagHasArgumentData)
        {
            switch (storeArgumentData.key)
            {
            case 0:
                break;

            case 1:
                break;

            default:
                Debug.Assert(false);
                break;
            }
        }
        flagHasArgumentData = true;
        switch (new_value.key)
        {
        case 0:
            break;

        case 1:
            break;

        default:
            Debug.Assert(false);
            break;
        }
        storeArgumentData = new_value;
    }
Ejemplo n.º 6
0
 protected override void handle_result(TypeArgumentData result)
 {
     top.value.Add(result);
 }
Ejemplo n.º 7
0
 protected override void handle_result(TypeArgumentData result)
 {
     //@@@        Debug.Assert(!have_value);
     have_value = true;
     value      = new HolderArgumentData(result);
 }
Ejemplo n.º 8
0
 protected abstract void handle_result(TypeArgumentData result);