public TAlternativeParserEnlargerTrashItem NewTrashItem()
        {
            TAlternativeParserEnlargerTrashItem Item = new TAlternativeParserEnlargerTrashItem();

            f_List.Add(Item);
            return(Item);
        }
        void CreateTrashItem(TAlternativeParserGrpItemTFS APos, int ALength,
                             TAlternativeParserEnlargerItem AOwner, int AID)
        {
            TAlternativeParserEnlargerTrashItem Item = f_Trash.NewTrashItem();

            Item.Pos    = APos;
            Item.Length = ALength;
            Item.Owner  = AOwner;
            Item.ID     = AID;
        }
Beispiel #3
0
        public TAlternativeParserGrpCrossItemEnlarge RestructEnlarge(TAlternativeParserEnlargerTrashItem ATrash)
        {
            TAlternativeParserGrpItemTFS          Tfs;
            TAlternativeParserGrpItemBase         Base;
            TAlternativeParserGrpCrossItemOut     Outs;
            TAlternativeParserGrpCrossItemEnlarge Enl = null;

            for (int i = 0; i <= CountBasis - 1; i++)
            {
                Base = GetItemsBasis(i);
                if ((Base.Who() == 0) && (Base == ATrash.Pos))
                {
                    Enl    = new TAlternativeParserGrpCrossItemEnlarge();
                    Enl.ID = ATrash.ID;
                    for (int j = i; j <= i + ATrash.Length - 1; j++)
                    {
                        Enl.AddGRPTfs((TAlternativeParserGrpItemTFS)(GetItemsBasis(j)));
                    }
                    ReplaceToEnlarge(Enl);
                }
            }

            for (int i = 0; i <= CountOut - 1; i++)
            {
                Outs = GetItemsOut(i);
                for (int j = 0; j <= Outs.Count - 1; j++)
                {
                    Base = Outs.GetItems(j);
                    if ((Base.Who() == 0) && (Base == ATrash.Pos))
                    {
                        if (Enl == null)
                        {
                            Enl    = new TAlternativeParserGrpCrossItemEnlarge();
                            Enl.ID = ATrash.ID;
                            for (int k = j; k <= j + ATrash.Length - 1; k++)
                            {
                                object tmp = Outs.GetItems(k);
                                Enl.AddGRPTfs((TAlternativeParserGrpItemTFS)tmp);
                            }
                        }
                        Outs.ReplaceToEnlarge(Enl);
                    }
                }
            }
            return(Enl);
        }