Ejemplo n.º 1
0
 void PushTFS(TPredicateItemTFS ATFS, TDynamicArray AStack)
 {
     for (int i = 0; i <= ATFS.TFECount - 1; i++)
     {
         if (ATFS.GetTFEItems(i).Big != null)
         {
             AStack.InsertToFirst(ATFS.GetTFEItems(i).Big);
         }
     }
 }
Ejemplo n.º 2
0
        void DoCopyTree(ref TPredicateItemBig ABig, ref TDynamicArray AStack)
        {
            int m_who;
            TAlternativeParserItemList ML;
            TAlternativeParserItemBase mBase;
            TAlternativeParserItemTFS  mTFS;
            TAlternativeParserItemBig  mBig;
            TPredicateItemTFE          mTFE;
            TAlternativeParserItemBig  mRfc = ABig.Rfc;

            ML = mRfc.MainList;
            for (int i = 0; i <= ML.Count - 1; i++)
            {
                mBase = ML.GetItems(i);
                m_who = mBase.Who();
                if (m_who == 0)
                {
                    mTFS = (TAlternativeParserItemTFS)(mBase);
                    TPredicateItemTFS iTfs = new TPredicateItemTFS();
                    iTfs.Assign(mTFS);
                    ABig.AddItem(iTfs);
                    for (int j = 0; j <= iTfs.TFECount - 1; j++)
                    {
                        mTFE = iTfs.GetTFEItems(j);
                        if (mTFE.RfcTFE.Big != null)
                        {
                            TPredicateItemBig iBig = NewBig(mTFE.RfcTFE.Big);
                            mTFE.Big = iBig;
                            AStack.InsertToFirst(iBig);
                        }
                    }
                }
                if (m_who == 1)
                {
                    mBig = (TAlternativeParserItemBig)(mBase);
                    TPredicateItemBig iBig = NewBig(mBig);
                    ABig.AddItem(iBig);
                    AStack.InsertToFirst(iBig);
                }
            }

            for (int i = 0; i <= mRfc.CountBig - 1; i++)
            {
                mBig = mRfc.GetItemsBig(i);
                TPredicateItemBig iBig = NewBig(mBig);
                ABig.AddItem(iBig);
                AStack.InsertToFirst(iBig);
            }
        }
Ejemplo n.º 3
0
        void PushTFS(TPredicateItemTFS ATFS, ref TDynamicArray AStack)
        {
            int m_type = ATFS.TFS.BaseWorkShape.TypeShape;

            if ((m_type != 1) || ((m_type == 1) && (ATFS.EnvelopeBIG != null)))
            {
                AStack.InsertToFirst(ATFS);
            }
            for (int i = 0; i <= ATFS.TFECount - 1; i++)
            {
                if (ATFS.GetTFEItems(i).Big != null)
                {
                    AStack.InsertToFirst(ATFS.GetTFEItems(i).Big);
                }
            }
        }
Ejemplo n.º 4
0
        void MakeElement(TPredicateItemBase AElement)
        {
            int m_who = AElement.Who();

            if (m_who == 1)
            {
                //throw(Exception("недопустимо использование MakeElement(TPredicateItemBase* AElement). Обратитесь к разработчикам!"));
            }
            if (m_who == 2)
            {
                TPredicateItemPWork m_PW = (TPredicateItemPWork)(AElement);
                MakeElement(m_PW.Item1);
                MakeElement(m_PW.Item2);
            }
            if (m_who == 0)
            {
                TPredicateItemTFS m_TFS = (TPredicateItemTFS)(AElement);
                MakeElementTFS(m_TFS);
            }
        }
Ejemplo n.º 5
0
        void MakeElementTFS(TPredicateItemTFS ATFS)
        {
            int            n, m_who;
            TBaseShape     B;
            string         S;
            TDynamicArray  D  = new TDynamicArray();
            TBaseWorkShape WS = ATFS.TFS.BaseWorkShape;

            ATFS.ListIDFill(D);
            for (int i = 0; i <= D.Count - 1; i++)
            {
                n     = D.GetPosition(i).Int_Value;
                B     = WS.ShapeSupportID(n);
                m_who = B.TypeShape;
                S     = B.Make_One_Simple();
                if (S.Length > 0)
                {
                    if (m_who == 5)
                    {
                        f_PrRab = f_PrRab + S + "\r\n";
                    }
                    if (m_who == 6)
                    {
                        f_PrControlRab = f_PrControlRab + S + "\r\n";
                    }
                    if (m_who == 7)
                    {
                        f_PrControlFunc = f_PrControlFunc + S + "\r\n";
                    }
                    if (m_who == 8)
                    {
                        f_PrCheckCondition = f_PrCheckCondition + S + "\r\n";
                    }
                }
            }
            D = null;
        }