aGrUM  0.14.2
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 2339 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 2348 of file list.h.

◆ const_reference

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

Types for STL compliance.

Definition at line 2346 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 2349 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 2343 of file list.h.

◆ pointer

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

Types for STL compliance.

Definition at line 2347 of file list.h.

◆ reference

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

Types for STL compliance.

Definition at line 2345 of file list.h.

◆ value_type

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

Types for STL compliance.

Definition at line 2344 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 980 of file list_tpl.h.

980  :
981  ListConstIteratorSafe< Val >() {
982  GUM_CONSTRUCTOR(ListIteratorSafe);
983  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:980

◆ 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 996 of file list_tpl.h.

997  :
998  ListConstIteratorSafe< Val >(src) {
999  GUM_CONS_CPY(ListIteratorSafe);
1000  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:980

◆ 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 1015 of file list_tpl.h.

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

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

◆ ~ListIteratorSafe()

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

Class Desctructor.

Definition at line 1042 of file list_tpl.h.

1042  {
1043  GUM_DESTRUCTOR(ListIteratorSafe);
1044  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:980

◆ ListIteratorSafe() [6/7]

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

Definition at line 989 of file list_tpl.h.

989  :
990  ListConstIteratorSafe< Val >(theList) {
991  GUM_CONSTRUCTOR(ListIteratorSafe);
992  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:980

◆ 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 1007 of file list_tpl.h.

1008  :
1009  ListConstIteratorSafe< Val >(theList, ind_elt) {
1010  GUM_CONSTRUCTOR(ListIteratorSafe);
1011  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:980

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 706 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().

706  {
707  // remove the iterator src the list's iterator list
709 
710  // set its list as well as the element it points to to nullptr
711  __list = nullptr;
712  __bucket = nullptr;
713  __null_pointing = false;
714  }
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2264
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2253
void __removeFromSafeList() const
Remove the iterator for its list&#39; safe iterators list.
Definition: list_tpl.h:589
const List< Val, std::allocator< Val > > * __list
The list the iterator is pointing to.
Definition: list.h:2250
+ 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 725 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++().

725  {
726  return __null_pointing ? (__next_current_bucket == nullptr)
727  && (__prev_current_bucket == nullptr)
728  : (__bucket == nullptr);
729  }
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:2257
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2264
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2253
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:2261
+ 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 922 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-().

922  {
923  return __null_pointing
924  ? (__next_current_bucket != src.__next_current_bucket)
925  || (__prev_current_bucket != src.__prev_current_bucket)
926  : (__bucket != src.__bucket);
927  }
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:2257
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2264
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2253
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:2261
+ 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 951 of file list_tpl.h.

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

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

951  {
952  if (__bucket != nullptr)
953  return __bucket->__val;
954  else {
955  GUM_ERROR(UndefinedIteratorValue, "Accessing a NULL object");
956  }
957  }
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2253
#define GUM_ERROR(type, msg)
Definition: exceptions.h:52
+ 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 1098 of file list_tpl.h.

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

1098  {
1099  return const_cast< Val& >(ListConstIteratorSafe< Val >::operator*());
1100  }
const Val & operator*() const
Gives access to the content of the iterator.
Definition: list_tpl.h:951
+ 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 1079 of file list_tpl.h.

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

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

1079  {
1080  return ListIteratorSafe< Val >(*this) += i;
1081  }
+ 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 1048 of file list_tpl.h.

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

1048  {
1050  return *this;
1051  }
ListConstIteratorSafe< Val > & operator++() noexcept
Makes the iterator point to the next element in the List.
Definition: list_tpl.h:734
+ 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 1056 of file list_tpl.h.

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

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

1056  {
1058  return *this;
1059  }
ListConstIteratorSafe< Val > & operator+=(difference_type i) noexcept
Makes the iterator point to i elements further in the List.
Definition: list_tpl.h:846
+ 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 1086 of file list_tpl.h.

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

1086  {
1087  return ListIteratorSafe< Val >(*this) -= i;
1088  }
+ 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 1063 of file list_tpl.h.

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

1063  {
1065  return *this;
1066  }
ListConstIteratorSafe< Val > & operator--() noexcept
Makes the iterator point to the preceding element in the List.
Definition: list_tpl.h:859
+ 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 1071 of file list_tpl.h.

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

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

1071  {
1073  return *this;
1074  }
ListConstIteratorSafe< Val > & operator-=(difference_type i) noexcept
Makes the iterator point to i elements befor in the List.
Definition: list_tpl.h:895
+ 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 941 of file list_tpl.h.

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

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

941  {
942  if (__bucket != nullptr)
943  return &(__bucket->__val);
944  else {
945  GUM_ERROR(UndefinedIteratorValue, "Accessing a NULL object");
946  }
947  }
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2253
#define GUM_ERROR(type, msg)
Definition: exceptions.h:52
+ 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 1092 of file list_tpl.h.

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

1092  {
1093  return const_cast< Val* >(ListConstIteratorSafe< Val >::operator->());
1094  }
const Val * operator->() const
Dereferences the value pointed to by the iterator.
Definition: list_tpl.h:941
+ 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 1023 of file list_tpl.h.

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

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

1023  {
1024  // for debugging purposes
1025  GUM_OP_CPY(ListIteratorSafe);
1027  return *this;
1028  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:980
ListConstIteratorSafe< Val > & operator=(const ListConstIteratorSafe< Val > &src)
Copy operator.
Definition: list_tpl.h:604
+ 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 1033 of file list_tpl.h.

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

1033  {
1034  // for debugging purposes
1035  GUM_OP_MOV(ListIteratorSafe);
1037  return *this;
1038  }
ListIteratorSafe() noexcept
Default constructor.
Definition: list_tpl.h:980
ListConstIteratorSafe< Val > & operator=(const ListConstIteratorSafe< Val > &src)
Copy operator.
Definition: list_tpl.h:604
+ 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 932 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!=().

932  {
933  return __null_pointing
934  ? (__next_current_bucket == src.__next_current_bucket)
935  && (__prev_current_bucket == src.__prev_current_bucket)
936  : (__bucket == src.__bucket);
937  }
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:2257
bool __null_pointing
Indicates whether the bucket the iterator points to has been deleted.
Definition: list.h:2264
ListBucket< Val > * __bucket
The bucket in the chained list pointed to by the iterator.
Definition: list.h:2253
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:2261
+ 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 718 of file list_tpl.h.

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

718  {
719  clear();
720  }
void clear()
Makes the iterator point toward nothing.
Definition: list_tpl.h:706
+ Here is the call graph for this function:

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