/// <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) { IDPL dPLItem = item.As<IDPL>(); if (((dPLItem != null) && this._parent.DPL.Remove(dPLItem))) { return true; } ILPL lPLItem = item.As<ILPL>(); if (((lPLItem != null) && this._parent.LPL.Remove(lPLItem))) { return true; } ICSD cSDItem = item.As<ICSD>(); if (((cSDItem != null) && this._parent.CSD.Remove(cSDItem))) { return true; } IC_PrimitiveCDC c_PrimitiveCDCItem = item.As<IC_PrimitiveCDC>(); if (((c_PrimitiveCDCItem != null) && this._parent.C_PrimitiveCDC.Remove(c_PrimitiveCDCItem))) { 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.Mode == null)) { IINC modeCasted = item.As <IINC>(); if ((modeCasted != null)) { this._parent.Mode = modeCasted; return; } } if ((this._parent.Behaviour == null)) { IINS behaviourCasted = item.As <IINS>(); if ((behaviourCasted != null)) { this._parent.Behaviour = behaviourCasted; return; } } if ((this._parent.Health == null)) { IINS healthCasted = item.As <IINS>(); if ((healthCasted != null)) { this._parent.Health = healthCasted; return; } } if ((this._parent.NamePlt == null)) { ILPL namePltCasted = item.As <ILPL>(); if ((namePltCasted != null)) { this._parent.NamePlt = namePltCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IDPL dPLCasted = item.As<IDPL>(); if ((dPLCasted != null)) { this._parent.DPL.Add(dPLCasted); } ILPL lPLCasted = item.As<ILPL>(); if ((lPLCasted != null)) { this._parent.LPL.Add(lPLCasted); } ICSD cSDCasted = item.As<ICSD>(); if ((cSDCasted != null)) { this._parent.CSD.Add(cSDCasted); } IC_PrimitiveCDC c_PrimitiveCDCCasted = item.As<IC_PrimitiveCDC>(); if ((c_PrimitiveCDCCasted != null)) { this._parent.C_PrimitiveCDC.Add(c_PrimitiveCDCCasted); } }