neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::indexitor< T, ForeignIndex, Alloc > Class Template Reference

#include <indexitor.hpp>

Inheritance diagram for neolib::indexitor< T, ForeignIndex, Alloc >:

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef T data_type
 
typedef ForeignIndex foreign_index_type
 
typedef std::pair< data_type, const foreign_index_typevalue_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef std::pair< const foreign_index_type, const foreign_index_typeskip_type
 
typedef Alloc allocator_type
 
typedef std::allocator_traits< allocator_type >::pointer pointer
 
typedef std::allocator_traits< allocator_type >::const_pointer const_pointer
 
typedef std::allocator_traits< allocator_type >::size_type size_type
 
typedef std::allocator_traits< allocator_type >::difference_type difference_type
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 indexitor (const Alloc &aAllocator=Alloc())
 
 indexitor (const size_type aCount, const value_type &aValue, const Alloc &aAllocator=Alloc())
 
template<typename InputIterator >
 indexitor (InputIterator aFirst, InputIterator aLast, const Alloc &aAllocator=Alloc())
 
 indexitor (const indexitor &aOther, const Alloc &aAllocator=Alloc())
 
 ~indexitor ()
 
indexitoroperator= (const indexitor &aOther)
 
size_type size () const
 
bool empty () const
 
const_iterator begin () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reference front () const
 
reference front ()
 
const_reference back () const
 
reference back ()
 
size_type index (const_iterator aPosition) const
 
size_type index (iterator aPosition) const
 
iterator insert (const_iterator aPosition, const value_type &aValue, const skip_type &aSkip=skip_type{})
 
const_reference operator[] (size_type aIndex) const
 
reference operator[] (size_type aIndex)
 
template<class InputIterator >
std::enable_if<!std::is_integral< InputIterator >::value, iterator >::type insert (const_iterator aPosition, InputIterator aFirst, InputIterator aLast)
 
template<class InputIterator , class SkipIterator >
std::enable_if<!std::is_integral< InputIterator >::value, iterator >::type insert (const_iterator aPosition, InputIterator aFirst, InputIterator aLast, SkipIterator aSkipFirst, SkipIterator aSkipSecond)
 
iterator insert (const_iterator aPosition, size_type aCount, const value_type &aValue, const skip_type &aSkip=skip_type{})
 
void clear ()
 
void push_front (const value_type &aValue, const skip_type &aSkip=skip_type{})
 
void push_back (const value_type &aValue, const skip_type &aSkip=skip_type{})
 
void resize (std::size_t aNewSize, const value_type &aValue=value_type{}, const skip_type &aSkip=skip_type{})
 
iterator erase (const_iterator aPosition)
 
iterator erase (const_iterator aFirst, const_iterator aLast)
 
void pop_front ()
 
void pop_back ()
 
void swap (indexitor &aOther)
 
void update_foreign_index (const_iterator aPosition, const foreign_index_type &aForeignIndex, const skip_type &aSkip=skip_type{})
 
template<typename Pred = std::less<foreign_index_type>>
std::pair< const_iterator, foreign_index_typefind_by_foreign_index (foreign_index_type aForeignIndex, Pred aPred=Pred{}) const
 
template<typename Pred = std::less<foreign_index_type>>
std::pair< iterator, foreign_index_typefind_by_foreign_index (foreign_index_type aForeignIndex, Pred aPred=Pred{})
 
foreign_index_type foreign_index (const_iterator aPosition) const
 
foreign_index_type skip_before (const_iterator aPosition) const
 
foreign_index_type skip_after (const_iterator aPosition) const
 

Detailed Description

template<typename T, typename ForeignIndex, typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
class neolib::indexitor< T, ForeignIndex, Alloc >

Definition at line 48 of file indexitor.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef Alloc neolib::indexitor< T, ForeignIndex, Alloc >::allocator_type

Definition at line 58 of file indexitor.hpp.

◆ const_pointer

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::allocator_traits<allocator_type>::const_pointer neolib::indexitor< T, ForeignIndex, Alloc >::const_pointer

Definition at line 60 of file indexitor.hpp.

◆ const_reference

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef const value_type& neolib::indexitor< T, ForeignIndex, Alloc >::const_reference

Definition at line 56 of file indexitor.hpp.

◆ const_reverse_iterator

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::reverse_iterator<const_iterator> neolib::indexitor< T, ForeignIndex, Alloc >::const_reverse_iterator

Definition at line 297 of file indexitor.hpp.

◆ data_type

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef T neolib::indexitor< T, ForeignIndex, Alloc >::data_type

Definition at line 52 of file indexitor.hpp.

◆ difference_type

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::allocator_traits<allocator_type>::difference_type neolib::indexitor< T, ForeignIndex, Alloc >::difference_type

Definition at line 62 of file indexitor.hpp.

◆ foreign_index_type

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef ForeignIndex neolib::indexitor< T, ForeignIndex, Alloc >::foreign_index_type

Definition at line 53 of file indexitor.hpp.

◆ pointer

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::allocator_traits<allocator_type>::pointer neolib::indexitor< T, ForeignIndex, Alloc >::pointer

Definition at line 59 of file indexitor.hpp.

◆ reference

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef value_type& neolib::indexitor< T, ForeignIndex, Alloc >::reference

Definition at line 55 of file indexitor.hpp.

◆ reverse_iterator

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::reverse_iterator<iterator> neolib::indexitor< T, ForeignIndex, Alloc >::reverse_iterator

Definition at line 296 of file indexitor.hpp.

◆ size_type

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::allocator_traits<allocator_type>::size_type neolib::indexitor< T, ForeignIndex, Alloc >::size_type

Definition at line 61 of file indexitor.hpp.

◆ skip_type

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::pair<const foreign_index_type, const foreign_index_type> neolib::indexitor< T, ForeignIndex, Alloc >::skip_type

Definition at line 57 of file indexitor.hpp.

◆ value_type

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
typedef std::pair<data_type, const foreign_index_type> neolib::indexitor< T, ForeignIndex, Alloc >::value_type

Definition at line 54 of file indexitor.hpp.

Constructor & Destructor Documentation

◆ indexitor() [1/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
neolib::indexitor< T, ForeignIndex, Alloc >::indexitor ( const Alloc aAllocator = Alloc())
inline

Definition at line 300 of file indexitor.hpp.

◆ indexitor() [2/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
neolib::indexitor< T, ForeignIndex, Alloc >::indexitor ( const size_type  aCount,
const value_type aValue,
const Alloc aAllocator = Alloc() 
)
inline

Definition at line 304 of file indexitor.hpp.

◆ indexitor() [3/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
template<typename InputIterator >
neolib::indexitor< T, ForeignIndex, Alloc >::indexitor ( InputIterator  aFirst,
InputIterator  aLast,
const Alloc aAllocator = Alloc() 
)
inline

Definition at line 310 of file indexitor.hpp.

◆ indexitor() [4/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
neolib::indexitor< T, ForeignIndex, Alloc >::indexitor ( const indexitor< T, ForeignIndex, Alloc > &  aOther,
const Alloc aAllocator = Alloc() 
)
inline

Definition at line 315 of file indexitor.hpp.

◆ ~indexitor()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
neolib::indexitor< T, ForeignIndex, Alloc >::~indexitor ( )
inline

Definition at line 320 of file indexitor.hpp.

Member Function Documentation

◆ back() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
reference neolib::indexitor< T, ForeignIndex, Alloc >::back ( )
inline

Definition at line 384 of file indexitor.hpp.

◆ back() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
const_reference neolib::indexitor< T, ForeignIndex, Alloc >::back ( ) const
inline

Definition at line 380 of file indexitor.hpp.

◆ begin() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
iterator neolib::indexitor< T, ForeignIndex, Alloc >::begin ( )
inline

Definition at line 348 of file indexitor.hpp.

◆ begin() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
const_iterator neolib::indexitor< T, ForeignIndex, Alloc >::begin ( ) const
inline

Definition at line 340 of file indexitor.hpp.

◆ clear()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::clear ( )
inline

Definition at line 449 of file indexitor.hpp.

◆ empty()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
bool neolib::indexitor< T, ForeignIndex, Alloc >::empty ( ) const
inline

Definition at line 336 of file indexitor.hpp.

◆ end() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
iterator neolib::indexitor< T, ForeignIndex, Alloc >::end ( )
inline

Definition at line 352 of file indexitor.hpp.

◆ end() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
const_iterator neolib::indexitor< T, ForeignIndex, Alloc >::end ( ) const
inline

Definition at line 344 of file indexitor.hpp.

◆ erase() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
iterator neolib::indexitor< T, ForeignIndex, Alloc >::erase ( const_iterator  aFirst,
const_iterator  aLast 
)
inline

Definition at line 474 of file indexitor.hpp.

◆ erase() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
iterator neolib::indexitor< T, ForeignIndex, Alloc >::erase ( const_iterator  aPosition)
inline

Definition at line 468 of file indexitor.hpp.

◆ find_by_foreign_index() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
template<typename Pred = std::less<foreign_index_type>>
std::pair< iterator, foreign_index_type > neolib::indexitor< T, ForeignIndex, Alloc >::find_by_foreign_index ( foreign_index_type  aForeignIndex,
Pred  aPred = Pred{} 
)
inline

Definition at line 523 of file indexitor.hpp.

◆ find_by_foreign_index() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
template<typename Pred = std::less<foreign_index_type>>
std::pair< const_iterator, foreign_index_type > neolib::indexitor< T, ForeignIndex, Alloc >::find_by_foreign_index ( foreign_index_type  aForeignIndex,
Pred  aPred = Pred{} 
) const
inline

Definition at line 510 of file indexitor.hpp.

◆ foreign_index()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
foreign_index_type neolib::indexitor< T, ForeignIndex, Alloc >::foreign_index ( const_iterator  aPosition) const
inline

Definition at line 535 of file indexitor.hpp.

◆ front() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
reference neolib::indexitor< T, ForeignIndex, Alloc >::front ( )
inline

Definition at line 376 of file indexitor.hpp.

◆ front() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
const_reference neolib::indexitor< T, ForeignIndex, Alloc >::front ( ) const
inline

Definition at line 372 of file indexitor.hpp.

◆ index() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
size_type neolib::indexitor< T, ForeignIndex, Alloc >::index ( const_iterator  aPosition) const
inline

Definition at line 388 of file indexitor.hpp.

◆ index() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
size_type neolib::indexitor< T, ForeignIndex, Alloc >::index ( iterator  aPosition) const
inline

Definition at line 400 of file indexitor.hpp.

◆ insert() [1/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
iterator neolib::indexitor< T, ForeignIndex, Alloc >::insert ( const_iterator  aPosition,
const value_type aValue,
const skip_type aSkip = skip_type{} 
)
inline

Definition at line 412 of file indexitor.hpp.

◆ insert() [2/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
template<class InputIterator >
std::enable_if<!std::is_integral< InputIterator >::value, iterator >::type neolib::indexitor< T, ForeignIndex, Alloc >::insert ( const_iterator  aPosition,
InputIterator  aFirst,
InputIterator  aLast 
)
inline

Definition at line 426 of file indexitor.hpp.

◆ insert() [3/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
std::enable_if<!std::is_integral< InputIterator >::value, iterator >::type neolib::indexitor< T, ForeignIndex, Alloc >::insert ( const_iterator  aPosition,
InputIterator  aFirst,
InputIterator  aLast,
SkipIterator  aSkipFirst,
SkipIterator  aSkipSecond 
)
inline

Definition at line 432 of file indexitor.hpp.

◆ insert() [4/4]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
iterator neolib::indexitor< T, ForeignIndex, Alloc >::insert ( const_iterator  aPosition,
size_type  aCount,
const value_type aValue,
const skip_type aSkip = skip_type{} 
)
inline

Definition at line 436 of file indexitor.hpp.

◆ operator=()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
indexitor & neolib::indexitor< T, ForeignIndex, Alloc >::operator= ( const indexitor< T, ForeignIndex, Alloc > &  aOther)
inline

Definition at line 324 of file indexitor.hpp.

◆ operator[]() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
reference neolib::indexitor< T, ForeignIndex, Alloc >::operator[] ( size_type  aIndex)
inline

Definition at line 420 of file indexitor.hpp.

◆ operator[]() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
const_reference neolib::indexitor< T, ForeignIndex, Alloc >::operator[] ( size_type  aIndex) const
inline

Definition at line 416 of file indexitor.hpp.

◆ pop_back()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::pop_back ( )
inline

Definition at line 492 of file indexitor.hpp.

◆ pop_front()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::pop_front ( )
inline

Definition at line 488 of file indexitor.hpp.

◆ push_back()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::push_back ( const value_type aValue,
const skip_type aSkip = skip_type{} 
)
inline

Definition at line 457 of file indexitor.hpp.

◆ push_front()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::push_front ( const value_type aValue,
const skip_type aSkip = skip_type{} 
)
inline

Definition at line 453 of file indexitor.hpp.

◆ rbegin() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
reverse_iterator neolib::indexitor< T, ForeignIndex, Alloc >::rbegin ( )
inline

Definition at line 364 of file indexitor.hpp.

◆ rbegin() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
const_reverse_iterator neolib::indexitor< T, ForeignIndex, Alloc >::rbegin ( ) const
inline

Definition at line 356 of file indexitor.hpp.

◆ rend() [1/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
reverse_iterator neolib::indexitor< T, ForeignIndex, Alloc >::rend ( )
inline

Definition at line 368 of file indexitor.hpp.

◆ rend() [2/2]

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
const_reverse_iterator neolib::indexitor< T, ForeignIndex, Alloc >::rend ( ) const
inline

Definition at line 360 of file indexitor.hpp.

◆ resize()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::resize ( std::size_t  aNewSize,
const value_type aValue = value_type{},
const skip_type aSkip = skip_type{} 
)
inline

Definition at line 461 of file indexitor.hpp.

◆ size()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
size_type neolib::indexitor< T, ForeignIndex, Alloc >::size ( ) const
inline

Definition at line 332 of file indexitor.hpp.

◆ skip_after()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
foreign_index_type neolib::indexitor< T, ForeignIndex, Alloc >::skip_after ( const_iterator  aPosition) const
inline

Definition at line 549 of file indexitor.hpp.

◆ skip_before()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
foreign_index_type neolib::indexitor< T, ForeignIndex, Alloc >::skip_before ( const_iterator  aPosition) const
inline

Definition at line 542 of file indexitor.hpp.

◆ swap()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::swap ( indexitor< T, ForeignIndex, Alloc > &  aOther)
inline

Definition at line 496 of file indexitor.hpp.

◆ update_foreign_index()

template<typename T , typename ForeignIndex , typename Alloc = std::allocator<std::pair<T, const ForeignIndex>>>
void neolib::indexitor< T, ForeignIndex, Alloc >::update_foreign_index ( const_iterator  aPosition,
const foreign_index_type aForeignIndex,
const skip_type aSkip = skip_type{} 
)
inline

Definition at line 504 of file indexitor.hpp.


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