Public Member Functions | Private Attributes | List of all members
lvr2::StableVectorIterator< HandleT, ElemT > Class Template Reference

Iterator over handles in this vector, which skips deleted elements. More...

#include <StableVector.hpp>

Public Member Functions

bool isAtEnd () const
 
bool operator!= (const StableVectorIterator &other) const
 
HandleT operator* () const
 
StableVectorIteratoroperator++ ()
 
StableVectorIteratoroperator= (const StableVectorIterator &other)
 
bool operator== (const StableVectorIterator &other) const
 
 StableVectorIterator (const vector< boost::optional< ElemT >> *deleted, bool startAtEnd=false)
 

Private Attributes

const vector< boost::optional< ElemT > > * m_elements
 Reference to the deleted marker array this iterator belongs to. More...
 
size_t m_pos
 Current position in the vector. More...
 

Detailed Description

template<typename HandleT, typename ElemT>
class lvr2::StableVectorIterator< HandleT, ElemT >

Iterator over handles in this vector, which skips deleted elements.

Important: This is NOT a fail fast iterator. If the vector is changed while using an instance of this iterator the behavior is undefined!

Definition at line 61 of file StableVector.hpp.

Constructor & Destructor Documentation

◆ StableVectorIterator()

template<typename HandleT , typename ElemT >
lvr2::StableVectorIterator< HandleT, ElemT >::StableVectorIterator ( const vector< boost::optional< ElemT >> *  deleted,
bool  startAtEnd = false 
)

Member Function Documentation

◆ isAtEnd()

template<typename HandleT , typename ElemT >
bool lvr2::StableVectorIterator< HandleT, ElemT >::isAtEnd ( ) const

◆ operator!=()

template<typename HandleT , typename ElemT >
bool lvr2::StableVectorIterator< HandleT, ElemT >::operator!= ( const StableVectorIterator< HandleT, ElemT > &  other) const

◆ operator*()

template<typename HandleT , typename ElemT >
HandleT lvr2::StableVectorIterator< HandleT, ElemT >::operator* ( ) const

◆ operator++()

template<typename HandleT , typename ElemT >
StableVectorIterator& lvr2::StableVectorIterator< HandleT, ElemT >::operator++ ( )

◆ operator=()

template<typename HandleT , typename ElemT >
StableVectorIterator& lvr2::StableVectorIterator< HandleT, ElemT >::operator= ( const StableVectorIterator< HandleT, ElemT > &  other)

◆ operator==()

template<typename HandleT , typename ElemT >
bool lvr2::StableVectorIterator< HandleT, ElemT >::operator== ( const StableVectorIterator< HandleT, ElemT > &  other) const

Member Data Documentation

◆ m_elements

template<typename HandleT , typename ElemT >
const vector<boost::optional<ElemT> >* lvr2::StableVectorIterator< HandleT, ElemT >::m_elements
private

Reference to the deleted marker array this iterator belongs to.

Definition at line 65 of file StableVector.hpp.

◆ m_pos

template<typename HandleT , typename ElemT >
size_t lvr2::StableVectorIterator< HandleT, ElemT >::m_pos
private

Current position in the vector.

Definition at line 68 of file StableVector.hpp.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:27