示例#1
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_Size = 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)
                        {
                            Size = new MMIStandard.MVector3();
                            Size.Read(iprot);
                            isset_Size = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_Size)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Size not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
示例#2
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 0:
                            if (field.Type == TType.Struct)
                            {
                                Success = new MMIStandard.MVector3();
                                Success.Read(iprot);
                            }
                            else
                            {
                                TProtocolUtil.Skip(iprot, field.Type);
                            }
                            break;

                        default:
                            TProtocolUtil.Skip(iprot, field.Type);
                            break;
                        }
                        iprot.ReadFieldEnd();
                    }
                    iprot.ReadStructEnd();
                }
                finally
                {
                    iprot.DecrementRecursionDepth();
                }
            }
示例#3
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_Radius = false;
                bool   isset_Height = 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.Double)
                        {
                            Radius       = iprot.ReadDouble();
                            isset_Radius = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Double)
                        {
                            Height       = iprot.ReadDouble();
                            isset_Height = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            MainAxis = new MMIStandard.MVector3();
                            MainAxis.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_Radius)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Radius not set");
                }
                if (!isset_Height)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Height not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
示例#4
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_ID        = false;
                bool   isset_Vertices  = false;
                bool   isset_Triangles = 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.String)
                        {
                            ID       = iprot.ReadString();
                            isset_ID = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                Vertices = new List <MMIStandard.MVector3>();
                                TList _list40 = iprot.ReadListBegin();
                                for (int _i41 = 0; _i41 < _list40.Count; ++_i41)
                                {
                                    MMIStandard.MVector3 _elem42;
                                    _elem42 = new MMIStandard.MVector3();
                                    _elem42.Read(iprot);
                                    Vertices.Add(_elem42);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_Vertices = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.List)
                        {
                            {
                                Triangles = new List <int>();
                                TList _list43 = iprot.ReadListBegin();
                                for (int _i44 = 0; _i44 < _list43.Count; ++_i44)
                                {
                                    int _elem45;
                                    _elem45 = iprot.ReadI32();
                                    Triangles.Add(_elem45);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_Triangles = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.List)
                        {
                            {
                                UVCoordinates = new List <MMIStandard.MVector2>();
                                TList _list46 = iprot.ReadListBegin();
                                for (int _i47 = 0; _i47 < _list46.Count; ++_i47)
                                {
                                    MMIStandard.MVector2 _elem48;
                                    _elem48 = new MMIStandard.MVector2();
                                    _elem48.Read(iprot);
                                    UVCoordinates.Add(_elem48);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Map)
                        {
                            {
                                Properties = new Dictionary <string, string>();
                                TMap _map49 = iprot.ReadMapBegin();
                                for (int _i50 = 0; _i50 < _map49.Count; ++_i50)
                                {
                                    string _key51;
                                    string _val52;
                                    _key51             = iprot.ReadString();
                                    _val52             = iprot.ReadString();
                                    Properties[_key51] = _val52;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_ID)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set");
                }
                if (!isset_Vertices)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Vertices not set");
                }
                if (!isset_Triangles)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Triangles not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
示例#5
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_ID       = false;
                bool   isset_Type     = false;
                bool   isset_Position = false;
                bool   isset_Rotation = 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.String)
                        {
                            ID       = iprot.ReadString();
                            isset_ID = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.I32)
                        {
                            Type       = (MJointType)iprot.ReadI32();
                            isset_Type = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            Position = new MMIStandard.MVector3();
                            Position.Read(iprot);
                            isset_Position = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Struct)
                        {
                            Rotation = new MMIStandard.MQuaternion();
                            Rotation.Read(iprot);
                            isset_Rotation = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.List)
                        {
                            {
                                Channels = new List <MChannel>();
                                TList _list8 = iprot.ReadListBegin();
                                for (int _i9 = 0; _i9 < _list8.Count; ++_i9)
                                {
                                    MChannel _elem10;
                                    _elem10 = (MChannel)iprot.ReadI32();
                                    Channels.Add(_elem10);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.String)
                        {
                            Parent = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_ID)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set");
                }
                if (!isset_Type)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Type not set");
                }
                if (!isset_Position)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Position not set");
                }
                if (!isset_Rotation)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Rotation not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
示例#6
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_ID   = false;
                bool   isset_Type = 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.String)
                        {
                            ID       = iprot.ReadString();
                            isset_ID = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.I32)
                        {
                            Type       = (MColliderType)iprot.ReadI32();
                            isset_Type = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            BoxColliderProperties = new MBoxColliderProperties();
                            BoxColliderProperties.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Struct)
                        {
                            SphereColliderProperties = new MSphereColliderProperties();
                            SphereColliderProperties.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Struct)
                        {
                            CapsuleColliderProperties = new MCapsuleColliderProperties();
                            CapsuleColliderProperties.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.Struct)
                        {
                            ConeColliderProperties = new MConeColliderProperties();
                            ConeColliderProperties.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            CylinderColliderProperties = new MCylinderColliderProperties();
                            CylinderColliderProperties.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.Struct)
                        {
                            MeshColliderProperties = new MMeshColliderProperties();
                            MeshColliderProperties.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.Struct)
                        {
                            PositionOffset = new MMIStandard.MVector3();
                            PositionOffset.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.Struct)
                        {
                            RotationOffset = new MMIStandard.MQuaternion();
                            RotationOffset.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Colliders = new List <MCollider>();
                                TList _list104 = iprot.ReadListBegin();
                                for (int _i105 = 0; _i105 < _list104.Count; ++_i105)
                                {
                                    MCollider _elem106;
                                    _elem106 = new MCollider();
                                    _elem106.Read(iprot);
                                    Colliders.Add(_elem106);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.Map)
                        {
                            {
                                Properties = new Dictionary <string, string>();
                                TMap _map107 = iprot.ReadMapBegin();
                                for (int _i108 = 0; _i108 < _map107.Count; ++_i108)
                                {
                                    string _key109;
                                    string _val110;
                                    _key109             = iprot.ReadString();
                                    _val110             = iprot.ReadString();
                                    Properties[_key109] = _val110;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_ID)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set");
                }
                if (!isset_Type)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Type not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_Target = 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.String)
                        {
                            Target       = iprot.ReadString();
                            isset_Target = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            Rotation = new MMIStandard.MQuaternion();
                            Rotation.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.String)
                        {
                            Parent = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_Target)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Target not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_ParentObjectID = 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.String)
                        {
                            ParentObjectID       = iprot.ReadString();
                            isset_ParentObjectID = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            TranslationalVelocity = new MMIStandard.MVector3();
                            TranslationalVelocity.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Struct)
                        {
                            RotationalVelocity = new MMIStandard.MVector3();
                            RotationalVelocity.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Double)
                        {
                            WeightingFactor = iprot.ReadDouble();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_ParentObjectID)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ParentObjectID not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
示例#9
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_Vertices  = false;
                bool   isset_Triangles = 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.List)
                        {
                            {
                                Vertices = new List <MMIStandard.MVector3>();
                                TList _list57 = iprot.ReadListBegin();
                                for (int _i58 = 0; _i58 < _list57.Count; ++_i58)
                                {
                                    MMIStandard.MVector3 _elem59;
                                    _elem59 = new MMIStandard.MVector3();
                                    _elem59.Read(iprot);
                                    Vertices.Add(_elem59);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_Vertices = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                Triangles = new List <int>();
                                TList _list60 = iprot.ReadListBegin();
                                for (int _i61 = 0; _i61 < _list60.Count; ++_i61)
                                {
                                    int _elem62;
                                    _elem62 = iprot.ReadI32();
                                    Triangles.Add(_elem62);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_Triangles = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Map)
                        {
                            {
                                Properties = new Dictionary <string, string>();
                                TMap _map63 = iprot.ReadMapBegin();
                                for (int _i64 = 0; _i64 < _map63.Count; ++_i64)
                                {
                                    string _key65;
                                    string _val66;
                                    _key65             = iprot.ReadString();
                                    _val66             = iprot.ReadString();
                                    Properties[_key65] = _val66;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_Vertices)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Vertices not set");
                }
                if (!isset_Triangles)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Triangles not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_Vertices  = false;
                bool   isset_Triangles = 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.List)
                        {
                            {
                                Vertices = new List <MMIStandard.MVector3>();
                                TList _list32 = iprot.ReadListBegin();
                                for (int _i33 = 0; _i33 < _list32.Count; ++_i33)
                                {
                                    MMIStandard.MVector3 _elem34;
                                    _elem34 = new MMIStandard.MVector3();
                                    _elem34.Read(iprot);
                                    Vertices.Add(_elem34);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_Vertices = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                Triangles = new List <int>();
                                TList _list35 = iprot.ReadListBegin();
                                for (int _i36 = 0; _i36 < _list35.Count; ++_i36)
                                {
                                    int _elem37;
                                    _elem37 = iprot.ReadI32();
                                    Triangles.Add(_elem37);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_Triangles = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_Vertices)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Vertices not set");
                }
                if (!isset_Triangles)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Triangles not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }