Exemplo n.º 1
0
            public void Read(TProtocol iprot)
            {
                iprot.IncrementRecursionDepth();
                try
                {
                    TField field;
                    iprot.ReadStructBegin();
                    while (true)
                    {
                        field = iprot.ReadFieldBegin();
                        if (field.Type == TType.Stop)
                        {
                            break;
                        }
                        switch (field.ID)
                        {
                        case 1:
                            if (field.Type == TType.List)
                            {
                                {
                                    SceneManipulations = new List <MMIStandard.MSceneManipulation>();
                                    TList _list198 = iprot.ReadListBegin();
                                    for (int _i199 = 0; _i199 < _list198.Count; ++_i199)
                                    {
                                        MMIStandard.MSceneManipulation _elem200;
                                        _elem200 = new MMIStandard.MSceneManipulation();
                                        _elem200.Read(iprot);
                                        SceneManipulations.Add(_elem200);
                                    }
                                    iprot.ReadListEnd();
                                }
                            }
                            else
                            {
                                TProtocolUtil.Skip(iprot, field.Type);
                            }
                            break;

                        default:
                            TProtocolUtil.Skip(iprot, field.Type);
                            break;
                        }
                        iprot.ReadFieldEnd();
                    }
                    iprot.ReadStructEnd();
                }
                finally
                {
                    iprot.DecrementRecursionDepth();
                }
            }
Exemplo n.º 2
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_Posture = false;
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.Struct)
                        {
                            Posture = new MMIStandard.MAvatarPostureValues();
                            Posture.Read(iprot);
                            isset_Posture = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                Constraints = new List <MMIStandard.MConstraint>();
                                TList _list12 = iprot.ReadListBegin();
                                for (int _i13 = 0; _i13 < _list12.Count; ++_i13)
                                {
                                    MMIStandard.MConstraint _elem14;
                                    _elem14 = new MMIStandard.MConstraint();
                                    _elem14.Read(iprot);
                                    Constraints.Add(_elem14);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.List)
                        {
                            {
                                Events = new List <MSimulationEvent>();
                                TList _list15 = iprot.ReadListBegin();
                                for (int _i16 = 0; _i16 < _list15.Count; ++_i16)
                                {
                                    MSimulationEvent _elem17;
                                    _elem17 = new MSimulationEvent();
                                    _elem17.Read(iprot);
                                    Events.Add(_elem17);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.List)
                        {
                            {
                                SceneManipulations = new List <MMIStandard.MSceneManipulation>();
                                TList _list18 = iprot.ReadListBegin();
                                for (int _i19 = 0; _i19 < _list18.Count; ++_i19)
                                {
                                    MMIStandard.MSceneManipulation _elem20;
                                    _elem20 = new MMIStandard.MSceneManipulation();
                                    _elem20.Read(iprot);
                                    SceneManipulations.Add(_elem20);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.List)
                        {
                            {
                                DrawingCalls = new List <MMIStandard.MDrawingCall>();
                                TList _list21 = iprot.ReadListBegin();
                                for (int _i22 = 0; _i22 < _list21.Count; ++_i22)
                                {
                                    MMIStandard.MDrawingCall _elem23;
                                    _elem23 = new MMIStandard.MDrawingCall();
                                    _elem23.Read(iprot);
                                    DrawingCalls.Add(_elem23);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                LogData = new List <string>();
                                TList _list24 = iprot.ReadListBegin();
                                for (int _i25 = 0; _i25 < _list24.Count; ++_i25)
                                {
                                    string _elem26;
                                    _elem26 = iprot.ReadString();
                                    LogData.Add(_elem26);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_Posture)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Posture not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Exemplo n.º 3
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_Initial = false;
                bool   isset_Current = false;
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.Struct)
                        {
                            Initial = new MMIStandard.MAvatarPostureValues();
                            Initial.Read(iprot);
                            isset_Initial = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Struct)
                        {
                            Current = new MMIStandard.MAvatarPostureValues();
                            Current.Read(iprot);
                            isset_Current = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.List)
                        {
                            {
                                Constraints = new List <MMIStandard.MConstraint>();
                                TList _list0 = iprot.ReadListBegin();
                                for (int _i1 = 0; _i1 < _list0.Count; ++_i1)
                                {
                                    MMIStandard.MConstraint _elem2;
                                    _elem2 = new MMIStandard.MConstraint();
                                    _elem2.Read(iprot);
                                    Constraints.Add(_elem2);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.List)
                        {
                            {
                                SceneManipulations = new List <MMIStandard.MSceneManipulation>();
                                TList _list3 = iprot.ReadListBegin();
                                for (int _i4 = 0; _i4 < _list3.Count; ++_i4)
                                {
                                    MMIStandard.MSceneManipulation _elem5;
                                    _elem5 = new MMIStandard.MSceneManipulation();
                                    _elem5.Read(iprot);
                                    SceneManipulations.Add(_elem5);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.List)
                        {
                            {
                                Events = new List <MSimulationEvent>();
                                TList _list6 = iprot.ReadListBegin();
                                for (int _i7 = 0; _i7 < _list6.Count; ++_i7)
                                {
                                    MSimulationEvent _elem8;
                                    _elem8 = new MSimulationEvent();
                                    _elem8.Read(iprot);
                                    Events.Add(_elem8);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_Initial)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Initial not set");
                }
                if (!isset_Current)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Current not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }