Esempio n. 1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.ParentStructure__AssemblyContext == null))
                {
                    IComposedStructure parentStructure__AssemblyContextCasted = item.As <IComposedStructure>();
                    if ((parentStructure__AssemblyContextCasted != null))
                    {
                        this._parent.ParentStructure__AssemblyContext = parentStructure__AssemblyContextCasted;
                        return;
                    }
                }
                if ((this._parent.EncapsulatedComponent__AssemblyContext == null))
                {
                    IRepositoryComponent encapsulatedComponent__AssemblyContextCasted = item.As <IRepositoryComponent>();
                    if ((encapsulatedComponent__AssemblyContextCasted != null))
                    {
                        this._parent.EncapsulatedComponent__AssemblyContext = encapsulatedComponent__AssemblyContextCasted;
                        return;
                    }
                }
                IVariableUsage configParameterUsages__AssemblyContextCasted = item.As <IVariableUsage>();

                if ((configParameterUsages__AssemblyContextCasted != null))
                {
                    this._parent.ConfigParameterUsages__AssemblyContext.Add(configParameterUsages__AssemblyContextCasted);
                }
            }
Esempio n. 2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.AssemblyContext_userData == null))
                {
                    IAssemblyContext assemblyContext_userDataCasted = item.As <IAssemblyContext>();
                    if ((assemblyContext_userDataCasted != null))
                    {
                        this._parent.AssemblyContext_userData = assemblyContext_userDataCasted;
                        return;
                    }
                }
                if ((this._parent.UsageModel_UserData == null))
                {
                    IUsageModel usageModel_UserDataCasted = item.As <IUsageModel>();
                    if ((usageModel_UserDataCasted != null))
                    {
                        this._parent.UsageModel_UserData = usageModel_UserDataCasted;
                        return;
                    }
                }
                IVariableUsage userDataParameterUsages_UserDataCasted = item.As <IVariableUsage>();

                if ((userDataParameterUsages_UserDataCasted != null))
                {
                    this._parent.UserDataParameterUsages_UserData.Add(userDataParameterUsages_UserDataCasted);
                }
            }
Esempio n. 3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.EventType__EmitEventAction == null))
                {
                    IEventType eventType__EmitEventActionCasted = item.As <IEventType>();
                    if ((eventType__EmitEventActionCasted != null))
                    {
                        this._parent.EventType__EmitEventAction = eventType__EmitEventActionCasted;
                        return;
                    }
                }
                if ((this._parent.SourceRole__EmitEventAction == null))
                {
                    ISourceRole sourceRole__EmitEventActionCasted = item.As <ISourceRole>();
                    if ((sourceRole__EmitEventActionCasted != null))
                    {
                        this._parent.SourceRole__EmitEventAction = sourceRole__EmitEventActionCasted;
                        return;
                    }
                }
                IVariableUsage inputVariableUsages__CallActionCasted = item.As <IVariableUsage>();

                if ((inputVariableUsages__CallActionCasted != null))
                {
                    this._parent.InputVariableUsages__CallAction.Add(inputVariableUsages__CallActionCasted);
                }
            }
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.Signature_SpecifiedOutputParameterAbstraction == item))
                {
                    this._parent.Signature_SpecifiedOutputParameterAbstraction = null;
                    return(true);
                }
                if ((this._parent.Role_SpecifiedOutputParameterAbstraction == item))
                {
                    this._parent.Role_SpecifiedOutputParameterAbstraction = null;
                    return(true);
                }
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.ExpectedExternalOutputs_SpecifiedOutputParameterAbstraction.Remove(variableUsageItem)))
                {
                    return(true);
                }
                if ((this._parent.QosAnnotations_SpecifiedOutputParameterAbstraction == item))
                {
                    this._parent.QosAnnotations_SpecifiedOutputParameterAbstraction = null;
                    return(true);
                }
                return(false);
            }
Esempio n. 5
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.ProvidedRole_EntryLevelSystemCall == item))
                {
                    this._parent.ProvidedRole_EntryLevelSystemCall = null;
                    return(true);
                }
                if ((this._parent.OperationSignature__EntryLevelSystemCall == item))
                {
                    this._parent.OperationSignature__EntryLevelSystemCall = null;
                    return(true);
                }
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.OutputParameterUsages_EntryLevelSystemCall.Remove(variableUsageItem)))
                {
                    return(true);
                }
                if (((variableUsageItem != null) &&
                     this._parent.InputParameterUsages_EntryLevelSystemCall.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 6
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.ProvidedRole_EntryLevelSystemCall == null))
                {
                    IOperationProvidedRole providedRole_EntryLevelSystemCallCasted = item.As <IOperationProvidedRole>();
                    if ((providedRole_EntryLevelSystemCallCasted != null))
                    {
                        this._parent.ProvidedRole_EntryLevelSystemCall = providedRole_EntryLevelSystemCallCasted;
                        return;
                    }
                }
                if ((this._parent.OperationSignature__EntryLevelSystemCall == null))
                {
                    IOperationSignature operationSignature__EntryLevelSystemCallCasted = item.As <IOperationSignature>();
                    if ((operationSignature__EntryLevelSystemCallCasted != null))
                    {
                        this._parent.OperationSignature__EntryLevelSystemCall = operationSignature__EntryLevelSystemCallCasted;
                        return;
                    }
                }
                IVariableUsage outputParameterUsages_EntryLevelSystemCallCasted = item.As <IVariableUsage>();

                if ((outputParameterUsages_EntryLevelSystemCallCasted != null))
                {
                    this._parent.OutputParameterUsages_EntryLevelSystemCall.Add(outputParameterUsages_EntryLevelSystemCallCasted);
                }
                IVariableUsage inputParameterUsages_EntryLevelSystemCallCasted = item.As <IVariableUsage>();

                if ((inputParameterUsages_EntryLevelSystemCallCasted != null))
                {
                    this._parent.InputParameterUsages_EntryLevelSystemCall.Add(inputParameterUsages_EntryLevelSystemCallCasted);
                }
            }
Esempio n. 7
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage userDataParameterUsages_UserDataCasted = item.As <IVariableUsage>();

                if ((userDataParameterUsages_UserDataCasted != null))
                {
                    this._parent.UserDataParameterUsages_UserData.Add(userDataParameterUsages_UserDataCasted);
                }
            }
Esempio n. 8
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage configParameterUsages__AssemblyContextCasted = item.As <IVariableUsage>();

                if ((configParameterUsages__AssemblyContextCasted != null))
                {
                    this._parent.ConfigParameterUsages__AssemblyContext.Add(configParameterUsages__AssemblyContextCasted);
                }
            }
Esempio n. 9
0
        /// <summary>
        /// Gets called when the parent model element of the current model element is about to change
        /// </summary>
        /// <param name="oldParent">The old parent model element</param>
        /// <param name="newParent">The new parent model element</param>
        protected override void OnParentChanging(IModelElement newParent, IModelElement oldParent)
        {
            IVariableUsage        oldVariableUsage_VariableCharacterisation = ModelHelper.CastAs <IVariableUsage>(oldParent);
            IVariableUsage        newVariableUsage_VariableCharacterisation = ModelHelper.CastAs <IVariableUsage>(newParent);
            ValueChangedEventArgs e = new ValueChangedEventArgs(oldVariableUsage_VariableCharacterisation, newVariableUsage_VariableCharacterisation);

            this.OnVariableUsage_VariableCharacterisationChanging(e);
            this.OnPropertyChanging("VariableUsage_VariableCharacterisation", e, _variableUsage_VariableCharacterisationReference);
        }
Esempio n. 10
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage componentParameterUsage_ImplementationComponentTypeCasted = item.As <IVariableUsage>();

                if ((componentParameterUsage_ImplementationComponentTypeCasted != null))
                {
                    this._parent.ComponentParameterUsage_ImplementationComponentType.Add(componentParameterUsage_ImplementationComponentTypeCasted);
                }
            }
Esempio n. 11
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage inputVariableUsages__CallActionCasted = item.As <IVariableUsage>();

                if ((inputVariableUsages__CallActionCasted != null))
                {
                    this._parent.InputVariableUsages__CallAction.Add(inputVariableUsages__CallActionCasted);
                }
            }
Esempio n. 12
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage localVariableUsages_SetVariableActionCasted = item.As <IVariableUsage>();

                if ((localVariableUsages_SetVariableActionCasted != null))
                {
                    this._parent.LocalVariableUsages_SetVariableAction.Add(localVariableUsages_SetVariableActionCasted);
                }
            }
Esempio n. 13
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage returnVariableUsage__CallReturnActionCasted = item.As <IVariableUsage>();

                if ((returnVariableUsage__CallReturnActionCasted != null))
                {
                    this._parent.ReturnVariableUsage__CallReturnAction.Add(returnVariableUsage__CallReturnActionCasted);
                }
            }
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage expectedExternalOutputs_SpecifiedOutputParameterAbstractionCasted = item.As <IVariableUsage>();

                if ((expectedExternalOutputs_SpecifiedOutputParameterAbstractionCasted != null))
                {
                    this._parent.ExpectedExternalOutputs_SpecifiedOutputParameterAbstraction.Add(expectedExternalOutputs_SpecifiedOutputParameterAbstractionCasted);
                }
            }
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.ExpectedExternalOutputs_SpecifiedOutputParameterAbstraction.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 16
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.LocalVariableUsages_SetVariableAction.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 17
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.UserDataParameterUsages_UserData.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 18
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.ConfigParameterUsages__AssemblyContext.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 19
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.ComponentParameterUsage_ImplementationComponentType.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 20
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage outputParameterUsage_SynchronisationPointCasted = item.As <IVariableUsage>();

                if ((outputParameterUsage_SynchronisationPointCasted != null))
                {
                    this._parent.OutputParameterUsage_SynchronisationPoint.Add(outputParameterUsage_SynchronisationPointCasted);
                }
                IForkedBehaviour synchronousForkedBehaviours_SynchronisationPointCasted = item.As <IForkedBehaviour>();

                if ((synchronousForkedBehaviours_SynchronisationPointCasted != null))
                {
                    this._parent.SynchronousForkedBehaviours_SynchronisationPoint.Add(synchronousForkedBehaviours_SynchronisationPointCasted);
                }
            }
Esempio n. 21
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage outputParameterUsages_EntryLevelSystemCallCasted = item.As <IVariableUsage>();

                if ((outputParameterUsages_EntryLevelSystemCallCasted != null))
                {
                    this._parent.OutputParameterUsages_EntryLevelSystemCall.Add(outputParameterUsages_EntryLevelSystemCallCasted);
                }
                IVariableUsage inputParameterUsages_EntryLevelSystemCallCasted = item.As <IVariableUsage>();

                if ((inputParameterUsages_EntryLevelSystemCallCasted != null))
                {
                    this._parent.InputParameterUsages_EntryLevelSystemCall.Add(inputParameterUsages_EntryLevelSystemCallCasted);
                }
            }
Esempio n. 22
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.OutputParameterUsages_EntryLevelSystemCall.Remove(variableUsageItem)))
                {
                    return(true);
                }
                if (((variableUsageItem != null) &&
                     this._parent.InputParameterUsages_EntryLevelSystemCall.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 23
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.OutputParameterUsage_SynchronisationPoint.Remove(variableUsageItem)))
                {
                    return(true);
                }
                IForkedBehaviour forkedBehaviourItem = item.As <IForkedBehaviour>();

                if (((forkedBehaviourItem != null) &&
                     this._parent.SynchronousForkedBehaviours_SynchronisationPoint.Remove(forkedBehaviourItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 24
0
        /// <summary>
        /// Gets called when the parent model element of the current model element changes
        /// </summary>
        /// <param name="oldParent">The old parent model element</param>
        /// <param name="newParent">The new parent model element</param>
        protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent)
        {
            IVariableUsage oldVariableUsage_VariableCharacterisation = ModelHelper.CastAs <IVariableUsage>(oldParent);
            IVariableUsage newVariableUsage_VariableCharacterisation = ModelHelper.CastAs <IVariableUsage>(newParent);

            if ((oldVariableUsage_VariableCharacterisation != null))
            {
                oldVariableUsage_VariableCharacterisation.VariableCharacterisation_VariableUsage.Remove(this);
            }
            if ((newVariableUsage_VariableCharacterisation != null))
            {
                newVariableUsage_VariableCharacterisation.VariableCharacterisation_VariableUsage.Add(this);
            }
            ValueChangedEventArgs e = new ValueChangedEventArgs(oldVariableUsage_VariableCharacterisation, newVariableUsage_VariableCharacterisation);

            this.OnVariableUsage_VariableCharacterisationChanged(e);
            this.OnPropertyChanged("VariableUsage_VariableCharacterisation", e, _variableUsage_VariableCharacterisationReference);
            base.OnParentChanged(newParent, oldParent);
        }
Esempio n. 25
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.EventType__EmitEventAction == item))
                {
                    this._parent.EventType__EmitEventAction = null;
                    return(true);
                }
                if ((this._parent.SourceRole__EmitEventAction == item))
                {
                    this._parent.SourceRole__EmitEventAction = null;
                    return(true);
                }
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.InputVariableUsages__CallAction.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 26
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.Specification_VariableCharacterisation == null))
     {
         IPCMRandomVariable specification_VariableCharacterisationCasted = item.As <IPCMRandomVariable>();
         if ((specification_VariableCharacterisationCasted != null))
         {
             this._parent.Specification_VariableCharacterisation = specification_VariableCharacterisationCasted;
             return;
         }
     }
     if ((this._parent.VariableUsage_VariableCharacterisation == null))
     {
         IVariableUsage variableUsage_VariableCharacterisationCasted = item.As <IVariableUsage>();
         if ((variableUsage_VariableCharacterisationCasted != null))
         {
             this._parent.VariableUsage_VariableCharacterisation = variableUsage_VariableCharacterisationCasted;
             return;
         }
     }
 }
Esempio n. 27
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.ParentStructure__AssemblyContext == item))
                {
                    this._parent.ParentStructure__AssemblyContext = null;
                    return(true);
                }
                if ((this._parent.EncapsulatedComponent__AssemblyContext == item))
                {
                    this._parent.EncapsulatedComponent__AssemblyContext = null;
                    return(true);
                }
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.ConfigParameterUsages__AssemblyContext.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 28
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.AssemblyContext_userData == item))
                {
                    this._parent.AssemblyContext_userData = null;
                    return(true);
                }
                if ((this._parent.UsageModel_UserData == item))
                {
                    this._parent.UsageModel_UserData = null;
                    return(true);
                }
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.UserDataParameterUsages_UserData.Remove(variableUsageItem)))
                {
                    return(true);
                }
                return(false);
            }
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.Signature_SpecifiedOutputParameterAbstraction == null))
                {
                    ISignature signature_SpecifiedOutputParameterAbstractionCasted = item.As <ISignature>();
                    if ((signature_SpecifiedOutputParameterAbstractionCasted != null))
                    {
                        this._parent.Signature_SpecifiedOutputParameterAbstraction = signature_SpecifiedOutputParameterAbstractionCasted;
                        return;
                    }
                }
                if ((this._parent.Role_SpecifiedOutputParameterAbstraction == null))
                {
                    IRole role_SpecifiedOutputParameterAbstractionCasted = item.As <IRole>();
                    if ((role_SpecifiedOutputParameterAbstractionCasted != null))
                    {
                        this._parent.Role_SpecifiedOutputParameterAbstraction = role_SpecifiedOutputParameterAbstractionCasted;
                        return;
                    }
                }
                IVariableUsage expectedExternalOutputs_SpecifiedOutputParameterAbstractionCasted = item.As <IVariableUsage>();

                if ((expectedExternalOutputs_SpecifiedOutputParameterAbstractionCasted != null))
                {
                    this._parent.ExpectedExternalOutputs_SpecifiedOutputParameterAbstraction.Add(expectedExternalOutputs_SpecifiedOutputParameterAbstractionCasted);
                }
                if ((this._parent.QosAnnotations_SpecifiedOutputParameterAbstraction == null))
                {
                    IQoSAnnotations qosAnnotations_SpecifiedOutputParameterAbstractionCasted = item.As <IQoSAnnotations>();
                    if ((qosAnnotations_SpecifiedOutputParameterAbstractionCasted != null))
                    {
                        this._parent.QosAnnotations_SpecifiedOutputParameterAbstraction = qosAnnotations_SpecifiedOutputParameterAbstractionCasted;
                        return;
                    }
                }
            }