Example #1
0
        private bool compNodeSetNodeSet(Expr left, Expr right, VTDNav vn, int op)
        {
            int i, i1 = 0, stackSize, s1;

            try
            {
                if (fib1 == null)
                {
                    fib1 = new FastIntBuffer(BUF_SZ_EXP);
                }
                vn.push2();
                stackSize = vn.contextStack2.size;
                while ((i = left.evalNodeSet(vn)) != -1)
                {
                    i1 = getStringVal(vn, i);
                    if (i1 != -1)
                    {
                        fib1.append(i1);
                    }
                }
                left.reset(vn);
                vn.contextStack2.size = stackSize;
                vn.pop2();
                vn.push2();
                stackSize = vn.contextStack2.size;
                while ((i = right.evalNodeSet(vn)) != -1)
                {
                    i1 = getStringVal(vn, i);
                    if (i1 != -1)
                    {
                        s1 = fib1.size();
                        for (int k = 0; k < s1; k++)
                        {
                            bool b = compareVV(fib1.intAt(k), vn, i1, op);
                            if (b)
                            {
                                fib1.clear();
                                vn.contextStack2.size = stackSize;
                                vn.pop2();
                                right.reset(vn);
                                return(true);
                            }
                        }
                    }
                }
                vn.contextStack2.size = stackSize;
                vn.pop2();
                right.reset(vn);
                fib1.clear();
                return(false);
            }
            catch (Exception e)
            {
                fib1.clear();
                throw new System.SystemException("Undefined behavior");
            }
        }
Example #2
0
 public override void clearCache()
 {
     cached = false;
     if (ens != null)
     {
         ens.clear();
     }
     e.clearCache();
 }
Example #3
0
        /// <summary>
        /// Clear will erase all the nodes, internal buffers are reused
        /// </summary>

        public void clear()
        {
            size = position = count = 0;
            fib.clear();
        }