AIToolbox
A library that offers tools for AI problem solving.
AIToolbox::IndexSkipMapIterator< IdsContainer, Container > Class Template Reference

This class is a simple iterator to iterate over a container without the specified ids. More...

#include <AIToolbox/Utils/IndexMap.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = typename Container::value_type
 
using size_type = typename Container::size_type
 
using pointer = value_type *
 
using reference = value_type &
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 IndexSkipMapIterator (size_type start, const IdsContainer &ids, Container &items)
 Basic constructor for begin iterators. More...
 
auto & operator* ()
 
const auto & operator* () const
 
auto operator-> ()
 
auto operator-> () const
 
auto toContainerId () const
 This function returns the equivalent item id of this iterator in its container. More...
 
auto & operator++ ()
 
bool operator== (const IndexSkipMapIterator &other) const
 
bool operator!= (const IndexSkipMapIterator &other) const
 

Detailed Description

template<typename IdsContainer, typename Container>
class AIToolbox::IndexSkipMapIterator< IdsContainer, Container >

This class is a simple iterator to iterate over a container without the specified ids.

Member Typedef Documentation

◆ difference_type

template<typename IdsContainer , typename Container >
using AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename IdsContainer , typename Container >
using AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::iterator_category = std::forward_iterator_tag

◆ pointer

template<typename IdsContainer , typename Container >
using AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::pointer = value_type *

◆ reference

template<typename IdsContainer , typename Container >
using AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::reference = value_type &

◆ size_type

template<typename IdsContainer , typename Container >
using AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::size_type = typename Container::size_type

◆ value_type

template<typename IdsContainer , typename Container >
using AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::value_type = typename Container::value_type

Constructor & Destructor Documentation

◆ IndexSkipMapIterator()

template<typename IdsContainer , typename Container >
AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::IndexSkipMapIterator ( size_type  start,
const IdsContainer &  ids,
Container &  items 
)
inline

Basic constructor for begin iterators.

Parameters
startThe index to start iterating from.
idsThe container holding the indeces to not iterate.
itemsThe container holding the values to iterate.

Member Function Documentation

◆ operator!=()

template<typename IdsContainer , typename Container >
bool AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::operator!= ( const IndexSkipMapIterator< IdsContainer, Container > &  other) const
inline

◆ operator*() [1/2]

template<typename IdsContainer , typename Container >
auto& AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::operator* ( )
inline

◆ operator*() [2/2]

template<typename IdsContainer , typename Container >
const auto& AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::operator* ( ) const
inline

◆ operator++()

template<typename IdsContainer , typename Container >
auto& AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::operator++ ( )
inline

◆ operator->() [1/2]

template<typename IdsContainer , typename Container >
auto AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename IdsContainer , typename Container >
auto AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::operator-> ( ) const
inline

◆ operator==()

template<typename IdsContainer , typename Container >
bool AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::operator== ( const IndexSkipMapIterator< IdsContainer, Container > &  other) const
inline

◆ toContainerId()

template<typename IdsContainer , typename Container >
auto AIToolbox::IndexSkipMapIterator< IdsContainer, Container >::toContainerId ( ) const
inline

This function returns the equivalent item id of this iterator in its container.


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