Example #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.OwnerBDD == null))
     {
         IBDD ownerBDDCasted = item.As <IBDD>();
         if ((ownerBDDCasted != null))
         {
             this._parent.OwnerBDD = ownerBDDCasted;
             return;
         }
     }
     if ((this._parent.OwnerSubtreeForZero == null))
     {
         ISubtree ownerSubtreeForZeroCasted = item.As <ISubtree>();
         if ((ownerSubtreeForZeroCasted != null))
         {
             this._parent.OwnerSubtreeForZero = ownerSubtreeForZeroCasted;
             return;
         }
     }
     if ((this._parent.OwnerSubtreeForOne == null))
     {
         ISubtree ownerSubtreeForOneCasted = item.As <ISubtree>();
         if ((ownerSubtreeForOneCasted != null))
         {
             this._parent.OwnerSubtreeForOne = ownerSubtreeForOneCasted;
             return;
         }
     }
 }
Example #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)
            {
                ISubtree subtreesCasted = item.As <ISubtree>();

                if ((subtreesCasted != null))
                {
                    this._parent.Subtrees.Add(subtreesCasted);
                }
            }
Example #3
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)
            {
                ISubtree subtreeItem = item.As <ISubtree>();

                if (((subtreeItem != null) &&
                     this._parent.Subtrees.Remove(subtreeItem)))
                {
                    return(true);
                }
                return(false);
            }
Example #4
0
 private void ChangeAssignment(ISubtree current, TreeAssignment item)
 {
 }