Asposecpplib
System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType > Class Template Reference

Iterator which is used with ported duck-typed collections. More...

Inherits std::iterator< std::forward_iterator_tag, ValueType, std::ptrdiff_t, ValueType *, ValueType >.

Public Types

using reference = ValueType
 Reference type. More...
 

Public Member Functions

 DuckTypedIterator (const DuckTypedIterator &)=delete
 Copy constructor. More...
 
DuckTypedIteratoroperator= (const DuckTypedIterator &)=delete
 Copy assignment operator. More...
 
 DuckTypedIterator (DuckTypedIterator &&other)
 Move constructor. More...
 
DuckTypedIteratoroperator= (DuckTypedIterator &&other)
 Move assignment operator. More...
 
 DuckTypedIterator (DuckTypedCollection *enumerable, int position=-1)
 Constructor. More...
 
DuckTypedIteratoroperator++ ()
 Moves to the next element. More...
 
reference operator* () const
 Dereference operator. More...
 

Detailed Description

template<typename DuckTypedCollection, typename ValueType>
class System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >

Iterator which is used with ported duck-typed collections.

Template Parameters
DuckTypedCollectionThe collection which is implemented using duck-typing, without implementing IEnumerable interface.
ValueTypeElement type.

Member Typedef Documentation

◆ reference

template<typename DuckTypedCollection , typename ValueType >
using System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::reference = ValueType

Reference type.

Constructor & Destructor Documentation

◆ DuckTypedIterator() [1/3]

template<typename DuckTypedCollection , typename ValueType >
System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::DuckTypedIterator ( const DuckTypedIterator< DuckTypedCollection, ValueType > &  )
delete

Copy constructor.

◆ DuckTypedIterator() [2/3]

template<typename DuckTypedCollection , typename ValueType >
System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::DuckTypedIterator ( DuckTypedIterator< DuckTypedCollection, ValueType > &&  other)
inline

Move constructor.

Parameters
otherIterator to move from.

◆ DuckTypedIterator() [3/3]

template<typename DuckTypedCollection , typename ValueType >
System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::DuckTypedIterator ( DuckTypedCollection *  enumerable,
int  position = -1 
)
inline

Constructor.

Parameters
enumerableCollection to iterate over.
position0 to point at collection's beginning, -1 to point at its end.

Member Function Documentation

◆ operator*()

template<typename DuckTypedCollection , typename ValueType >
reference System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::operator* ( ) const
inline

Dereference operator.

Returns
Element being currently pointed to.

◆ operator++()

template<typename DuckTypedCollection , typename ValueType >
DuckTypedIterator& System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::operator++ ( )
inline

Moves to the next element.

Returns
This reference.

◆ operator=() [1/2]

template<typename DuckTypedCollection , typename ValueType >
DuckTypedIterator& System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::operator= ( const DuckTypedIterator< DuckTypedCollection, ValueType > &  )
delete

Copy assignment operator.

◆ operator=() [2/2]

template<typename DuckTypedCollection , typename ValueType >
DuckTypedIterator& System::Collections::Generic::DuckTypedIterator< DuckTypedCollection, ValueType >::operator= ( DuckTypedIterator< DuckTypedCollection, ValueType > &&  other)
inline

Move assignment operator.

Parameters
otherIterator to move from.
Returns
This reference.