BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsl::List_Iterator< VALUE > Class Template Reference

#include <bslstl_list.h>

Public Types

typedef std::bidirectional_iterator_tag iterator_category
 
typedef NcType value_type
 
typedef BloombergLP::bsls::Types::IntPtr difference_type
 
typedef VALUE * pointer
 
typedef VALUE & reference
 

Public Member Functions

 List_Iterator ()
 
 List_Iterator (Node *nodePtr)
 
 List_Iterator (const NcIter &other)
 
List_Iteratoroperator++ ()
 
List_Iteratoroperator-- ()
 
List_Iterator operator++ (int)
 
List_Iterator operator-- (int)
 
reference operator* () const
 
pointer operator-> () const
 

Friends

template<class LIST_VALUE , class LIST_ALLOCATOR >
class list
 
template<class ITER_VALUE >
class List_Iterator
 
template<class T1 , class T2 >
bool operator== (List_Iterator< T1 >, List_Iterator< T2 >)
 

Member Typedef Documentation

◆ difference_type

template<class VALUE >
typedef BloombergLP::bsls::Types::IntPtr bsl::List_Iterator< VALUE >::difference_type

◆ iterator_category

template<class VALUE >
typedef std::bidirectional_iterator_tag bsl::List_Iterator< VALUE >::iterator_category

◆ pointer

template<class VALUE >
typedef VALUE* bsl::List_Iterator< VALUE >::pointer

◆ reference

template<class VALUE >
typedef VALUE& bsl::List_Iterator< VALUE >::reference

◆ value_type

template<class VALUE >
typedef NcType bsl::List_Iterator< VALUE >::value_type

Constructor & Destructor Documentation

◆ List_Iterator() [1/3]

template<class VALUE >
bsl::List_Iterator< VALUE >::List_Iterator ( )
inline

Create a singular iterator (i.e., one that cannot be incremented, decremented, or dereferenced until assigned a non-singular value).

◆ List_Iterator() [2/3]

template<class VALUE >
bsl::List_Iterator< VALUE >::List_Iterator ( Node nodePtr)
inlineexplicit

Create an iterator that references the value pointed to by the specified nodePtr. If 0 == nodePtr the iterator will be singular.

◆ List_Iterator() [3/3]

template<class VALUE >
bsl::List_Iterator< VALUE >::List_Iterator ( const NcIter other)
inline

Create an iterator that has the same value as the specified other iterator. If the (template parameter) type VALUE is not const-qualified, then this constructor is the copy constructor; otherwise, the copy constructor is implicitly generated. Note that this method is marked "IMPLICIT" in case it is not the copy constructor.

Note that this means that a List_Iterator<const VALUE> can be copy constructed or assigned to from a List_Iterator<VALUE>, but not vice-versa.

Member Function Documentation

◆ operator*()

template<class VALUE >
bsl::List_Iterator< VALUE >::reference bsl::List_Iterator< VALUE >::operator* ( ) const
inline

Return a reference providing modifiable access to the element referenced by this iterator. The behavior is undefined unless this iterator is in the range [begin() .. end()) for some list (i.e., the iterator is not singular, is not end(), and has not been invalidated).

◆ operator++() [1/2]

template<class VALUE >
List_Iterator< VALUE > & bsl::List_Iterator< VALUE >::operator++ ( )
inline

Advance this iterator to the next element in the list and return its new value. The behavior is undefined unless this iterator is in the range [begin() .. end()) for some list (i.e., the iterator is not singular, is not end(), and has not been invalidated).

◆ operator++() [2/2]

template<class VALUE >
List_Iterator< VALUE > bsl::List_Iterator< VALUE >::operator++ ( int  )
inline

Advance this iterator to the next element in the list and return its previous value. The behavior is undefined unless this iterator is in the range [begin() .. end()) for some list (i.e., the iterator is not singular, is not end(), and has not been invalidated).

◆ operator--() [1/2]

template<class VALUE >
List_Iterator< VALUE > & bsl::List_Iterator< VALUE >::operator-- ( )
inline

Regress this iterator to the previous element in the list and return its new value. The behavior is undefined unless this iterator is in the range (begin() .. end()] for some list (i.e., the iterator is not singular, is not begin(), and has not been invalidated).

◆ operator--() [2/2]

template<class VALUE >
List_Iterator< VALUE > bsl::List_Iterator< VALUE >::operator-- ( int  )
inline

Regress this iterator to the previous element in the list and return its previous value. The behavior is undefined unless this iterator is in the range (begin() .. end()] for some list (i.e., the iterator is not singular, is not begin(), and has not been invalidated).

◆ operator->()

template<class VALUE >
bsl::List_Iterator< VALUE >::pointer bsl::List_Iterator< VALUE >::operator-> ( ) const
inline

Return a pointer providing modifiable access to the element referenced by this iterator. The behavior is undefined unless this iterator is in the range [begin() .. end()) for some list (i.e., the iterator is not singular, is not end(), and has not been invalidated).

Friends And Related Symbol Documentation

◆ list

template<class VALUE >
template<class LIST_VALUE , class LIST_ALLOCATOR >
friend class list
friend

◆ List_Iterator

template<class VALUE >
template<class ITER_VALUE >
friend class List_Iterator
friend

◆ operator==

template<class VALUE >
template<class T1 , class T2 >
bool operator== ( bsl::List_Iterator< T1 >  lhs,
bsl::List_Iterator< T2 >  rhs 
)
friend

Return true if the specified lhs and rhs iterators have the same value, and false otherwise. Two iterators have the same value if both refer to the same element of the same list or both are the end() iterator of the same list. The behavior is undefined unless both lhs and rhs refer to the same list. Note that the different types T1 and T2 are to facilitate comparisons between const and non-const iterators and there will be a compilation error if T1 and T2 differ in any way other than const-ness.


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