Visual Computing Library
Loading...
Searching...
No Matches
vcl::ElementContainerIterator< Container, T, CNST > Class Template Reference

Public Types

using difference_type = ptrdiff_t
 
using value_type = T
 
using reference = std::conditional_t< CNST, const T &, T & >
 
using pointer = std::conditional_t< CNST, const T *, T * >
 
using iterator_category = std::random_access_iterator_tag
 

Public Member Functions

 ElementContainerIterator (ContIt it, const Container< T > &vec, bool jumpDeleted=true)
 
reference operator* () const
 
pointer operator-> () const
 
bool operator== (const ElementContainerIterator &oi) const
 
bool operator!= (const ElementContainerIterator &oi) const
 
ElementContainerIteratoroperator++ ()
 
ElementContainerIterator operator++ (int)
 
ElementContainerIteratoroperator-- ()
 
ElementContainerIterator operator-- (int)
 
ElementContainerIteratoroperator+= (difference_type n)
 
ElementContainerIteratoroperator-= (difference_type n)
 
ElementContainerIterator operator+ (difference_type n) const
 
ElementContainerIterator operator- (difference_type n) const
 
difference_type operator- (const ElementContainerIterator &oi) const
 
reference operator[] (difference_type i)
 
bool operator< (const ElementContainerIterator &oi) const
 
bool operator> (const ElementContainerIterator &oi) const
 
bool operator<= (const ElementContainerIterator &oi) const
 
bool operator>= (const ElementContainerIterator &oi) const
 

Private Types

using ContIt = std::conditional_t< CNST, typename Container< T >::const_iterator, typename Container< T >::iterator >
 

Private Member Functions

ElementContainerIteratorincrementJump ()
 Increment function that will be called if we need to jump deleted elements.
 
ElementContainerIterator postIncrementJump ()
 Post increment function that will be called if we need to jump deleted elements.
 
ElementContainerIteratorincrementFast ()
 Increment function that will be called if we don't need to jump deleted elements.
 
ElementContainerIterator postIncrementFast ()
 Post increment function that will be called if we don't need to jump deleted elements.
 
ElementContainerIteratordecrementJump ()
 Decrement function that will be called if we need to jump deleted elements.
 
ElementContainerIterator postDecrementJump ()
 Post decrement function that will be called if we need to jump deleted elements.
 
ElementContainerIteratordecrementFast ()
 Decrement function that will be called if we don't need to jump deleted elements.
 
ElementContainerIterator postDecrementFast ()
 Post decrement function that will be called if we don't need to jump deleted elements.
 
ElementContainerIteratorassignSumJump (difference_type n)
 
ElementContainerIteratorassignSumFast (difference_type n)
 
difference_type diffJump (const ElementContainerIterator &oi) const
 
difference_type diffFast (const ElementContainerIterator &oi) const
 

Private Attributes

ContIt mIt
 
const Container< T > * mVec = nullptr
 
ElementContainerIterator &(ElementContainerIterator::* mIncrementFun )()
 
ElementContainerIterator(ElementContainerIterator::* mPostIncrementFun )()
 
ElementContainerIterator &(ElementContainerIterator::* mDecrementFun )()
 
ElementContainerIterator(ElementContainerIterator::* mPostDecrementFun )()
 
ElementContainerIterator &(ElementContainerIterator::* mAssignSumFun )(difference_type) = &ElementContainerIterator::assignSumJump
 
difference_type(ElementContainerIterator::* mDiffFun )(const ElementContainerIterator &oi) const
 

Member Data Documentation

◆ mDecrementFun

template<template< typename, typename... > typename Container, typename T , bool CNST = false>
ElementContainerIterator &(ElementContainerIterator::* vcl::ElementContainerIterator< Container, T, CNST >::mDecrementFun) ()
private
Initial value:
=
ElementContainerIterator & decrementJump()
Decrement function that will be called if we need to jump deleted elements.
Definition element_container_iterator.h:228

◆ mDiffFun

template<template< typename, typename... > typename Container, typename T , bool CNST = false>
difference_type(ElementContainerIterator::* vcl::ElementContainerIterator< Container, T, CNST >::mDiffFun) (const ElementContainerIterator &oi) const
private
Initial value:
=
&ElementContainerIterator::diffJump

◆ mIncrementFun

template<template< typename, typename... > typename Container, typename T , bool CNST = false>
ElementContainerIterator &(ElementContainerIterator::* vcl::ElementContainerIterator< Container, T, CNST >::mIncrementFun) ()
private
Initial value:
=
ElementContainerIterator & incrementJump()
Increment function that will be called if we need to jump deleted elements.
Definition element_container_iterator.h:182

◆ mPostDecrementFun

template<template< typename, typename... > typename Container, typename T , bool CNST = false>
ElementContainerIterator(ElementContainerIterator::* vcl::ElementContainerIterator< Container, T, CNST >::mPostDecrementFun) ()
private
Initial value:
=
ElementContainerIterator postDecrementJump()
Post decrement function that will be called if we need to jump deleted elements.
Definition element_container_iterator.h:240

◆ mPostIncrementFun

template<template< typename, typename... > typename Container, typename T , bool CNST = false>
ElementContainerIterator(ElementContainerIterator::* vcl::ElementContainerIterator< Container, T, CNST >::mPostIncrementFun) ()
private
Initial value:
=
ElementContainerIterator postIncrementJump()
Post increment function that will be called if we need to jump deleted elements.
Definition element_container_iterator.h:194

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