System::Collections::Generic::ReverseEnumerator class
Contents
[
Hide
]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>
Parameter | Description |
---|---|
Container | Container to iterate through. |
Element | Element type. |
Methods
Method | Description |
---|---|
get_Current() const override | Gets ‘current’ element. |
IsValid() const | Checks whether MoveNext() was called and end was not reached. |
MoveNext() override | Enumerator-style increment. |
Reset() override | Resets enumerator to allow re-enumerating elements. |
ReverseEnumerator(const Object::ptr&, Container&) | Initializes iterator. |
virtual ~ReverseEnumerator() | Destructor. |
See Also
- Class IEnumerator
- Namespace System::Collections::Generic
- Library Aspose.PUB for C++