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.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMap>();
                                TList _list656 = iprot.ReadListBegin();
                                for (int _i657 = 0; _i657 < _list656.Count; ++_i657)
                                {
                                    TDDIKeyValueMap _elem658;
                                    _elem658 = new TDDIKeyValueMap();
                                    _elem658.Read(iprot);
                                    KeyValueMaps.Add(_elem658);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                RefinedRequirements = new List <TDDIAbstractDependabilityRequirementRef>();
                                TList _list659 = iprot.ReadListBegin();
                                for (int _i660 = 0; _i660 < _list659.Count; ++_i660)
                                {
                                    TDDIAbstractDependabilityRequirementRef _elem661;
                                    _elem661 = new TDDIAbstractDependabilityRequirementRef();
                                    _elem661.Read(iprot);
                                    RefinedRequirements.Add(_elem661);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                Measures = new List <TDDIAbstractMeasureRef>();
                                TList _list662 = iprot.ReadListBegin();
                                for (int _i663 = 0; _i663 < _list662.Count; ++_i663)
                                {
                                    TDDIAbstractMeasureRef _elem664;
                                    _elem664 = new TDDIAbstractMeasureRef();
                                    _elem664.Read(iprot);
                                    Measures.Add(_elem664);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                Failures = new List <TDDIAbstractFailureRef>();
                                TList _list665 = iprot.ReadListBegin();
                                for (int _i666 = 0; _i666 < _list665.Count; ++_i666)
                                {
                                    TDDIAbstractFailureRef _elem667;
                                    _elem667 = new TDDIAbstractFailureRef();
                                    _elem667.Read(iprot);
                                    Failures.Add(_elem667);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                MaintenanceProcedures = new List <TDDIMaintenanceProcedureRef>();
                                TList _list668 = iprot.ReadListBegin();
                                for (int _i669 = 0; _i669 < _list668.Count; ++_i669)
                                {
                                    TDDIMaintenanceProcedureRef _elem670;
                                    _elem670 = new TDDIMaintenanceProcedureRef();
                                    _elem670.Read(iprot);
                                    MaintenanceProcedures.Add(_elem670);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.List)
                        {
                            {
                                Hazards = new List <TDDIHazardRef>();
                                TList _list671 = iprot.ReadListBegin();
                                for (int _i672 = 0; _i672 < _list671.Count; ++_i672)
                                {
                                    TDDIHazardRef _elem673;
                                    _elem673 = new TDDIHazardRef();
                                    _elem673.Read(iprot);
                                    Hazards.Add(_elem673);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        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 _list912 = iprot.ReadListBegin();
                                for (int _i913 = 0; _i913 < _list912.Count; ++_i913)
                                {
                                    TDDIKeyValueMapRef _elem914;
                                    _elem914 = new TDDIKeyValueMapRef();
                                    _elem914.Read(iprot);
                                    KeyValueMaps.Add(_elem914);
                                }
                                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.String)
                        {
                            DecompositionArgument = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                RefinedRequirements = new List <TDDIAbstractDependabilityRequirementRef>();
                                TList _list915 = iprot.ReadListBegin();
                                for (int _i916 = 0; _i916 < _list915.Count; ++_i916)
                                {
                                    TDDIAbstractDependabilityRequirementRef _elem917;
                                    _elem917 = new TDDIAbstractDependabilityRequirementRef();
                                    _elem917.Read(iprot);
                                    RefinedRequirements.Add(_elem917);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                Measures = new List <TDDIAbstractMeasureRef>();
                                TList _list918 = iprot.ReadListBegin();
                                for (int _i919 = 0; _i919 < _list918.Count; ++_i919)
                                {
                                    TDDIAbstractMeasureRef _elem920;
                                    _elem920 = new TDDIAbstractMeasureRef();
                                    _elem920.Read(iprot);
                                    Measures.Add(_elem920);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.List)
                        {
                            {
                                FailureModes = new List <TDDIAbstractFailureRef>();
                                TList _list921 = iprot.ReadListBegin();
                                for (int _i922 = 0; _i922 < _list921.Count; ++_i922)
                                {
                                    TDDIAbstractFailureRef _elem923;
                                    _elem923 = new TDDIAbstractFailureRef();
                                    _elem923.Read(iprot);
                                    FailureModes.Add(_elem923);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 14:
                        if (field.Type == TType.List)
                        {
                            {
                                MaintenanceProcedures = new List <TDDIMaintenanceProcedureRef>();
                                TList _list924 = iprot.ReadListBegin();
                                for (int _i925 = 0; _i925 < _list924.Count; ++_i925)
                                {
                                    TDDIMaintenanceProcedureRef _elem926;
                                    _elem926 = new TDDIMaintenanceProcedureRef();
                                    _elem926.Read(iprot);
                                    MaintenanceProcedures.Add(_elem926);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 15:
                        if (field.Type == TType.List)
                        {
                            {
                                Hazards = new List <TDDIHazardRef>();
                                TList _list927 = iprot.ReadListBegin();
                                for (int _i928 = 0; _i928 < _list927.Count; ++_i928)
                                {
                                    TDDIHazardRef _elem929;
                                    _elem929 = new TDDIHazardRef();
                                    _elem929.Read(iprot);
                                    Hazards.Add(_elem929);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Beispiel #3
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.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMap>();
                                TList _list564 = iprot.ReadListBegin();
                                for (int _i565 = 0; _i565 < _list564.Count; ++_i565)
                                {
                                    TDDIKeyValueMap _elem566;
                                    _elem566 = new TDDIKeyValueMap();
                                    _elem566.Read(iprot);
                                    KeyValueMaps.Add(_elem566);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.List)
                        {
                            {
                                Hazards = new List <TDDIHazardRef>();
                                TList _list567 = iprot.ReadListBegin();
                                for (int _i568 = 0; _i568 < _list567.Count; ++_i568)
                                {
                                    TDDIHazardRef _elem569;
                                    _elem569 = new TDDIHazardRef();
                                    _elem569.Read(iprot);
                                    Hazards.Add(_elem569);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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