IBidirectionalIterator<TValue> 接口

定义

迭代器的接口,该迭代器可以向前(通过使用递增运算符)或向后(通过使用递减运算符)访问容器中的元素。Interface for an iterator that can access elements in a container in the forward direction by using the increment operator and in the backward direction by using the decrement operator. 迭代器指向的元素可以写入和读出任意多次。The element that the iterator points to can be both written to and read from any number of times. 无论是需要输入迭代器还是输出迭代器,均可以使用双向迭代器。Bidirectional iterators can be used anywhere an input or output iterator is required.

generic <typename TValue>
public interface class IBidirectionalIterator : Microsoft::VisualC::StlClr::Generic::IForwardIterator<TValue>
public interface IBidirectionalIterator<TValue> : Microsoft.VisualC.StlClr.Generic.IForwardIterator<TValue>
type IBidirectionalIterator<'Value> = interface
    interface IForwardIterator<'Value>
Public Interface IBidirectionalIterator(Of TValue)
Implements IForwardIterator(Of TValue)

类型参数

TValue

受控序列中的元素的类型。The type of an element in the controlled sequence.

派生
实现

方法

Clone()

创建作为当前实例副本的新对象。Creates a new object that is a copy of the current instance.

(继承自 ICloneable)
container()

获取迭代器正在遍历的容器。Gets the container that the iterator is traversing.

(继承自 IBaseIterator<TValue>)
equal_to(IInputIterator<TValue>)

确定两个 IInputIterator<TValue> 对象是否相等。Determines whether two IInputIterator<TValue> objects are equal.

(继承自 IInputIterator<TValue>)
get_bias()

获取迭代器的偏移。Gets the bias of the iterator. 偏移是迭代器相对于元素零的偏移量。The bias is the offset of the iterator from element zero.

(继承自 IBaseIterator<TValue>)
get_cref()

返回对迭代器当前指向的元素的常量引用。Returns a constant reference to the element that the iterator is currently pointing to.

(继承自 IInputIterator<TValue>)
get_node()

获取迭代器指向的节点或元素。Gets the node, or element, that the iterator is pointing to.

(继承自 IBaseIterator<TValue>)
get_ref()

返回对迭代器当前指向的元素的引用。Returns a reference to the element that the iterator is currently pointing to.

(继承自 IOutputIterator<TValue>)
next()

将迭代器递增到基础容器中的下一个位置,如果已完全遍历该容器,则递增到容器末尾以外的第一个位置。Increments the iterator to the next position in the underlying container, or to the first position beyond the end of container if the container has been completely traversed.

(继承自 IBaseIterator<TValue>)
prev()

将迭代器定位到紧靠当前元素之前的元素。Positions the iterator to the element immediately before the current element.

valid()

确定迭代器是否有效并可安全用于遍历基础容器。Determines whether the iterator is valid and can be safely used to traverse the underlying container.

(继承自 IBaseIterator<TValue>)

适用于