STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | List of all members
_List_const_iterator< _Mylist > Class Template Reference
Inheritance diagram for _List_const_iterator< _Mylist >:
_List_unchecked_const_iterator< _Mylist, _Iterator_base > _Iterator012< bidirectional_iterator_tag, _Mylist::value_type, _Mylist::difference_type, _Mylist::const_pointer, _Mylist::const_reference, _Iterator_base > _Iterator_base0 _List_iterator< _Mylist >

Public Types

typedef _List_const_iterator< _Mylist > _Myiter
 
typedef _List_unchecked_const_iterator< _Mylist, _Iterator_base_Mybase
 
typedef bidirectional_iterator_tag iterator_category
 
typedef _Mylist::_Nodeptr _Nodeptr
 
typedef _Mylist::value_type value_type
 
typedef _Mylist::difference_type difference_type
 
typedef _Mylist::const_pointer pointer
 
typedef _Mylist::const_reference reference
 
typedef _List_unchecked_const_iterator< _Mylist > _Unchecked_type
 
- Public Types inherited from _List_unchecked_const_iterator< _Mylist, _Iterator_base >
typedef _List_unchecked_const_iterator< _Mylist, _Iterator_base_Myiter
 
typedef bidirectional_iterator_tag iterator_category
 
typedef _Mylist::_Nodeptr _Nodeptr
 
typedef _Mylist::value_type value_type
 
typedef _Mylist::difference_type difference_type
 
typedef _Mylist::const_pointer pointer
 
typedef _Mylist::const_reference reference
 
- Public Types inherited from _Iterator012< bidirectional_iterator_tag, _Mylist::value_type, _Mylist::difference_type, _Mylist::const_pointer, _Mylist::const_reference, _Iterator_base >
typedef bidirectional_iterator_tag iterator_category
 
typedef _Mylist::value_type value_type
 
typedef _Mylist::difference_type difference_type
 
typedef _Mylist::const_pointer pointer
 
typedef _Mylist::const_reference reference
 

Public Member Functions

 _List_const_iterator ()
 
 _List_const_iterator (_Nodeptr _Pnode, const _Mylist *_Plist)
 
_Myiter_Rechecked (_Unchecked_type _Right)
 
_Unchecked_type _Unchecked () const
 
reference operator* () const
 
_Myiteroperator++ ()
 
_Myiter operator++ (int)
 
_Myiteroperator-- ()
 
_Myiter operator-- (int)
 
bool operator== (const _Myiter &_Right) const
 
bool operator!= (const _Myiter &_Right) const
 
- Public Member Functions inherited from _List_unchecked_const_iterator< _Mylist, _Iterator_base >
 _List_unchecked_const_iterator ()
 
 _List_unchecked_const_iterator (_Nodeptr _Pnode, const _Mylist *_Plist)
 
reference operator* () const
 
pointer operator-> () const
 
_Myiteroperator++ ()
 
_Myiter operator++ (int)
 
_Myiteroperator-- ()
 
_Myiter operator-- (int)
 
bool operator== (const _Myiter &_Right) const
 
bool operator!= (const _Myiter &_Right) const
 
_Nodeptr _Mynode () const
 
- Public Member Functions inherited from _Iterator_base0
void _Adopt (const void *)
 
const _Container_base0_Getcont () const
 

Additional Inherited Members

- Public Attributes inherited from _List_unchecked_const_iterator< _Mylist, _Iterator_base >
_Nodeptr _Ptr
 

Member Typedef Documentation

template<class _Mylist>
typedef _List_unchecked_const_iterator<_Mylist, _Iterator_base> _List_const_iterator< _Mylist >::_Mybase
template<class _Mylist>
typedef _List_const_iterator<_Mylist> _List_const_iterator< _Mylist >::_Myiter
template<class _Mylist>
typedef _Mylist::_Nodeptr _List_const_iterator< _Mylist >::_Nodeptr
template<class _Mylist>
typedef _List_unchecked_const_iterator<_Mylist> _List_const_iterator< _Mylist >::_Unchecked_type
template<class _Mylist>
typedef _Mylist::difference_type _List_const_iterator< _Mylist >::difference_type
template<class _Mylist>
typedef bidirectional_iterator_tag _List_const_iterator< _Mylist >::iterator_category
template<class _Mylist>
typedef _Mylist::const_pointer _List_const_iterator< _Mylist >::pointer
template<class _Mylist>
typedef _Mylist::const_reference _List_const_iterator< _Mylist >::reference
template<class _Mylist>
typedef _Mylist::value_type _List_const_iterator< _Mylist >::value_type

Constructor & Destructor Documentation

template<class _Mylist>
_List_const_iterator< _Mylist >::_List_const_iterator ( )
inline
181  : _Mybase()
182  { // construct with null node pointer
183  }
_List_unchecked_const_iterator< _Mylist, _Iterator_base > _Mybase
Definition: list:171
template<class _Mylist>
_List_const_iterator< _Mylist >::_List_const_iterator ( _Nodeptr  _Pnode,
const _Mylist *  _Plist 
)
inline
186  : _Mybase(_Pnode, _Plist)
187  { // construct with node pointer _Pnode
188  }
_List_unchecked_const_iterator< _Mylist, _Iterator_base > _Mybase
Definition: list:171

Member Function Documentation

template<class _Mylist>
_Myiter& _List_const_iterator< _Mylist >::_Rechecked ( _Unchecked_type  _Right)
inline
193  { // reset from unchecked iterator
194  this->_Ptr = _Right._Ptr;
195  return (*this);
196  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mylist>
_Unchecked_type _List_const_iterator< _Mylist >::_Unchecked ( ) const
inline
199  { // make an unchecked iterator
200  return (_Unchecked_type(this->_Ptr, static_cast<const _Mylist *>(this->_Getcont())));
201  }
_List_unchecked_const_iterator< _Mylist > _Unchecked_type
Definition: list:190
const _Container_base0 * _Getcont() const
Definition: xutility:77
template<class _Mylist>
bool _List_const_iterator< _Mylist >::operator!= ( const _Myiter _Right) const
inline
301  { // test for iterator inequality
302  return (!(*this == _Right));
303  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Mylist>
reference _List_const_iterator< _Mylist >::operator* ( ) const
inline
204  { // return designated value
205  #if _ITERATOR_DEBUG_LEVEL == 2
206  const auto _Mycont = static_cast<const _Mylist *>(this->_Getcont());
207  if (_Mycont == 0
208  || this->_Ptr == nullptr_t{}
209  || this->_Ptr == _Mycont->_Myhead)
210  { // report error
211  _DEBUG_ERROR("list iterator not dereferencable");
212  }
213 
214  #elif _ITERATOR_DEBUG_LEVEL == 1
215  _SCL_SECURE_VALIDATE(this->_Ptr != nullptr_t{});
216  const auto _Mycont = static_cast<const _Mylist *>(this->_Getcont());
217  _SCL_SECURE_VALIDATE(_Mycont != 0);
218  _SCL_SECURE_VALIDATE_RANGE(this->_Ptr != _Mycont->_Myhead);
219  #endif /* _ITERATOR_DEBUG_LEVEL */
220 
221  return (_Mylist::_Myval(this->_Ptr));
222  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:432
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431
template<class _Mylist>
_Myiter& _List_const_iterator< _Mylist >::operator++ ( )
inline
225  { // preincrement
226  #if _ITERATOR_DEBUG_LEVEL == 2
227  const auto _Mycont = static_cast<const _Mylist *>(this->_Getcont());
228  if (_Mycont == 0
229  || this->_Ptr == nullptr_t{}
230  || this->_Ptr == _Mycont->_Myhead)
231  { // report error
232  _DEBUG_ERROR("list iterator not incrementable");
233  }
234 
235  #elif _ITERATOR_DEBUG_LEVEL == 1
236  _SCL_SECURE_VALIDATE(this->_Ptr != nullptr_t{});
237  const auto _Mycont = static_cast<const _Mylist *>(this->_Getcont());
238  _SCL_SECURE_VALIDATE(_Mycont != 0);
239  _SCL_SECURE_VALIDATE_RANGE(this->_Ptr != _Mycont->_Myhead);
240  #endif /* _ITERATOR_DEBUG_LEVEL */
241 
242  this->_Ptr = _Mylist::_Nextnode(this->_Ptr);
243  return (*this);
244  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:432
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431
template<class _Mylist>
_Myiter _List_const_iterator< _Mylist >::operator++ ( int  )
inline
247  { // postincrement
248  _Myiter _Tmp = *this;
249  ++*this;
250  return (_Tmp);
251  }
_List_const_iterator< _Mylist > _Myiter
Definition: list:170
template<class _Mylist>
_Myiter& _List_const_iterator< _Mylist >::operator-- ( )
inline
254  { // predecrement
255  #if _ITERATOR_DEBUG_LEVEL == 2
256  const auto _Mycont = static_cast<const _Mylist *>(this->_Getcont());
257  if (_Mycont == 0
258  || this->_Ptr == nullptr_t{}
259  || (this->_Ptr = _Mylist::_Prevnode(this->_Ptr)) == _Mycont->_Myhead)
260  { // report error
261  _DEBUG_ERROR("list iterator not decrementable");
262  }
263 
264  #elif _ITERATOR_DEBUG_LEVEL == 1
265  _SCL_SECURE_VALIDATE(this->_Ptr != nullptr_t{});
266  const auto _Mycont = static_cast<const _Mylist *>(this->_Getcont());
267  _SCL_SECURE_VALIDATE(_Mycont != 0);
268  this->_Ptr = _Mylist::_Prevnode(this->_Ptr);
269  _SCL_SECURE_VALIDATE_RANGE(this->_Ptr != _Mycont->_Myhead);
270 
271  #else /* _ITERATOR_DEBUG_LEVEL */
272  this->_Ptr = _Mylist::_Prevnode(this->_Ptr);
273  #endif /* _ITERATOR_DEBUG_LEVEL */
274 
275  return (*this);
276  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:432
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431
template<class _Mylist>
_Myiter _List_const_iterator< _Mylist >::operator-- ( int  )
inline
279  { // postdecrement
280  _Myiter _Tmp = *this;
281  --*this;
282  return (_Tmp);
283  }
_List_const_iterator< _Mylist > _Myiter
Definition: list:170
template<class _Mylist>
bool _List_const_iterator< _Mylist >::operator== ( const _Myiter _Right) const
inline
286  { // test for iterator equality
287  #if _ITERATOR_DEBUG_LEVEL == 2
288  if (this->_Getcont() != _Right._Getcont())
289  { // report error
290  _DEBUG_ERROR("list iterators incompatible");
291  }
292 
293  #elif _ITERATOR_DEBUG_LEVEL == 1
294  _SCL_SECURE_VALIDATE(this->_Getcont() == _Right._Getcont());
295  #endif /* _ITERATOR_DEBUG_LEVEL */
296 
297  return (this->_Ptr == _Right._Ptr);
298  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
constexpr const _Ty &() _Right
Definition: algorithm:3723
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431

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