ReverseBidirectionalIterator<TValue> 类

定义

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

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

类型参数

TValue

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

继承
ReverseBidirectionalIterator<TValue>
实现

注解

有些方法(尤其是运算符)声明参数的类型,但不指定参数名称。Some methods, especially operators, declare a type for a parameter but do not specify a parameter name. 此类参数称为“未命名参数” 。Such a parameter is known as an unnamed parameter. 在这些方法的文档中,__unnamed0 占位符表示未命名参数。In the documentation for these methods, the __unnamed0 placeholder represents the unnamed parameter.

构造函数

ReverseBidirectionalIterator<TValue>()

分配并初始化新的 ReverseBidirectionalIterator<TValue> 对象。Allocates and initializes a new ReverseBidirectionalIterator<TValue> object.

ReverseBidirectionalIterator<TValue>(IBidirectionalIterator<TValue>)

从现有 ReverseBidirectionalIterator<TValue> 对象分配并初始化新的 IBidirectionalIterator<TValue> 对象。Allocates and initializes a new ReverseBidirectionalIterator<TValue> object from an existing IBidirectionalIterator<TValue> object.

ReverseBidirectionalIterator<TValue>(ReverseBidirectionalIterator<TValue>)

从现有 ReverseBidirectionalIterator<TValue> 对象分配并初始化新的 ReverseBidirectionalIterator<TValue> 对象。Allocates and initializes a new ReverseBidirectionalIterator<TValue> object from an existing ReverseBidirectionalIterator<TValue> object.

方法

base()

获取 ReverseBidirectionalIterator<TValue> 对象的基础基迭代器。Gets the underlying base iterator for the ReverseBidirectionalIterator<TValue> object.

Clone()

返回当前 ReverseBidirectionalIterator<TValue> 对象的副本。Returns a copy of the current ReverseBidirectionalIterator<TValue> object.

container()

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

equal_to(IInputIterator<TValue>)

确定给定 IInputIterator<TValue> 对象是否与当前 ReverseBidirectionalIterator<TValue> 对象相同。Determines whether the given IInputIterator<TValue> object is the same as the current ReverseBidirectionalIterator<TValue> object.

equal_to(ReverseBidirectionalIterator<TValue>)

确定给定 ReverseBidirectionalIterator<TValue> 对象是否与当前 ReverseBidirectionalIterator<TValue> 对象相同。Determines whether the given ReverseBidirectionalIterator<TValue> object is the same as the current ReverseBidirectionalIterator<TValue> object.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
get_bias()

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

get_cref()

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

get_node()

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

get_ref()

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

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
next()

将迭代器递减到基础容器中的上一个位置,如果已完全遍历此容器,则递减到容器开始位置前面的第一个位置。Decrements the iterator to the previous position in the underlying container, or to the first position in front of the beginning of container if the container has been completely traversed.

prev()

将迭代器递增到基础容器中的下一个位置,如果已完全遍历该容器,则递增到容器末尾以外的第一个位置。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.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
valid()

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

运算符

Assign(ReverseBidirectionalIterator<TValue>)

将给定 ReverseBidirectionalIterator<TValue> 对象分配给当前对象。Assigns the given ReverseBidirectionalIterator<TValue> object to the current object.

Decrement(Int32, Int32)

迭代器递减一个元素。Decrements the iterator by one element. 递减反向迭代器与递增正则迭代器相同。Decrementing a reverse iterator is the same as incrementing a regular iterator. 这是减量运算符的后缀版本。This is the postfix version of the decrement operator.

Decrement(ReverseBidirectionalIterator<TValue>)

迭代器递减一个元素。Decrements the iterator by one element. 递减反向迭代器与递增正则迭代器相同。Decrementing a reverse iterator is the same as incrementing a regular iterator. 这是减量运算符的前缀版本。This is the prefix version of the decrement operator.

Equality(IInputIterator<TValue>)

确定给定 IInputIterator<TValue> 对象是否与当前 ReverseBidirectionalIterator<TValue> 对象相同。Determines whether the given IInputIterator<TValue> object is the same as the current ReverseBidirectionalIterator<TValue> object.

Equality(ReverseBidirectionalIterator<TValue>)

确定给定 ReverseBidirectionalIterator<TValue> 对象是否与当前 ReverseBidirectionalIterator<TValue> 对象相同。Determines whether the given ReverseBidirectionalIterator<TValue> object is the same as the current ReverseBidirectionalIterator<TValue> object.

Implicit

ReverseBidirectionalIterator<TValue> 转换为 IBidirectionalIterator<TValue>Converts a ReverseBidirectionalIterator<TValue> to an IBidirectionalIterator<TValue>.

Increment(Int32, Int32)

迭代器递增一个元素。Increments the iterator by one element. 递增反向迭代器与递减正则迭代器相同。Incrementing a reverse iterator is the same as decrementing a regular iterator. 这是增量运算符的后缀版本。This is the postfix version of the increment operator.

Increment(ReverseBidirectionalIterator<TValue>)

迭代器递增一个元素。Increments the iterator by one element. 递增反向迭代器与递减正则迭代器相同。Incrementing a reverse iterator is the same as decrementing a regular iterator. 这是递增运算符的前缀版本。This is the prefix version of the increment operator.

Inequality(IInputIterator<TValue>)

确定给定的 IInputIterator<TValue> 对象是否与当前的 ReverseBidirectionalIterator<TValue> 对象不同。Determines whether the given IInputIterator<TValue> object differs from the current ReverseBidirectionalIterator<TValue> object.

Inequality(ReverseBidirectionalIterator<TValue>)

确定给定的 ReverseBidirectionalIterator<TValue> 对象是否与当前的 ReverseBidirectionalIterator<TValue> 对象不同。Determines whether the given ReverseBidirectionalIterator<TValue> object differs from the current ReverseBidirectionalIterator<TValue> object.

MemberSelection(ReverseBidirectionalIterator<TValue>)

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

PointerDereference(ReverseBidirectionalIterator<TValue>)

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

适用于