예제 #1
0
        public void ArrayIDToDelete(TPredicateTreeItem AItem, ref TDynamicArray Arr)
        {
            TPredicateTreeItem Item;

            Arr.Clear();
            int del, cfind;

            for (int i = 0; i <= AItem.Count - 1; i++)
            {
                del   = AItem.GetTFE_ID(i);
                cfind = 0;
                for (int j = 0; j <= f_List.Count - 1; j++)
                {
                    Item = (TPredicateTreeItem)(f_List.ElementAt(j));
                    if (!Item.TReated && (Item != AItem))
                    {
                        for (int k = 0; k <= Item.Count - 1; k++)
                        {
                            if (del == Item.GetTFE_ID(k))
                            {
                                cfind++;
                            }
                        }
                    }
                }
                if (cfind == 0 && Arr.Find(del) == null)
                {
                    Arr.Append(del);
                }
            }
        }
예제 #2
0
        public TPredicateTreeItem FindByTfeID(int AID, TDynamicArray Arr)
        {
            TPredicateTreeItem Item, Res = null;

            if (Arr != null)
            {
                Arr.Clear();
            }
            for (int i = 0; i <= Count - 1; i++)
            {
                Item = GetItems(i);
                for (int j = 0; j <= Item.Count - 1; j++)
                {
                    if (Item.GetTFE_ID(j) == AID)
                    {
                        if (Res == null)
                        {
                            Res = Item;
                        }
                        if (Arr != null)
                        {
                            Arr.Append(Item);
                        }
                    }
                }
            }
            return(Res);
        }
예제 #3
0
        public TPredicateTreeItem NewPredicateTreeItem()
        {
            TPredicateTreeItem N = new TPredicateTreeItem();

            f_List.Add(N);
            return(N);
        }
예제 #4
0
        void AddElementToTree(TPredicateTree APredicateTree)
        {
            TPredicateTreeItem N = new TPredicateTreeItem();

            N.ParentID    = f_Item.ParentID;
            N.ParentShape = f_Item.ParentBaseShape;
            N.NumAlt      = f_Item.Item.NumAlt + 1;
            int m_type, m_who = f_Item.Item.Who();

            m_type = -1;
            if (m_who == 0)
            {
                N.BaseWorkShape = ((TPredicateItemTFS)f_Item.Item).TFS.BaseWorkShape;
                m_type          = N.BaseWorkShape.TypeShape;
            }
            if (m_who == 1)
            {
                m_type = 12;
            }
            if (m_who == 2)
            {
                m_type = 13;
            }
            N.TypeWorkShape = m_type;

            TDynamicArray D = new TDynamicArray();

            f_Item.Item.ListIDFill(D);
            int cnt = D.Count;

            for (int i = 0; i <= cnt - 1; i++)
            {
                N.AddBaseShape((TBaseShape)(D.GetPosition(i).P), D.GetPosition(i).Int_Value);
            }
            D = null;

            APredicateTree.AddPredicateTreeItem(N);
        }
예제 #5
0
 public void AddPredicateTreeItem(TPredicateTreeItem N)
 {
     f_List.Add(N);
 }