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::difference_type distance_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  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mylist>
_Unchecked_type _List_const_iterator< _Mylist >::_Unchecked ( ) const
inline
199  { // make an unchecked iterator
200  return (_Unchecked_type(this->_Ptr, (_Mylist *)this->_Getcont()));
201  }
_List_unchecked_const_iterator< _Mylist > _Unchecked_type
Definition: list:190
const _Container_base0 * _Getcont() const
Definition: xutility:57
template<class _Mylist>
bool _List_const_iterator< _Mylist >::operator!= ( const _Myiter _Right) const
inline
302  { // test for iterator inequality
303  return (!(*this == _Right));
304  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mylist>
reference _List_const_iterator< _Mylist >::operator* ( ) const
inline
204  { // return designated value
205  #if _ITERATOR_DEBUG_LEVEL == 2
206  if (this->_Getcont() == 0
207  || this->_Ptr == 0
208  || this->_Ptr == ((_Mylist *)this->_Getcont())->_Myhead)
209  { // report error
210  _DEBUG_ERROR("list iterator not dereferencable");
212  }
213 
214  #elif _ITERATOR_DEBUG_LEVEL == 1
215  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
217  ((_Mylist *)this->_Getcont())->_Myhead);
218  #endif /* _ITERATOR_DEBUG_LEVEL */
219 
220  return (_Mylist::_Myval(this->_Ptr));
221  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:347
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
template<class _Mylist>
_Myiter& _List_const_iterator< _Mylist >::operator++ ( )
inline
224  { // preincrement
225  #if _ITERATOR_DEBUG_LEVEL == 2
226  if (this->_Getcont() == 0
227  || this->_Ptr == 0
228  || this->_Ptr == ((_Mylist *)this->_Getcont())->_Myhead)
229  { // report error
230  _DEBUG_ERROR("list iterator not incrementable");
232  }
233 
234  #elif _ITERATOR_DEBUG_LEVEL == 1
235  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
237  ((_Mylist *)this->_Getcont())->_Myhead);
238  #endif /* _ITERATOR_DEBUG_LEVEL */
239 
240  this->_Ptr = _Mylist::_Nextnode(this->_Ptr);
241  return (*this);
242  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:347
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
template<class _Mylist>
_Myiter _List_const_iterator< _Mylist >::operator++ ( int  )
inline
245  { // postincrement
246  _Myiter _Tmp = *this;
247  ++*this;
248  return (_Tmp);
249  }
_List_const_iterator< _Mylist > _Myiter
Definition: list:170
template<class _Mylist>
_Myiter& _List_const_iterator< _Mylist >::operator-- ( )
inline
252  { // predecrement
253  #if _ITERATOR_DEBUG_LEVEL == 2
254  if (this->_Getcont() == 0
255  || this->_Ptr == 0
256  || (this->_Ptr = _Mylist::_Prevnode(this->_Ptr))
257  == ((_Mylist *)this->_Getcont())->_Myhead)
258  { // report error
259  _DEBUG_ERROR("list iterator not decrementable");
261  }
262 
263  #elif _ITERATOR_DEBUG_LEVEL == 1
264  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
265  this->_Ptr = _Mylist::_Prevnode(this->_Ptr);
267  ((_Mylist *)this->_Getcont())->_Myhead);
268 
269  #else /* _ITERATOR_DEBUG_LEVEL */
270  this->_Ptr = _Mylist::_Prevnode(this->_Ptr);
271  #endif /* _ITERATOR_DEBUG_LEVEL */
272 
273  return (*this);
274  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:347
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
template<class _Mylist>
_Myiter _List_const_iterator< _Mylist >::operator-- ( int  )
inline
277  { // postdecrement
278  _Myiter _Tmp = *this;
279  --*this;
280  return (_Tmp);
281  }
_List_const_iterator< _Mylist > _Myiter
Definition: list:170
template<class _Mylist>
bool _List_const_iterator< _Mylist >::operator== ( const _Myiter _Right) const
inline
284  { // test for iterator equality
285  #if _ITERATOR_DEBUG_LEVEL == 2
286  if (this->_Getcont() == 0
287  || this->_Getcont() != _Right._Getcont())
288  { // report error
289  _DEBUG_ERROR("list iterators incompatible");
291  }
292 
293  #elif _ITERATOR_DEBUG_LEVEL == 1
294  _SCL_SECURE_VALIDATE(this->_Getcont() != 0
295  && this->_Getcont() == _Right._Getcont());
296  #endif /* _ITERATOR_DEBUG_LEVEL */
297 
298  return (this->_Ptr == _Right._Ptr);
299  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_INVALID_ARGUMENT
Definition: yvals.h:350
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
const _Ty & _Right
Definition: algorithm:4087
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346

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