public MergingIterator(Comparator comparator, Iterator[] children) { comparator_ = comparator; children_ = new IteratorWrapper[children.Length]; current_ = null; direction_ = Direction.kForward; for (int i = 0; i < children.Length; i++) children_[i] = new IteratorWrapper(children[i]); }
public TwoLevelIterator( Iterator index_iter, BlockFunctionDelegate block_function, object arg, ReadOptions options) { block_function_ = block_function; arg_ = arg; options_ = options; index_iter_ = new IteratorWrapper(index_iter); data_iter_ = null; }
internal static Iterator NewTwoLevelIterator( Iterator index_iter, BlockFunctionDelegate block_function, object arg, ReadOptions options) { return new TwoLevelIterator(index_iter, block_function, arg, options); }
internal static Iterator NewMergingIterator(Comparator comparator, Iterator[] children) { Debug.Assert(children.Length >= 0); if (children.Length == 0) { return EmptyIterator; } else if (children.Length == 1) { return children[0]; } else { return new MergingIterator(comparator, children); } }
public IteratorWrapper(Iterator iter) { Iterator = iter; }
public IteratorWrapper() { iter_ = null; valid_ = false; }
void SetDataIterator(Iterator data_iter) { if (data_iter_.Iterator != null) SaveError(data_iter_.Status); data_iter_.Iterator = data_iter; }