예제 #1
0
        void DoFill(TAlternativeParserGrpCrossItem AItem)
        {
            int m_who;
            TAlternativeParserGrpItemTFS      mTfs;
            TAlternativeParserGrpItemBase     mBase;
            TAlternativeParserGrpCrossItemOut mOut;
            TAlternativeParserEnlargerItem    Item = GetNew(AItem);

            Item.Basis = true;
            for (int i = 0; i <= AItem.CountBasis - 1; i++)
            {
                Item.AddTfsItem((TAlternativeParserGrpItemTFS)(AItem.GetItemsBasis(i)));
            }

            for (int i = 0; i <= AItem.CountOut - 1; i++)
            {
                mOut        = AItem.GetItemsOut(i);
                Item        = GetNew(AItem);
                Item.Parent = mOut;
                for (int j = 0; j <= mOut.Count - 1; j++)
                {
                    mBase = mOut.GetItems(j);
                    m_who = mBase.Who();
                    if (m_who == 0)
                    {
                        mTfs = (TAlternativeParserGrpItemTFS)(mBase);
                        Item.AddTfsItem(mTfs);
                    }
                }
            }
        }
예제 #2
0
 public TAlternativeParserEnlargerItem()
 {
     f_List       = new List <object>();
     f_Basis      = false;
     f_Parent     = null;
     f_ParentMain = null;
 }
예제 #3
0
        void CrossToBigs(TAlternativeParserGrpCrossItem ACrossItem, TAlternativeParserItemBig ABig)
        {
            TAlternativeParserGrpItemBase     Base;
            TAlternativeParserGrpCrossItemOut Cross;
            TAlternativeParserItemBig         mHeadBig = new TAlternativeParserItemBig();

            mHeadBig.OwnerBig = ABig;
            ABig.MainList.Append(mHeadBig);

            TAlternativeParserItemBig mBig = new TAlternativeParserItemBig();

            for (int i = 0; i <= ACrossItem.CountBasis - 1; i++)
            {
                FillItemGrp(ACrossItem.GetItemsBasis(i), ref mBig);
            }
            mBig.Check    = true;
            mBig.OwnerBig = mHeadBig;
            mBig.NumAlt   = 0;
            mBig.Cross    = true;
            mHeadBig.AddBig(mBig);
            for (int i = 0; i <= ACrossItem.CountOut - 1; i++)
            {
                mBig       = new TAlternativeParserItemBig();
                Cross      = ACrossItem.GetItemsOut(i);
                mBig.Check = true;
                mBig.Cross = true;
                for (int j = 0; j <= Cross.Count - 1; j++)
                {
                    FillItemGrp(Cross.GetItems(j), ref mBig);
                }
                mBig.NumAlt   = i + 1;
                mBig.OwnerBig = mHeadBig;
                mHeadBig.AddBig(mBig);
            }
        }
예제 #4
0
        TAlternativeParserEnlargerItem GetNew(TAlternativeParserGrpCrossItem AParentMain)
        {
            TAlternativeParserEnlargerItem Item = new TAlternativeParserEnlargerItem();

            Item.ParentMain = AParentMain;
            f_List.Add(Item);
            return(Item);
        }
예제 #5
0
        public void FindTrashItem(TAlternativeParserGrpCrossItem AOwner, TDynamicArray AOut)
        {
            TAlternativeParserEnlargerTrashItem Item;

            AOut.Clear();
            for (int i = 0; i <= f_Trash.Count - 1; i++)
            {
                Item = f_Trash.GetItems(i);
                if (Item.Owner.ParentMain == AOwner)
                {
                    AOut.Append(Item);
                }
            }
        }
예제 #6
0
        void RestructEnlarge(TAlternativeParserGrpCrossItem AItem)
        {
            TAlternativeParserGrpItemTFS          mPos;
            TAlternativeParserGrpCrossItemEnlarge Enl;
            TAlternativeParserEnlargerTrashItem   TrItem;
            TDynamicArray Mass = new TDynamicArray();

            f_Enlarger.FindTrashItem(AItem, Mass);
            for (int i = 0; i <= Mass.Count - 1; i++)
            {
                TrItem = (TAlternativeParserEnlargerTrashItem)(Mass.GetItems(i));
                Enl    = AItem.FindEnlarge(TrItem.Pos);
                if (Enl == null)
                {
                    AddToListEnlarge(AItem.RestructEnlarge(TrItem));
                }
            }
            Mass = null;
        }
예제 #7
0
        void MakeOUT()
        {
            TAlternativeParserGrpItemList Temp;
            TAlternativeParserGrpItemBase Item;
            TDynamicArray D = new TDynamicArray();

            for (int i = 0; i <= f_List.Count - 1; i++)
            {
                Item = (TAlternativeParserGrpItemBase)(f_List.ElementAt(i));
                int m_who = Item.Who();
                if (m_who <= 0)
                {
                    f_ListOut.Add(Item);
                }
                if (m_who == 1)
                {
                    Temp = (TAlternativeParserGrpItemList)(Item);
                    Item = CheckOut(Temp);
                    if (Item != null)
                    {
                        if (D.Find(Item) == null)
                        {
                            D.Append(Item);
                            f_ListOut.Add(Item);
                            if (Item.Who() == 2)
                            {
                                TAlternativeParserGrpCrossItem iTmp = (TAlternativeParserGrpCrossItem)(Item);
                                iTmp.CreateBasis();
                                iTmp.CreateListOut();
                            }
                        }
                    }
                }
            }
            D = null;
        }
예제 #8
0
        public void AddItem(TAlternativeParserGrpItemList A, TAlternativeParserGrpItemList B)
        {
            TAlternativeParserGrpItemList  T;
            TAlternativeParserGrpCrossItem Item;

            for (int i = 0; i <= Count - 1; i++)
            {
                Item = GetItems(i);
                for (int j = 0; j <= Item.Count - 1; j++)
                {
                    T = Item.GetItems(j);
                    if ((A == T) || (B == T))
                    {
                        Item.AddItem(A);
                        Item.AddItem(B);
                        return;
                    }
                }
            }
            Item = new TAlternativeParserGrpCrossItem();
            Item.AddItem(A);
            Item.AddItem(B);
            f_List.Add(Item);
        }
예제 #9
0
 public void Enlarge(TAlternativeParserGrpCrossItem AItem)
 {
     DoFill(AItem);
     DoEnlarge();
 }