Class sdm::iterator::SuperIterator

template <typename TItem typename TItem, typename STDIterator typename STDIterator>

Class List > sdm > iterator > SuperIterator

A super iterator is an SDMS iterator that simply iterate over a standard STD iterator. More...

  • #include <super_iterator.hpp>

Inherits the following classes: sdm::Iterator, std::enable_shared_from_this< SuperIterator< TItem, STDIterator > >

Public Types inherited from sdm::Iterator

See sdm::Iterator

Type Name
typedef TItem item_type

Public Functions

Type Name
SuperIterator (const STDIterator & sub_iterator)
virtual std::shared_ptr< ItemIterator > copy () const
Copy function.
bool operator!= (const std::shared_ptr< Iterator< TItem >> & other) const
virtual TItem & operator* ()
Get a reference to the item.
virtual std::shared_ptr< Iterator< TItem > > operator+ (number n) const
Get the n-step incremented iterator without modifying the current iterator.
virtual std::shared_ptr< Iterator< TItem > > operator++ ()
Increment the iterator.
virtual std::shared_ptr< Iterator< TItem > > operator+= (number n)
Increment the iterator of n steps.
virtual TItem * operator-> ()
Get the address of the item.
bool operator== (const std::shared_ptr< Iterator< TItem >> & other) const

Public Functions inherited from sdm::Iterator

See sdm::Iterator

Type Name
virtual std::shared_ptr< Iterator< TItem > > copy () const = 0
Copy function.
virtual bool operator!= (const std::shared_ptr< Iterator > & other) const = 0
Check if two iterators are differents.
virtual TItem & operator* () = 0
Get a reference to the item.
virtual std::shared_ptr< Iterator< TItem > > operator+ (number n) const = 0
Get the n-step incremented iterator without modifying the current iterator.
virtual std::shared_ptr< Iterator > operator++ () = 0
Increment the iterator.
virtual std::shared_ptr< Iterator< TItem > > operator+= (number n) = 0
Increment the iterator of n steps.
virtual TItem * operator-> () = 0
Get the address of the item.
virtual bool operator== (const std::shared_ptr< Iterator > & other) const = 0
Check if two iterators are equals. This function is used to check the end.
virtual ~Iterator ()

Protected Attributes

Type Name
STDIterator sub_iterator_
the standard sub iterator.

Detailed Description

Template parameters:

  • TItem the type of value we iterate over.
  • STDIterator the type of standard iterator.

Public Functions Documentation

function SuperIterator

sdm::iterator::SuperIterator::SuperIterator (
    const STDIterator & sub_iterator
) 

function copy

virtual std::shared_ptr< ItemIterator > sdm::iterator::SuperIterator::copy () const

Returns:

the copied iterator

Implements sdm::Iterator::copy

function operator!=

bool sdm::iterator::SuperIterator::operator!= (
    const std::shared_ptr< Iterator < TItem >> & other
) const

function operator*

virtual TItem & sdm::iterator::SuperIterator::operator* () 

Returns:

TItem& the item

Implements sdm::Iterator::operator*

function operator+

virtual std::shared_ptr< Iterator < TItem > > sdm::iterator::SuperIterator::operator+ (
    number n
) const

Parameters:

  • n the number of step

Returns:

the n-step incremented copy iterator

Implements sdm::Iterator::operator+

function operator++

virtual std::shared_ptr< Iterator < TItem > > sdm::iterator::SuperIterator::operator++ () 

Returns:

the incremented iterator

Implements sdm::Iterator::operator++

function operator+=

virtual std::shared_ptr< Iterator < TItem > > sdm::iterator::SuperIterator::operator+= (
    number n
) 

Parameters:

  • n the number of step

Returns:

the n-step incremented iterator

Implements sdm::Iterator::operator+=

function operator->

virtual TItem * sdm::iterator::SuperIterator::operator-> () 

Returns:

TItem* the address of the item

Implements sdm::Iterator::operator->

function operator==

bool sdm::iterator::SuperIterator::operator== (
    const std::shared_ptr< Iterator < TItem >> & other
) const

Protected Attributes Documentation

variable sub_iterator_

STDIterator sdm::iterator::SuperIterator< TItem, STDIterator >::sub_iterator_;

The documentation for this class was generated from the following file src/sdm/utils/struct/iterator/super_iterator.hpp