Example #1
0
 private SimpleSlashIterator(SimpleSlashIterator other) : base(other)
 {
     this._expr = other._expr;
     this._left = (BaseIterator)other._left.Clone();
     if (other._right != null)
     {
         this._right = (BaseIterator)other._right.Clone();
     }
 }
Example #2
0
        public override object Evaluate(BaseIterator iter)
        {
            BaseIterator iter2 = this.left.EvaluateNodeSet(iter);

            if (this.left.Peer && !this.left.RequireSorting)
            {
                iter2 = new SimpleSlashIterator(iter2, ExprSLASH2.DescendantOrSelfStar);
            }
            else
            {
                BaseIterator baseIterator = new SlashIterator(iter2, ExprSLASH2.DescendantOrSelfStar);
                iter2 = ((!this.left.RequireSorting) ? baseIterator : new SortedIterator(baseIterator));
            }
            SlashIterator iter3 = new SlashIterator(iter2, this.right);

            return(new SortedIterator(iter3));
        }
Example #3
0
		private SimpleSlashIterator (SimpleSlashIterator other)
			: base (other)
		{
			_expr = other._expr;
			_left = (BaseIterator) other._left.Clone ();
			if (other._right != null)
				_right = (BaseIterator) other._right.Clone ();
		}
Example #4
0
		public override object Evaluate (BaseIterator iter)
		{
			BaseIterator il = left.EvaluateNodeSet (iter);
			if (left.Peer && !left.RequireSorting)
				il = new SimpleSlashIterator (
					il, DescendantOrSelfStar);
			else {
				BaseIterator bb = new SlashIterator (il, DescendantOrSelfStar);
				il = left.RequireSorting ? new SortedIterator (bb) : bb;
			}

			// FIXME: there could be chances to introduce sort-less
			// iterator, but no one could do it yet.
			SlashIterator b = new SlashIterator (il, right);
			return new SortedIterator (b);
		}