Empirical
Public Types | Public Member Functions | Public Attributes | List of all members
emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T > Struct Template Reference

Setup an iterator wrapper to make sure that they're not used again after a vector changes. More...

#include <vector.h>

Inheritance diagram for emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >:

Public Types

using this_t = iterator_wrapper< ITERATOR_T >
 
using wrapped_t = ITERATOR_T
 
using vec_t = emp::vector< T, Ts... >
 

Public Member Functions

 iterator_wrapper (const ITERATOR_T &_in, const vec_t *_v)
 
 iterator_wrapper (const this_t &)=default
 
 iterator_wrapper (this_t &&)=default
 
 ~iterator_wrapper ()
 
bool OK (bool begin_ok=true, bool end_ok=true) const
 
this_toperator= (const this_t &)=default
 
this_toperator= (this_t &&)=default
 
 operator ITERATOR_T ()
 
 operator const ITERATOR_T () const
 
auto & operator* ()
 
const auto & operator* () const
 
auto operator-> ()
 
const auto operator-> () const
 
this_toperator++ ()
 
this_t operator++ (int x)
 
this_toperator-- ()
 
this_t operator-- (int x)
 
auto operator+ (int in)
 
auto operator- (int in)
 
auto operator- (const this_t &in)
 
this_toperator+= (int in)
 
this_toperator-= (int in)
 
auto & operator[] (int offset)
 

Public Attributes

const vec_tv_ptr
 What vector and revision was this iterator created from? More...
 
int revision
 

Detailed Description

template<typename T, typename... Ts>
template<typename ITERATOR_T>
struct emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >

Setup an iterator wrapper to make sure that they're not used again after a vector changes.

Member Typedef Documentation

template<typename T, typename... Ts>
template<typename ITERATOR_T >
using emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::this_t = iterator_wrapper<ITERATOR_T>
template<typename T, typename... Ts>
template<typename ITERATOR_T >
using emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::vec_t = emp::vector<T,Ts...>
template<typename T, typename... Ts>
template<typename ITERATOR_T >
using emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::wrapped_t = ITERATOR_T

Constructor & Destructor Documentation

template<typename T, typename... Ts>
template<typename ITERATOR_T >
emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::iterator_wrapper ( const ITERATOR_T &  _in,
const vec_t _v 
)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::iterator_wrapper ( const this_t )
default
template<typename T, typename... Ts>
template<typename ITERATOR_T >
emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::iterator_wrapper ( this_t &&  )
default
template<typename T, typename... Ts>
template<typename ITERATOR_T >
emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::~iterator_wrapper ( )
inline

Member Function Documentation

template<typename T, typename... Ts>
template<typename ITERATOR_T >
bool emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::OK ( bool  begin_ok = true,
bool  end_ok = true 
) const
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator const ITERATOR_T ( ) const
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator ITERATOR_T ( )
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
auto& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator* ( )
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
const auto& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator* ( ) const
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
auto emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator+ ( int  in)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator++ ( )
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator++ ( int  x)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator+= ( int  in)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
auto emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator- ( int  in)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
auto emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator- ( const this_t in)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator-- ( )
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator-- ( int  x)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator-= ( int  in)
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
auto emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator-> ( )
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
const auto emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator-> ( ) const
inline
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator= ( const this_t )
default
template<typename T, typename... Ts>
template<typename ITERATOR_T >
this_t& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator= ( this_t &&  )
default
template<typename T, typename... Ts>
template<typename ITERATOR_T >
auto& emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::operator[] ( int  offset)
inline

Member Data Documentation

template<typename T, typename... Ts>
template<typename ITERATOR_T >
int emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::revision
template<typename T, typename... Ts>
template<typename ITERATOR_T >
const vec_t* emp::vector< T, Ts >::iterator_wrapper< ITERATOR_T >::v_ptr

What vector and revision was this iterator created from?


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