ReverseRandomAccessIterator<TValue> 类

定义

提供支持以下操作的迭代器:通过调用 operator-- 向前移动一个位置、通过调用 operator++ 向后移动一个位置、通过使用 operator[] 访问元素以及通过使用指针算法访问元素。Provides an iterator that supports the following operations: moving forward one position by calling operator--, moving backward one position by calling operator++, accessing an element by using operator[], and accessing an element by using pointer arithmetic.

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

类型参数

TValue

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

继承
ReverseRandomAccessIterator<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.

构造函数

ReverseRandomAccessIterator<TValue>()

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

ReverseRandomAccessIterator<TValue>(IRandomAccessIterator<TValue>)

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

ReverseRandomAccessIterator<TValue>(ReverseRandomAccessIterator<TValue>)

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

属性

Item[Int32]

访问容器中给定位置的元素。Accesses the element at the given position in the container.

方法

base()

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

Clone()

创建当前 ReverseRandomAccessIterator<TValue> 对象的副本。Creates a copy of the current ReverseRandomAccessIterator<TValue> object.

container()

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

distance(IRandomAccessIterator<TValue>)

确定当前迭代器指向的元素与给定迭代器指向的元素之间的距离。Determines the distance between the element that the current iterator is pointing to and the element that the given iterator is pointing to.

distance(ReverseRandomAccessIterator<TValue>)

确定当前迭代器指向的元素与给定迭代器指向的元素之间的距离。Determines the distance between the element that the current iterator is pointing to and the element that the given iterator is pointing to.

equal_to(IInputIterator<TValue>)

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

equal_to(ReverseRandomAccessIterator<TValue>)

确定给定 ReverseRandomAccessIterator<TValue> 对象是否与当前 ReverseRandomAccessIterator<TValue> 对象相同。Determines whether the given ReverseRandomAccessIterator<TValue> object is the same as the current ReverseRandomAccessIterator<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)
less_than(IRandomAccessIterator<TValue>)

确定容器中当前迭代器指向的元素是否位于给定迭代器指向的元素之前。Determines whether the current iterator is pointing to an element in the container that is before the element that the given iterator points to.

less_than(ReverseRandomAccessIterator<TValue>)

确定容器中当前迭代器指向的元素是否位于给定迭代器指向的元素之前。Determines whether the current iterator is pointing to an element in the container that is before the element that the given iterator points to.

MemberwiseClone()

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

(继承自 Object)
move(Int32)

按给定的元素数移动迭代器。Moves the iterator by the given number of elements.

next()

将反向迭代器递增到基础容器中的下一个位置,如果已完全遍历此容器,则递增到容器开始位置前面的第一个位置。Increments the reverse iterator to the next 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()

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

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.

运算符

Addition(ReverseRandomAccessIterator<TValue>, Int32)

按给定的元素数递增反向迭代器。Increments the reverse iterator by the given number of elements. 在加法运算符的右侧指定该整数参数。The integer parameter is specified on the right side of the addition operator.

Addition(ReverseRandomAccessIterator<TValue>, Int32, ReverseRandomAccessIterator<TValue>)

按给定的元素数递增反向迭代器。Increments the reverse iterator by the given number of elements. 在加法运算符的左侧指定该整数参数。The integer parameter is specified on the left side of the addition operator.

Assign(ReverseRandomAccessIterator<TValue>)

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

Decrement(Int32, Int32)

将反向迭代器递减一个元素。Decrements the reverse iterator by one element. 这是减量运算符的后缀版本。This is the postfix version of the decrement operator.

Decrement(ReverseRandomAccessIterator<TValue>)

将反向迭代器递减一个元素。Decrements the reverse iterator by one element. 这是减量运算符的前缀版本。This is the prefix version of the decrement operator.

Equality(ReverseRandomAccessIterator<TValue>)

确定两个迭代器是否为同一对象。Determines whether two iterators are the same object.

GreaterThan(ReverseRandomAccessIterator<TValue>)

确定左侧迭代器的位置是否大于给定的右侧迭代器的位置。Determines whether the position of the left-side iterator is greater than the position of the given right-side iterator.

GreaterThanOrEqual(ReverseRandomAccessIterator<TValue>)

确定左侧迭代器的位置是否大于或等于给定的右侧迭代器的位置。Determines whether the position of the left-side iterator is greater than or equal to the position of the given right-side iterator.

Implicit

ReverseRandomAccessIterator<TValue> 转换为 IRandomAccessIterator<TValue>Converts a ReverseRandomAccessIterator<TValue> to an IRandomAccessIterator<TValue>.

Increment(Int32, Int32)

将反向迭代器递增一个元素。Increments the reverse iterator by one element. 这是增量运算符的后缀版本。This is the postfix version of the increment operator.

Increment(ReverseRandomAccessIterator<TValue>)

将反向迭代器递增一个元素。Increments the reverse iterator by one element. 这是递增运算符的前缀版本。This is the prefix version of the increment operator.

Inequality(ReverseRandomAccessIterator<TValue>)

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

LessThan(ReverseRandomAccessIterator<TValue>)

确定左侧迭代器的位置是否小于给定的右侧迭代器的位置。Determines whether the position of the left-side iterator is less than the position of the given right-side iterator.

LessThanOrEqual(ReverseRandomAccessIterator<TValue>)

确定左侧迭代器的位置是否小于或等于给定的右侧迭代器的位置。Determines whether the position of the left-side iterator is less than or equal to the position of the given right-side iterator.

MemberSelection(ReverseRandomAccessIterator<TValue>)

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

PointerDereference(ReverseRandomAccessIterator<TValue>)

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

Subtraction(IRandomAccessIterator<TValue>)

确定两个迭代器之间的差值。Determines the difference between two iterators.

Subtraction(ReverseRandomAccessIterator<TValue>, Int32)

按给定的元素数递减迭代器。Decrements the iterator by the given number of elements. 在减法运算符的右侧指定该整数参数。The integer parameter is specified on the right side of the subtraction operator.

适用于