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); } } } }
public TAlternativeParserEnlargerItem() { f_List = new List <object>(); f_Basis = false; f_Parent = null; f_ParentMain = null; }
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); } }
TAlternativeParserEnlargerItem GetNew(TAlternativeParserGrpCrossItem AParentMain) { TAlternativeParserEnlargerItem Item = new TAlternativeParserEnlargerItem(); Item.ParentMain = AParentMain; f_List.Add(Item); return(Item); }
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); } } }
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; }
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; }
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); }
public void Enlarge(TAlternativeParserGrpCrossItem AItem) { DoFill(AItem); DoEnlarge(); }