Esempio n. 1
0
 public void AddToAlternate(TTreeListTFS Item)
 {
     if (Item != null)
     {
         f_List.Add(Item);
     }
 }
Esempio n. 2
0
        TAlternativeParserGrpItemTFS FindItemTfs(TTreeListTFS ATFS)
        {
            TAlternativeParserGrpItemTFS  Temp;
            TAlternativeParserGrpItemBase Item;

            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)
                {
                    Temp = (TAlternativeParserGrpItemTFS)(Item);
                    if (Temp.TFS == ATFS)
                    {
                        return(Temp);
                    }
                }
                if (m_who == 1)
                {
                    Temp = ((TAlternativeParserGrpItemList)(Item)).FindItemTfs(ATFS);
                    if (Temp != null)
                    {
                        return(Temp);
                    }
                }
            }
            return(null);
        }
Esempio n. 3
0
 public void AddTfs(TTreeListTFS ATFS)
 {
     if (FindItemTfs(ATFS) == null)
     {
         TAlternativeParserGrpItemTFS T = new TAlternativeParserGrpItemTFS();
         T.TFS = ATFS;
         f_List.Add(T);
     }
 }
Esempio n. 4
0
        public void FillTreeFromList(ref TListNode AListNode)
        {
            TTreeStackItem     Item;
            TAltInfoItem       AltInfoItem;
            TAlternateTreeList AT;
            TNodeMain          Node;
            TTreeListTFS       Tfs;
            TMainTreeList      AMT;
            TMainTreeList      MNew;
            TTreeListItem      LI;

            Init(0);
            Item = f_Stack.GetLevel();
            while (Item != null)
            {
                AMT = FindByLevel(f_TreeList, Item.Level);
                if (AMT != null)
                {
                    AListNode.LoadInfoForAlternate(ref f_AltInfo, Item.Level);
                    for (int i = 0; i <= f_AltInfo.ItemCount - 1; i++)
                    {
                        AltInfoItem        = f_AltInfo.GetItem(i);
                        AT                 = new TAlternateTreeList();
                        AT.MainAlternative = AltInfoItem.Main;
                        AT.NodeStart       = AltInfoItem.NodeStart;
                        AT.NodeEnd         = AltInfoItem.NodeEnd;
                        AT.ID              = AltInfoItem.ID;
                        AT.Num             = AltInfoItem.Num;
                        Node               = AListNode.SearchFirstNodeToAlternate(AltInfoItem.ID, AltInfoItem.Num, Item.Level);
                        while (Node != null)
                        {
                            Tfs = new TTreeListTFS(Node.WorkShape);
                            AT.AddToAlternate(Tfs);
                            for (int j = 0; j <= Tfs.ItemCount - 1; j++)
                            {
                                LI = Tfs.GetTreeTFEItem(j);
                                f_Stack.AddToStack(LI.BaseShape.ID);
                                if (AListNode.IsContainsChildShape(LI.BaseShape.ID))
                                {
                                    if (LI.MainNode == null)
                                    {
                                        MNew        = new TMainTreeList();
                                        MNew.Level  = LI.BaseShape.ID;
                                        LI.MainNode = MNew;
                                    }
                                }
                            }
                            Node = AListNode.SearchNextNodeToAlternate(AltInfoItem.ID, AltInfoItem.Num, Node);
                        }
                        AMT.AddToTree(AT);
                    }
                }
                Item.Fixed = true;
                Item       = f_Stack.GetLevel();
            }
        }
Esempio n. 5
0
 void BasisAdd(TTreeListTFS ATFS)
 {
     for (int i = 0; i <= f_Basis.Count - 1; i++)
     {
         if (f_Basis.GetItems(i) == ATFS)
         {
             return;
         }
     }
     f_Basis.Append(ATFS);
 }
Esempio n. 6
0
        void SetTFS(TTreeListTFS ATFS)
        {
            f_TFS = ATFS;
            TAlternativeParserItemTFE Item;

            FreeList();
            for (int i = 0; i <= ATFS.ItemCount - 1; i++)
            {
                Item     = new TAlternativeParserItemTFE();
                Item.TFE = ATFS.GetTreeTFEItem(i);
                f_List.Add(Item);
            }
        }
Esempio n. 7
0
        /*
         * void __fastcall SetAgregate(TAlternativeParserGrpItemList* AValue);
         * public:
         * TAlternativeParserGrpItemList();
         * ~TAlternativeParserGrpItemList();*/
        public TAlternativeParserGrpItemTFS FindItemTfs(TTreeListTFS ATFS)
        {
            TAlternativeParserGrpItemTFS Item;

            for (int i = 0; i <= f_List.Count - 1; i++)
            {
                Item = (TAlternativeParserGrpItemTFS)(f_List.ElementAt(i));
                if (Item.TFS == ATFS)
                {
                    return(Item);
                }
            }
            return(null);
        }
Esempio n. 8
0
        public void Assign(TAlternativeParserItemTFS ATfs)
        {
            TPredicateItemTFE mTfe;

            FreeList();
            f_TFS  = ATfs.TFS;
            NumAlt = ATfs.NumAlt;
            for (int i = 0; i <= ATfs.TFECount - 1; i++)
            {
                mTfe        = new TPredicateItemTFE();
                mTfe.RfcTFE = ATfs.GetTFEItems(i);
                mTfe.TFE    = ATfs.GetTFEItems(i).TFE;
                f_ListTFE.Add(mTfe);
            }
        }
Esempio n. 9
0
 public TAlternativeParserGrpItemTFS()
 {
     f_TFS = null;
 }
Esempio n. 10
0
 public TAlternativeParserItemTFS()
 {
     f_TFS  = null;
     f_List = new List <object>();
 }
Esempio n. 11
0
 public TPredicateItemTFS()
 {
     f_TFS     = null;
     f_ListTFE = new List <object>();
 }