System::Collections::Generic::ReverseEnumerator 类
内容
[
隐藏
]ReverseEnumerator class
Enumerator that reverse-iterates through container. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
template<typename Container,typename Element>class ReverseEnumerator : public System::Collections::Generic::IEnumerator<typename Container::value_type>
| 参数 | 描述 |
|---|---|
| 容器 | 用于迭代的容器。 |
| Element | 元素类型。 |
方法
| 方法 | 描述 |
|---|---|
| get_Current() const override | 获取 “current” 元素。 |
| IsValid() const | 检查是否已调用 MoveNext() 且未到达末尾。 |
| MoveNext() override | 枚举器式递增。 |
| Reset() override | 重置枚举器以允许重新枚举元素。 |
| ReverseEnumerator(const Object::ptr&, Container&) | 初始化迭代器。 |
| virtual ~ReverseEnumerator() | 析构函数。 |
另见
- Class IEnumerator
- Namespace System::Collections::Generic
- Library Aspose.Font for C++