System::Collections::Generic::EnumeratorWrapperIterator< Element > Class Template Reference

Iterator that wraps the pre-created enumerator and redirects all calls into it. More...

Inherits System::Details::VirtualizedIteratorBase< Element >.

Public Member Functions

 EnumeratorWrapperIterator (const SharedPtr< IEnumerator< Element >> &enumerator)
 
virtual ~EnumeratorWrapperIterator ()=default
 Destructor. More...
 
void IncrementIterator () override
 Moves the iterator step forward. Must update m_is_end and m_pointer. More...
 
bool IteratorEquals (System::Details::VirtualizedIteratorBase< Element > *other) const override
 Checks if two iterators point to the same item. More...
 
System::Details::VirtualizedIteratorBase< Element > * CloneIterator () const override
 Clones current iterator. More...
 

Protected Attributes

const SharedPtr< IEnumerator< Element > > m_enumerator
 Wrapped enumerator. More...
 

Detailed Description

template<typename Element>
class System::Collections::Generic::EnumeratorWrapperIterator< Element >

Iterator that wraps the pre-created enumerator and redirects all calls into it.

Template Parameters
ElementElement type.

Constructor & Destructor Documentation

◆ EnumeratorWrapperIterator()

template<typename Element>
System::Collections::Generic::EnumeratorWrapperIterator< Element >::EnumeratorWrapperIterator ( const SharedPtr< IEnumerator< Element >> &  enumerator)
inline

◆ ~EnumeratorWrapperIterator()

template<typename Element>
virtual System::Collections::Generic::EnumeratorWrapperIterator< Element >::~EnumeratorWrapperIterator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ CloneIterator()

template<typename Element>
System::Details::VirtualizedIteratorBase<Element>* System::Collections::Generic::EnumeratorWrapperIterator< Element >::CloneIterator ( ) const
inlineoverride

Clones current iterator.

Returns
Copy of the current iterator.

◆ IncrementIterator()

template<typename Element>
void System::Collections::Generic::EnumeratorWrapperIterator< Element >::IncrementIterator ( )
inlineoverride

Moves the iterator step forward. Must update m_is_end and m_pointer.

◆ IteratorEquals()

template<typename Element>
bool System::Collections::Generic::EnumeratorWrapperIterator< Element >::IteratorEquals ( System::Details::VirtualizedIteratorBase< Element > *  other) const
inlineoverride

Checks if two iterators point to the same item.

Parameters
otherIterator to check against.
Returns
True if both this and other iterators point to the same item, false otherwise.

Member Data Documentation

◆ m_enumerator

template<typename Element>
const SharedPtr<IEnumerator<Element> > System::Collections::Generic::EnumeratorWrapperIterator< Element >::m_enumerator
protected

Wrapped enumerator.