Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Types | Public Member Functions
ext::set_move_iterator< Iterator > Class Template Reference

Adaptor iterator to allow values to be moved from a set. Internaly calls const cast to dereference result of underlying set iterator. More...

#include <iterator.hpp>

Public Types

typedef Iterator iterator_type
 The underlying iterator type. More...
 
using iterator_category = typename std::iterator_traits< Iterator >::iterator_category
 iterator_category is inherited. More...
 
typedef std::iterator_traits< Iterator >::value_type value_type
 The value type is the value_type of adapted iterator. More...
 
typedef value_type && reference
 Reference type is rvalue reference to the value type. More...
 
typedef value_typepointer
 The pointer type is a pointer to the value_type. More...
 
using difference_type = std::ptrdiff_t
 Difference_type is standard pointer difference type. More...
 

Public Member Functions

 set_move_iterator (Iterator it)
 Constructor of the set move iterator adaptor. More...
 
iterator_type base () const
 Getter of the underlying set iterator. More...
 
pointer operator-> () const
 Arrow operator using the const cast. More...
 
reference operator* () const
 Dereference operator using the const cast. More...
 
set_move_iteratoroperator++ ()
 Increment operator. More...
 
set_move_iteratoroperator-- ()
 Decrement operator. More...
 
set_move_iterator operator++ (int)
 Increment operator. More...
 
set_move_iterator operator-- (int)
 Decrement operator. More...
 
bool operator== (const set_move_iterator< Iterator > &other) const
 Comparison of iterators for equality. More...
 

Detailed Description

template<class Iterator>
class ext::set_move_iterator< Iterator >

Adaptor iterator to allow values to be moved from a set. Internaly calls const cast to dereference result of underlying set iterator.

Template Parameters
Iteratorthe adapted iterator

Member Typedef Documentation

◆ difference_type

template<class Iterator >
using ext::set_move_iterator< Iterator >::difference_type = std::ptrdiff_t

Difference_type is standard pointer difference type.

◆ iterator_category

template<class Iterator >
using ext::set_move_iterator< Iterator >::iterator_category = typename std::iterator_traits < Iterator >::iterator_category

iterator_category is inherited.

◆ iterator_type

template<class Iterator >
typedef Iterator ext::set_move_iterator< Iterator >::iterator_type

The underlying iterator type.

◆ pointer

template<class Iterator >
typedef value_type* ext::set_move_iterator< Iterator >::pointer

The pointer type is a pointer to the value_type.

◆ reference

template<class Iterator >
typedef value_type&& ext::set_move_iterator< Iterator >::reference

Reference type is rvalue reference to the value type.

◆ value_type

template<class Iterator >
typedef std::iterator_traits<Iterator>::value_type ext::set_move_iterator< Iterator >::value_type

The value type is the value_type of adapted iterator.

Constructor & Destructor Documentation

◆ set_move_iterator()

template<class Iterator >
ext::set_move_iterator< Iterator >::set_move_iterator ( Iterator  it)
inlineexplicit

Constructor of the set move iterator adaptor.

Parameters
itthe underlying set iterator

Member Function Documentation

◆ base()

template<class Iterator >
iterator_type ext::set_move_iterator< Iterator >::base ( ) const
inline

Getter of the underlying set iterator.

Returns
the underlying iterator

◆ operator*()

template<class Iterator >
reference ext::set_move_iterator< Iterator >::operator* ( ) const
inline

Dereference operator using the const cast.

Returns
rvalue reference to const casted value pointed to by underlying set iterator
Here is the caller graph for this function:

◆ operator++() [1/2]

template<class Iterator >
set_move_iterator & ext::set_move_iterator< Iterator >::operator++ ( )
inline

Increment operator.

Increments the underlying operator.

Returns
the modified iterator

◆ operator++() [2/2]

template<class Iterator >
set_move_iterator ext::set_move_iterator< Iterator >::operator++ ( int  )
inline

Increment operator.

Increments the underlying operator.

Returns
the original iterator

◆ operator--() [1/2]

template<class Iterator >
set_move_iterator & ext::set_move_iterator< Iterator >::operator-- ( )
inline

Decrement operator.

Decrements the underlying operator.

Returns
the modified iterator

◆ operator--() [2/2]

template<class Iterator >
set_move_iterator ext::set_move_iterator< Iterator >::operator-- ( int  )
inline

Decrement operator.

Decrements the underlying operator.

Returns
the original iterator

◆ operator->()

template<class Iterator >
pointer ext::set_move_iterator< Iterator >::operator-> ( ) const
inline

Arrow operator using the const cast.

Returns
const casted pointer to the value pointed to by underlying set iterator
Here is the call graph for this function:

◆ operator==()

template<class Iterator >
bool ext::set_move_iterator< Iterator >::operator== ( const set_move_iterator< Iterator > &  other) const
inline

Comparison of iterators for equality.

Parameters
otherthe other iterator
Returns
true if the two iterators underlying iterators are equal

The documentation for this class was generated from the following file: