aGrUM  0.16.0
gum::ListIteratorSafe< Val > Class Template Reference

Safe iterators for Lists. More...

#include <agrum/core/list.h>

+ Inheritance diagram for gum::ListIteratorSafe< Val >:
+ Collaboration diagram for gum::ListIteratorSafe< Val >:

Public Member Functions

template<typename Alloc >
INLINE ListIteratorSafe (const List< Val, Alloc > &theList)
 
template<typename Alloc >
INLINE ListIteratorSafe (const List< Val, Alloc > &theList, Size ind_elt)
 
Constructors / Destructors
 ListIteratorSafe () noexcept
 Default constructor. More...
 
template<typename Alloc >
 ListIteratorSafe (const List< Val, Alloc > &theList)
 Constructor for a begin. More...
 
 ListIteratorSafe (const ListIteratorSafe< Val > &src)
 Copy constructor. More...
 
template<typename Alloc >
 ListIteratorSafe (const List< Val, Alloc > &theList, Size ind_elt)
 Constructor for an iterator pointing to the ind_eltth element of a List. More...
 
 ListIteratorSafe (ListIteratorSafe< Val > &&src)
 Move constructor. More...
 
 ~ListIteratorSafe ()
 Class Desctructor. More...
 
Operators
ListIteratorSafe< Val > & operator= (const ListIteratorSafe< Val > &src)
 Copy operator. More...
 
ListIteratorSafe< Val > & operator= (ListIteratorSafe< Val > &&src)
 Move operator. More...
 
ListIteratorSafe< Val > & operator++ () noexcept
 Makes the iterator point to the next element in the List. More...
 
ListIteratorSafe< Val > & operator+= (difference_type i) noexcept
 Makes the iterator point to i elements further in the List. More...
 
ListIteratorSafe< Val > & operator-- () noexcept
 Makes the iterator point to the preceding element in the List. More...
 
ListIteratorSafe< Val > & operator-= (difference_type i) noexcept
 Makes the iterator point to i elements befor in the List. More...
 
ListIteratorSafe< Val > operator+ (difference_type i) noexcept
 Returns a new iterator pointing to i further elements in the gum::List. More...
 
ListIteratorSafe< Val > operator- (difference_type i) noexcept
 Returns a new iterator pointing to i preceding elements in the gum::List. More...
 
Val & operator* ()
 Gives access to the content of the iterator. More...
 
Val * operator-> ()
 Dereferences the value pointed to by the iterator. More...
 
Accessors / Modifiers
void clear ()
 Makes the iterator point toward nothing. More...
 
void setToEnd ()
 Positions the iterator to the end of the list. More...
 
bool isEnd () const
 Returns a bool indicating whether the iterator points to the end of the list. More...
 
Operators
bool operator!= (const ListConstIteratorSafe< Val > &src) const
 Checks whether two iterators point toward different elements. More...
 
bool operator== (const ListConstIteratorSafe< Val > &src) const
 Checks whether two iterators point toward the same elements. More...
 
const Val & operator* () const
 Gives access to the content of the iterator. More...
 
const Val * operator-> () const
 Dereferences the value pointed to by the iterator. More...
 

Public Types

using iterator_category = std::bidirectional_iterator_tag
 Types for STL compliance. More...
 
using value_type = Val
 Types for STL compliance. More...
 
using reference = Val &
 Types for STL compliance. More...
 
using const_reference = const Val &
 Types for STL compliance. More...
 
using pointer = Val *
 Types for STL compliance. More...
 
using const_pointer = const Val *
 Types for STL compliance. More...
 
using difference_type = std::ptrdiff_t
 Types for STL compliance. More...
 

Detailed Description

template<typename Val>
class gum::ListIteratorSafe< Val >

Safe iterators for Lists.

Class ListIteratorSafe implements iterators for List. However, developers may consider using List<x>::iterator_safe instead of ListIteratorSafe<x>.

These iterators ensure that whenever they point to an element that is being deleted from memory, their accessing this element will never produce a segmentation fault but rather throw an exception. Similarly, incrementing or decrementing an iterator pointing to a deleted element is guaranteed to make the iterator point on the next (or preceding) element that has not been deleted. This enables safely writing code like:

for ( iter = mylist.beginSafe (); iter != mylist.endSafe (); ++iter )
list.erase ( iter );
Usage example:
// create a list of strings
List<string> list;
list.pushBack ("toto"); list.pushBack ("titi");
// parse all the elements of a list
for (List<string>::iterator_safe iter = list.beginSafe();
iter != list.endSafe(); ++iter)
cerr << *iter << endl;
for ( List<string>::iterator_safe iter = list.beginSafe ();
iter != list.endSafe (); iter += 2 ) // step = 2
cerr << *iter << endl;
for ( List<string>::iterator_safe iter = list.beginSafe ();
iter != list.endSafe (); iter = iter + 2 ) // step = 2
cerr << *iter << endl;
for (List<string>::iterator_safe iter = list.rbeginSafe();
iter != list.rendSafe(); --iter)
cerr << *iter << endl;
// use member size() of the strings
for (List<string>::iterator_safe iter = list.beginSafe();
iter != list.endSafe(); ++iter)
cerr << iter->size() << endl;
Template Parameters
ValThe gum::List values type.

Definition at line 2342 of file list.h.

Member Typedef Documentation

◆ const_pointer

template<typename Val>
using gum::ListIteratorSafe< Val >::const_pointer = const Val*

Types for STL compliance.

Definition at line 2351 of file list.h.

◆ const_reference

template<typename Val>
using gum::ListIteratorSafe< Val >::const_reference = const Val&

Types for STL compliance.

Definition at line 2349 of file list.h.

◆ difference_type

template<typename Val>
using gum::ListIteratorSafe< Val >::difference_type = std::ptrdiff_t

Types for STL compliance.

Definition at line 2352 of file list.h.

◆ iterator_category

template<typename Val>
using gum::ListIteratorSafe< Val >::iterator_category = std::bidirectional_iterator_tag

Types for STL compliance.

Definition at line 2346 of file list.h.

◆ pointer

template<typename Val>
using gum::ListIteratorSafe< Val >::pointer = Val*

Types for STL compliance.

Definition at line 2350 of file list.h.

◆ reference

template<typename Val>
using gum::ListIteratorSafe< Val >::reference = Val&

Types for STL compliance.

Definition at line 2348 of file list.h.

◆ value_type

template<typename Val>
using gum::ListIteratorSafe< Val >::value_type = Val

Types for STL compliance.

Definition at line 2347 of file list.h.

Constructor & Destructor Documentation

◆ ListIteratorSafe() [1/7]

template<typename Val >
INLINE gum::ListIteratorSafe< Val >::ListIteratorSafe ( )
noexcept

Default constructor.

Returns an iterator pointing toward nothing.

Definition at line 983 of file list_tpl.h.

983  :
984  ListConstIteratorSafe< Val >() {
985  GUM_CONSTRUCTOR(ListIteratorSafe);
986  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983

◆ ListIteratorSafe() [2/7]

template<typename Val>
template<typename Alloc >
gum::ListIteratorSafe< Val >::ListIteratorSafe ( const List< Val, Alloc > &  theList)

Constructor for a begin.

Template Parameters
AllocThe gum::List allocator.

◆ ListIteratorSafe() [3/7]

template<typename Val >
INLINE gum::ListIteratorSafe< Val >::ListIteratorSafe ( const ListIteratorSafe< Val > &  src)

Copy constructor.

Parameters
srcThe gum::ListConstIteratorSafe to copy.

Definition at line 999 of file list_tpl.h.

1000  :
1001  ListConstIteratorSafe< Val >(src) {
1002  GUM_CONS_CPY(ListIteratorSafe);
1003  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983

◆ ListIteratorSafe() [4/7]

template<typename Val>
template<typename Alloc >
gum::ListIteratorSafe< Val >::ListIteratorSafe ( const List< Val, Alloc > &  theList,
Size  ind_elt 
)

Constructor for an iterator pointing to the ind_eltth element of a List.

Parameters
theListThe list to iterate over.
ind_eltThe iterator starting position.
Exceptions
UndefinedIteratorValueRaised if the element does not exist in the list.

◆ ListIteratorSafe() [5/7]

template<typename Val >
INLINE gum::ListIteratorSafe< Val >::ListIteratorSafe ( ListIteratorSafe< Val > &&  src)

Move constructor.

Parameters
srcThe gum::ListConstIterator to move.

Definition at line 1018 of file list_tpl.h.

References gum::ListIteratorSafe< Val >::operator=().

1018  :
1019  ListConstIteratorSafe< Val >(std::move(src)) {
1020  GUM_CONS_MOV(ListIteratorSafe);
1021  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983
+ Here is the call graph for this function:

◆ ~ListIteratorSafe()

template<typename Val >
INLINE gum::ListIteratorSafe< Val >::~ListIteratorSafe ( )

Class Desctructor.

Definition at line 1045 of file list_tpl.h.

1045  {
1046  GUM_DESTRUCTOR(ListIteratorSafe);
1047  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983

◆ ListIteratorSafe() [6/7]

template<typename Val>
template<typename Alloc >
INLINE gum::ListIteratorSafe< Val >::ListIteratorSafe ( const List< Val, Alloc > &  theList)

Definition at line 992 of file list_tpl.h.

992  :
993  ListConstIteratorSafe< Val >(theList) {
994  GUM_CONSTRUCTOR(ListIteratorSafe);
995  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983

◆ ListIteratorSafe() [7/7]

template<typename Val>
template<typename Alloc >
INLINE gum::ListIteratorSafe< Val >::ListIteratorSafe ( const List< Val, Alloc > &  theList,
Size  ind_elt 
)

Definition at line 1010 of file list_tpl.h.

1011  :
1012  ListConstIteratorSafe< Val >(theList, ind_elt) {
1013  GUM_CONSTRUCTOR(ListIteratorSafe);
1014  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983

Member Function Documentation

◆ clear()

template<typename Val >
INLINE void gum::ListConstIteratorSafe< Val >::clear ( )
inherited

Makes the iterator point toward nothing.

A method for detaching the iterator from the List it is attached to. It is mainly used by the List when the latter is deleted while the iterator is still alive. After being detached, the iterator does not point to any element, i.e., trying to access its content will raise an exception.

Definition at line 709 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::__bucket, gum::ListConstIteratorSafe< Val >::__list, gum::ListConstIteratorSafe< Val >::__null_pointing, and gum::ListConstIteratorSafe< Val >::__removeFromSafeList().

Referenced by gum::ListConstIteratorSafe< Val >::setToEnd().

709  {
710  // remove the iterator src the list's iterator list
712 
713  // set its list as well as the element it points to to nullptr
714  __list = nullptr;
715  __bucket = nullptr;
716  __null_pointing = false;
717  }
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2267
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2256
void __removeFromSafeList() const
Remove the iterator for its list&#39; safe iterators list.
Definition: list_tpl.h:592
const List< Val, std::allocator< Val > > * __list
The list the iterator is pointing to.
Definition: list.h:2253
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEnd()

template<typename Val >
INLINE bool gum::ListConstIteratorSafe< Val >::isEnd ( ) const
inherited

Returns a bool indicating whether the iterator points to the end of the list.

Returns
Returns a bool indicating whether the iterator points to the end of the list.

Definition at line 728 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::__bucket, gum::ListConstIteratorSafe< Val >::__next_current_bucket, gum::ListConstIteratorSafe< Val >::__null_pointing, gum::ListConstIteratorSafe< Val >::__prev_current_bucket, and gum::ListConstIteratorSafe< Val >::operator++().

728  {
729  return __null_pointing ? (__next_current_bucket == nullptr)
730  && (__prev_current_bucket == nullptr)
731  : (__bucket == nullptr);
732  }
ListBucket< Val > * __next_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a ++...
Definition: list.h:2260
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2267
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2256
ListBucket< Val > * __prev_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a –...
Definition: list.h:2264
+ Here is the call graph for this function:

◆ operator!=()

template<typename Val >
INLINE bool gum::ListConstIteratorSafe< Val >::operator!= ( const ListConstIteratorSafe< Val > &  src) const
inherited

Checks whether two iterators point toward different elements.

Warning
the end and rend iterators are always equal, whatever the list they belong to, i.e., list1.end() == list2.rend().
Parameters
srcThe gum::ListConstIteratorSafe to test for inequality.
Returns
Returns true if src and this are equal.

Definition at line 925 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::__bucket, gum::ListConstIteratorSafe< Val >::__next_current_bucket, gum::ListConstIteratorSafe< Val >::__null_pointing, gum::ListConstIteratorSafe< Val >::__prev_current_bucket, and gum::ListConstIteratorSafe< Val >::operator==().

Referenced by gum::ListConstIteratorSafe< Val >::operator-().

925  {
926  return __null_pointing
927  ? (__next_current_bucket != src.__next_current_bucket)
928  || (__prev_current_bucket != src.__prev_current_bucket)
929  : (__bucket != src.__bucket);
930  }
ListBucket< Val > * __next_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a ++...
Definition: list.h:2260
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2267
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2256
ListBucket< Val > * __prev_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a –...
Definition: list.h:2264
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator*() [1/2]

template<typename Val >
INLINE const Val & gum::ListConstIteratorSafe< Val >::operator* ( ) const
inherited

Gives access to the content of the iterator.

Exceptions
UndefinedIteratorValueRaised if the iterator points to nothing.
Returns
Returns the content of the iterator.

Definition at line 954 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::__bucket, and GUM_ERROR.

Referenced by gum::ListIteratorSafe< Val >::operator*().

954  {
955  if (__bucket != nullptr)
956  return __bucket->__val;
957  else {
958  GUM_ERROR(UndefinedIteratorValue, "Accessing a NULL object");
959  }
960  }
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2256
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
+ Here is the caller graph for this function:

◆ operator*() [2/2]

template<typename Val >
INLINE Val & gum::ListIteratorSafe< Val >::operator* ( )

Gives access to the content of the iterator.

Exceptions
UndefinedIteratorValueRaised if the iterator points to nothing.
Returns
Returns the content of the iterator.

Definition at line 1101 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::operator*().

1101  {
1102  return const_cast< Val& >(ListConstIteratorSafe< Val >::operator*());
1103  }
const Val & operator*() const
Gives access to the content of the iterator.
Definition: list_tpl.h:954
+ Here is the call graph for this function:

◆ operator+()

template<typename Val>
INLINE ListIteratorSafe< Val > gum::ListIteratorSafe< Val >::operator+ ( difference_type  i)
noexcept

Returns a new iterator pointing to i further elements in the gum::List.

Parameters
iThe number of steps to move the iterator.
Returns
Returns a new gum::ListConstIteratoSafe.

Definition at line 1082 of file list_tpl.h.

References gum::ListIteratorSafe< Val >::operator-().

Referenced by gum::ListIteratorSafe< Val >::operator-=().

1082  {
1083  return ListIteratorSafe< Val >(*this) += i;
1084  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator++()

template<typename Val >
INLINE ListIteratorSafe< Val > & gum::ListIteratorSafe< Val >::operator++ ( )
noexcept

Makes the iterator point to the next element in the List.

for (iter = list.begin(); iter != list.end(); ++iter) { }

The above loop is guaranteed to parse the whole List as long as no element is added to or deleted from the List while being in the loop. Runs in constant time.

Returns
Returns this gum::ListIteratorSafe.

Definition at line 1051 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::operator++(), and gum::ListIteratorSafe< Val >::operator+=().

1051  {
1053  return *this;
1054  }
ListConstIteratorSafe< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
Definition: list_tpl.h:737
+ Here is the call graph for this function:

◆ operator+=()

template<typename Val>
INLINE ListIteratorSafe< Val > & gum::ListIteratorSafe< Val >::operator+= ( difference_type  i)
noexcept

Makes the iterator point to i elements further in the List.

Parameters
iThe number of steps to move the iterator.
Returns
Returns this gum::ListIterator.

Definition at line 1059 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::operator+=().

Referenced by gum::ListIteratorSafe< Val >::operator++().

1059  {
1061  return *this;
1062  }
ListConstIteratorSafe< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
Definition: list_tpl.h:849
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator-()

template<typename Val>
INLINE ListIteratorSafe< Val > gum::ListIteratorSafe< Val >::operator- ( difference_type  i)
noexcept

Returns a new iterator pointing to i preceding elements in the gum::List.

Parameters
iThe number of steps to move the iterator.
Returns
Returns a new gum::ListIteratorSafe.

Definition at line 1089 of file list_tpl.h.

Referenced by gum::ListIteratorSafe< Val >::operator+().

1089  {
1090  return ListIteratorSafe< Val >(*this) -= i;
1091  }
+ Here is the caller graph for this function:

◆ operator--()

template<typename Val >
INLINE ListIteratorSafe< Val > & gum::ListIteratorSafe< Val >::operator-- ( )
noexcept

Makes the iterator point to the preceding element in the List.

for (iter = list.rbegin(); iter != list.rend(); --iter) { }

The above loop is guaranteed to parse the whole List as long as no element is added to or deleted from the List while being in the loop. Runs in constant time.

Returns
Returns this gum::ListIteratorSafe.

Definition at line 1066 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::operator--(), and gum::ListIteratorSafe< Val >::operator-=().

1066  {
1068  return *this;
1069  }
ListConstIteratorSafe< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
Definition: list_tpl.h:862
+ Here is the call graph for this function:

◆ operator-=()

template<typename Val>
INLINE ListIteratorSafe< Val > & gum::ListIteratorSafe< Val >::operator-= ( difference_type  i)
noexcept

Makes the iterator point to i elements befor in the List.

Parameters
iThe number of steps to move the iterator.
Returns
Returns this gum::ListIteratorSafe.

Definition at line 1074 of file list_tpl.h.

References gum::ListIteratorSafe< Val >::operator+(), and gum::ListConstIteratorSafe< Val >::operator-=().

Referenced by gum::ListIteratorSafe< Val >::operator--().

1074  {
1076  return *this;
1077  }
ListConstIteratorSafe< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
Definition: list_tpl.h:898
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator->() [1/2]

template<typename Val >
INLINE const Val * gum::ListConstIteratorSafe< Val >::operator-> ( ) const
inherited

Dereferences the value pointed to by the iterator.

Exceptions
UndefinedIteratorValueRaised if the iterator points to nothing.
Returns
Returns the value pointed to by the iterator.

Definition at line 944 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::__bucket, and GUM_ERROR.

Referenced by gum::ListIteratorSafe< Val >::operator->().

944  {
945  if (__bucket != nullptr)
946  return &(__bucket->__val);
947  else {
948  GUM_ERROR(UndefinedIteratorValue, "Accessing a NULL object");
949  }
950  }
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2256
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
+ Here is the caller graph for this function:

◆ operator->() [2/2]

template<typename Val >
INLINE Val * gum::ListIteratorSafe< Val >::operator-> ( )

Dereferences the value pointed to by the iterator.

Exceptions
UndefinedIteratorValueRaised if the iterator points to nothing.
Returns
Returns the value pointed to by the iterator.

Definition at line 1095 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::operator->().

1095  {
1096  return const_cast< Val* >(ListConstIteratorSafe< Val >::operator->());
1097  }
const Val * operator->() const
Dereferences the value pointed to by the iterator.
Definition: list_tpl.h:944
+ Here is the call graph for this function:

◆ operator=() [1/2]

template<typename Val >
INLINE ListIteratorSafe< Val > & gum::ListIteratorSafe< Val >::operator= ( const ListIteratorSafe< Val > &  src)

Copy operator.

The current iterator now points to the same element as iterator from.

Parameters
srcThe gum::ListIteratorSafe to copy.
Returns
Returns this gum::ListIteratorSafe.

Definition at line 1026 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::operator=().

Referenced by gum::ListIteratorSafe< Val >::ListIteratorSafe().

1026  {
1027  // for debugging purposes
1028  GUM_OP_CPY(ListIteratorSafe);
1030  return *this;
1031  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983
ListConstIteratorSafe< Val > & operator=(const ListConstIteratorSafe< Val > &src)
Copy operator.
Definition: list_tpl.h:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [2/2]

template<typename Val >
INLINE ListIteratorSafe< Val > & gum::ListIteratorSafe< Val >::operator= ( ListIteratorSafe< Val > &&  src)

Move operator.

Parameters
srcThe gum::ListIteratorSafe to move.
Returns
Returns this gum::ListIteratorSafe.

Definition at line 1036 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::operator=().

1036  {
1037  // for debugging purposes
1038  GUM_OP_MOV(ListIteratorSafe);
1040  return *this;
1041  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:983
ListConstIteratorSafe< Val > & operator=(const ListConstIteratorSafe< Val > &src)
Copy operator.
Definition: list_tpl.h:607
+ Here is the call graph for this function:

◆ operator==()

template<typename Val >
INLINE bool gum::ListConstIteratorSafe< Val >::operator== ( const ListConstIteratorSafe< Val > &  src) const
inherited

Checks whether two iterators point toward the same elements.

Warning
the end and rend iterators are always equal, whatever the list they belong to, i.e., list1.end() == list2.rend().
Parameters
srcThe gum::ListConstIteratorSafe to test for equality.
Returns
Returns true if src and this are equal.

Definition at line 935 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::__bucket, gum::ListConstIteratorSafe< Val >::__next_current_bucket, gum::ListConstIteratorSafe< Val >::__null_pointing, and gum::ListConstIteratorSafe< Val >::__prev_current_bucket.

Referenced by gum::ListConstIteratorSafe< Val >::operator!=().

935  {
936  return __null_pointing
937  ? (__next_current_bucket == src.__next_current_bucket)
938  && (__prev_current_bucket == src.__prev_current_bucket)
939  : (__bucket == src.__bucket);
940  }
ListBucket< Val > * __next_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a ++...
Definition: list.h:2260
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2267
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2256
ListBucket< Val > * __prev_current_bucket
The bucket we should start from when we are pointing on a deleted bucket and we decide to do a –...
Definition: list.h:2264
+ Here is the caller graph for this function:

◆ setToEnd()

template<typename Val >
INLINE void gum::ListConstIteratorSafe< Val >::setToEnd ( )
inherited

Positions the iterator to the end of the list.

Definition at line 721 of file list_tpl.h.

References gum::ListConstIteratorSafe< Val >::clear().

721  {
722  clear();
723  }
void clear()
Makes the iterator point toward nothing.
Definition: list_tpl.h:709
+ Here is the call graph for this function:

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