コード例 #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.I64)
                        {
                            Id = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMapRef>();
                                TList _list284 = iprot.ReadListBegin();
                                for (int _i285 = 0; _i285 < _list284.Count; ++_i285)
                                {
                                    TDDIKeyValueMapRef _elem286;
                                    _elem286 = new TDDIKeyValueMapRef();
                                    _elem286.Read(iprot);
                                    KeyValueMaps.Add(_elem286);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                DependabilityRequirements = new List <TDDIAbstractDependabilityRequirementRef>();
                                TList _list287 = iprot.ReadListBegin();
                                for (int _i288 = 0; _i288 < _list287.Count; ++_i288)
                                {
                                    TDDIAbstractDependabilityRequirementRef _elem289;
                                    _elem289 = new TDDIAbstractDependabilityRequirementRef();
                                    _elem289.Read(iprot);
                                    DependabilityRequirements.Add(_elem289);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                SubFunctions = new List <TDDIAbstractFunctionRef>();
                                TList _list290 = iprot.ReadListBegin();
                                for (int _i291 = 0; _i291 < _list290.Count; ++_i291)
                                {
                                    TDDIAbstractFunctionRef _elem292;
                                    _elem292 = new TDDIAbstractFunctionRef();
                                    _elem292.Read(iprot);
                                    SubFunctions.Add(_elem292);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Ports = new List <TDDIPortRef>();
                                TList _list293 = iprot.ReadListBegin();
                                for (int _i294 = 0; _i294 < _list293.Count; ++_i294)
                                {
                                    TDDIPortRef _elem295;
                                    _elem295 = new TDDIPortRef();
                                    _elem295.Read(iprot);
                                    Ports.Add(_elem295);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.Struct)
                        {
                            PerfChars = new TDDIPerfChars();
                            PerfChars.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 13:
                        if (field.Type == TType.List)
                        {
                            {
                                FailureModels = new List <TDDIAbstractFailureLogicPackageRef>();
                                TList _list296 = iprot.ReadListBegin();
                                for (int _i297 = 0; _i297 < _list296.Count; ++_i297)
                                {
                                    TDDIAbstractFailureLogicPackageRef _elem298;
                                    _elem298 = new TDDIAbstractFailureLogicPackageRef();
                                    _elem298.Read(iprot);
                                    FailureModels.Add(_elem298);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 14:
                        if (field.Type == TType.List)
                        {
                            {
                                Malfunctions = new List <TDDIMalFunctionRef>();
                                TList _list299 = iprot.ReadListBegin();
                                for (int _i300 = 0; _i300 < _list299.Count; ++_i300)
                                {
                                    TDDIMalFunctionRef _elem301;
                                    _elem301 = new TDDIMalFunctionRef();
                                    _elem301.Read(iprot);
                                    Malfunctions.Add(_elem301);
                                }
                                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.I64)
                        {
                            Id = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMapRef>();
                                TList _list308 = iprot.ReadListBegin();
                                for (int _i309 = 0; _i309 < _list308.Count; ++_i309)
                                {
                                    TDDIKeyValueMapRef _elem310;
                                    _elem310 = new TDDIKeyValueMapRef();
                                    _elem310.Read(iprot);
                                    KeyValueMaps.Add(_elem310);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                DependabilityRequirements = new List <TDDIAbstractDependabilityRequirementRef>();
                                TList _list311 = iprot.ReadListBegin();
                                for (int _i312 = 0; _i312 < _list311.Count; ++_i312)
                                {
                                    TDDIAbstractDependabilityRequirementRef _elem313;
                                    _elem313 = new TDDIAbstractDependabilityRequirementRef();
                                    _elem313.Read(iprot);
                                    DependabilityRequirements.Add(_elem313);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                SubFunctions = new List <TDDIAbstractFunctionRef>();
                                TList _list314 = iprot.ReadListBegin();
                                for (int _i315 = 0; _i315 < _list314.Count; ++_i315)
                                {
                                    TDDIAbstractFunctionRef _elem316;
                                    _elem316 = new TDDIAbstractFunctionRef();
                                    _elem316.Read(iprot);
                                    SubFunctions.Add(_elem316);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Ports = new List <TDDIPortRef>();
                                TList _list317 = iprot.ReadListBegin();
                                for (int _i318 = 0; _i318 < _list317.Count; ++_i318)
                                {
                                    TDDIPortRef _elem319;
                                    _elem319 = new TDDIPortRef();
                                    _elem319.Read(iprot);
                                    Ports.Add(_elem319);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.Struct)
                        {
                            PerfChars = new TDDIPerfChars();
                            PerfChars.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 13:
                        if (field.Type == TType.List)
                        {
                            {
                                FailureModels = new List <TDDIAbstractFailureLogicPackageRef>();
                                TList _list320 = iprot.ReadListBegin();
                                for (int _i321 = 0; _i321 < _list320.Count; ++_i321)
                                {
                                    TDDIAbstractFailureLogicPackageRef _elem322;
                                    _elem322 = new TDDIAbstractFailureLogicPackageRef();
                                    _elem322.Read(iprot);
                                    FailureModels.Add(_elem322);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 14:
                        if (field.Type == TType.List)
                        {
                            {
                                Malfunctions = new List <TDDIMalFunctionRef>();
                                TList _list323 = iprot.ReadListBegin();
                                for (int _i324 = 0; _i324 < _list323.Count; ++_i324)
                                {
                                    TDDIMalFunctionRef _elem325;
                                    _elem325 = new TDDIMalFunctionRef();
                                    _elem325.Read(iprot);
                                    Malfunctions.Add(_elem325);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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