예제 #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.String)
                        {
                            Gid = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Bool)
                        {
                            IsCitation = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Bool)
                        {
                            IsAbstract = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                ImplementationConstraint = new List <TDDIImplementationConstraintRef>();
                                TList _list1128 = iprot.ReadListBegin();
                                for (int _i1129 = 0; _i1129 < _list1128.Count; ++_i1129)
                                {
                                    TDDIImplementationConstraintRef _elem1130;
                                    _elem1130 = new TDDIImplementationConstraintRef();
                                    _elem1130.Read(iprot);
                                    ImplementationConstraint.Add(_elem1130);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                Note = new List <TDDINoteRef>();
                                TList _list1131 = iprot.ReadListBegin();
                                for (int _i1132 = 0; _i1132 < _list1131.Count; ++_i1132)
                                {
                                    TDDINoteRef _elem1133;
                                    _elem1133 = new TDDINoteRef();
                                    _elem1133.Read(iprot);
                                    Note.Add(_elem1133);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                TaggedValue = new List <TDDITaggedValueRef>();
                                TList _list1134 = iprot.ReadListBegin();
                                for (int _i1135 = 0; _i1135 < _list1134.Count; ++_i1135)
                                {
                                    TDDITaggedValueRef _elem1136;
                                    _elem1136 = new TDDITaggedValueRef();
                                    _elem1136.Read(iprot);
                                    TaggedValue.Add(_elem1136);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Property = new List <TDDIPropertyRef>();
                                TList _list1137 = iprot.ReadListBegin();
                                for (int _i1138 = 0; _i1138 < _list1137.Count; ++_i1138)
                                {
                                    TDDIPropertyRef _elem1139;
                                    _elem1139 = new TDDIPropertyRef();
                                    _elem1139.Read(iprot);
                                    Property.Add(_elem1139);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.List)
                        {
                            {
                                Source = new List <TDDIAbstractArtifactAssetRef>();
                                TList _list1140 = iprot.ReadListBegin();
                                for (int _i1141 = 0; _i1141 < _list1140.Count; ++_i1141)
                                {
                                    TDDIAbstractArtifactAssetRef _elem1142;
                                    _elem1142 = new TDDIAbstractArtifactAssetRef();
                                    _elem1142.Read(iprot);
                                    Source.Add(_elem1142);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 13:
                        if (field.Type == TType.List)
                        {
                            {
                                Target = new List <TDDIAbstractArtifactAssetRef>();
                                TList _list1143 = iprot.ReadListBegin();
                                for (int _i1144 = 0; _i1144 < _list1143.Count; ++_i1144)
                                {
                                    TDDIAbstractArtifactAssetRef _elem1145;
                                    _elem1145 = new TDDIAbstractArtifactAssetRef();
                                    _elem1145.Read(iprot);
                                    Target.Add(_elem1145);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            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 1:
                        if (field.Type == TType.String)
                        {
                            Gid = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Bool)
                        {
                            IsCitation = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Bool)
                        {
                            IsAbstract = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                ImplementationConstraint = new List <TDDIImplementationConstraintRef>();
                                TList _list1348 = iprot.ReadListBegin();
                                for (int _i1349 = 0; _i1349 < _list1348.Count; ++_i1349)
                                {
                                    TDDIImplementationConstraintRef _elem1350;
                                    _elem1350 = new TDDIImplementationConstraintRef();
                                    _elem1350.Read(iprot);
                                    ImplementationConstraint.Add(_elem1350);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                Note = new List <TDDINoteRef>();
                                TList _list1351 = iprot.ReadListBegin();
                                for (int _i1352 = 0; _i1352 < _list1351.Count; ++_i1352)
                                {
                                    TDDINoteRef _elem1353;
                                    _elem1353 = new TDDINoteRef();
                                    _elem1353.Read(iprot);
                                    Note.Add(_elem1353);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                TaggedValue = new List <TDDITaggedValueRef>();
                                TList _list1354 = iprot.ReadListBegin();
                                for (int _i1355 = 0; _i1355 < _list1354.Count; ++_i1355)
                                {
                                    TDDITaggedValueRef _elem1356;
                                    _elem1356 = new TDDITaggedValueRef();
                                    _elem1356.Read(iprot);
                                    TaggedValue.Add(_elem1356);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Property = new List <TDDIPropertyRef>();
                                TList _list1357 = iprot.ReadListBegin();
                                for (int _i1358 = 0; _i1358 < _list1357.Count; ++_i1358)
                                {
                                    TDDIPropertyRef _elem1359;
                                    _elem1359 = new TDDIPropertyRef();
                                    _elem1359.Read(iprot);
                                    Property.Add(_elem1359);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.List)
                        {
                            {
                                Source = new List <TDDIAbstractArtifactAssetRef>();
                                TList _list1360 = iprot.ReadListBegin();
                                for (int _i1361 = 0; _i1361 < _list1360.Count; ++_i1361)
                                {
                                    TDDIAbstractArtifactAssetRef _elem1362;
                                    _elem1362 = new TDDIAbstractArtifactAssetRef();
                                    _elem1362.Read(iprot);
                                    Source.Add(_elem1362);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 13:
                        if (field.Type == TType.List)
                        {
                            {
                                Target = new List <TDDIAbstractArtifactAssetRef>();
                                TList _list1363 = iprot.ReadListBegin();
                                for (int _i1364 = 0; _i1364 < _list1363.Count; ++_i1364)
                                {
                                    TDDIAbstractArtifactAssetRef _elem1365;
                                    _elem1365 = new TDDIAbstractArtifactAssetRef();
                                    _elem1365.Read(iprot);
                                    Target.Add(_elem1365);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }