Microsoft.VisualC.StlClr.Generic 命名空间

包含用于实现 STL/CLR 库的泛型接口的类、接口和迭代器。 Contains the classes, interfaces, and iterators that are used to implement the generic interface to the STL/CLR Library. 通过使用此泛型接口,其他 .NET 语言(如 C# 和 Visual Basic)可以调用使用 STL/CLR 编写的代码。 By using this generic interface, other .NET languages, such as C# and Visual Basic, can call code that is written using STL/CLR.

ConstContainerBidirectionalIterator<TValue>

定义一个迭代器,它可以通过使用增量运算符正向访问容器中的元素,也可以通过使用减量运算符后向访问容器中的元素。Defines 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 cannot be modified. 双向迭代器可用于任何需要常数输入或常数输出迭代器的情况。Bidirectional iterators can be used anywhere that a constant input or constant output iterator is required.

ConstContainerRandomAccessIterator<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. 无法修改迭代器指向的元素。The element pointed to by the iterator cannot be modified.

ConstReverseBidirectionalIterator<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 cannot be modified. 无论是需要常量反向输入迭代器还是常量反向输出迭代器,均可以使用常量反向双向迭代器。Constant reverse bidirectional iterators can be used anywhere that a constant reverse input or constant reverse output iterator is required.

ConstReverseRandomAccessIterator<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. 无法修改迭代器访问的元素。The element accessed by the iterator cannot be modified.

ContainerBidirectionalIterator<TValue>

定义一个迭代器,它可以通过使用增量运算符正向访问容器中的元素,也可以通过使用减量运算符后向访问容器中的元素。Defines 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 that an input or output iterator is required.

ContainerRandomAccessIterator<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.

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.

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.

接口

IBaseIterator<TValue>

定义所有 STL/CLR 迭代器的基接口。Defines the base interface for all STL/CLR iterators.

IBidirectionalContainer<TValue>

支持向前迭代和向后迭代的容器接口。Interface for a container that supports both forward and backward iteration. 实现双向迭代的容器支持以下操作:通过调用 operator++ 向前移动一个位置和通过调用 operator-- 向后移动一个位置。Containers that implement bidirectional iteration support the following operations: moving forward one position by calling operator++, and moving backward one position by calling operator--.

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.

IForwardIterator<TValue>

迭代器的接口,只能通过使用递增运算符向前访问容器中的元素。Interface for an iterator that can access elements in a container only in the forward 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. 无论是需要输入迭代器还是输出迭代器,均可以使用向前迭代器。Forward iterators can be used anywhere an input or output iterator is required.

IInputIterator<TValue>

迭代器的接口,仅用于向前读取容器中的序列。Interface for an iterator that is used to read a sequence from a container only in the forward direction. 迭代器指向的元素只能读取一次,并且不可修改。The element that the iterator points to can be read only one time, and it cannot be modified.

INode<TValue>

节点数据结构的接口。Interface for the node data structure. 支持双向迭代的容器包含节点。Containers that support bidirectional iteration contain nodes. 节点由容器中该位置的元素值和指向容器中下一个元素和上一个元素的指针组成。A node consists of a value for the element at that position in the container and pointers to the next and previous elements in the container.

IOutputIterator<TValue>

迭代器的接口,仅用于将序列向前写入到容器中。Interface for an iterator that is used to write a sequence to a container only in the forward direction. 迭代器指向的元素只能写入一次。The element that the iterator points to can be written to only one time.

IRandomAccessContainer<TValue>

支持随机访问迭代的容器接口。Interface for a container that supports random access iteration. 实现随机访问迭代的容器支持以下操作:通过调用 operator++ 向前移动一个位置、通过调用 operator-- 向后移动一个位置、通过使用 operator[] 访问元素以及通过使用指针算法访问元素。Containers that implement random access iteration support 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.

IRandomAccessIterator<TValue>

定义随机访问迭代器的接口。Defines the interface for a random access iterator. 随机访问迭代器支持以下操作:通过调用 operator++ 向前移动一个位置、通过调用 operator-- 向后移动一个位置、通过使用 operator[] 访问元素以及通过使用指针算法访问元素。Random access iterators support 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.