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

Public Types

typedef _Flist_const_iterator< _Mylist > _Myiter
 
typedef _Flist_unchecked_const_iterator< _Mylist, _Iterator_base_Mybase
 
typedef forward_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 _Flist_unchecked_const_iterator< _Mylist > _Unchecked_type
 
- Public Types inherited from _Flist_unchecked_const_iterator< _Mylist, _Iterator_base >
typedef _Flist_unchecked_const_iterator< _Mylist, _Iterator_base_Myiter
 
typedef forward_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< forward_iterator_tag, _Mylist::value_type, _Mylist::difference_type, _Mylist::const_pointer, _Mylist::const_reference, _Iterator_base >
typedef forward_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

 _Flist_const_iterator ()
 
 _Flist_const_iterator (_Nodeptr _Pnode, const _Mylist *_Plist)
 
_Myiter_Rechecked (_Unchecked_type _Right)
 
_Unchecked_type _Unchecked () const
 
reference operator* () const
 
_Myiteroperator++ ()
 
_Myiter operator++ (int)
 
bool operator== (const _Myiter &_Right) const
 
bool operator!= (const _Myiter &_Right) const
 
- Public Member Functions inherited from _Flist_unchecked_const_iterator< _Mylist, _Iterator_base >
 _Flist_unchecked_const_iterator ()
 
 _Flist_unchecked_const_iterator (_Nodeptr _Pnode, const _Mylist *_Plist)
 
reference operator* () const
 
pointer operator-> () const
 
_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 _Flist_unchecked_const_iterator< _Mylist, _Iterator_base >
_Nodeptr _Ptr
 

Member Typedef Documentation

template<class _Mylist>
typedef _Flist_unchecked_const_iterator<_Mylist, _Iterator_base> _Flist_const_iterator< _Mylist >::_Mybase
template<class _Mylist>
typedef _Flist_const_iterator<_Mylist> _Flist_const_iterator< _Mylist >::_Myiter
template<class _Mylist>
typedef _Mylist::_Nodeptr _Flist_const_iterator< _Mylist >::_Nodeptr
template<class _Mylist>
typedef _Flist_unchecked_const_iterator<_Mylist> _Flist_const_iterator< _Mylist >::_Unchecked_type
template<class _Mylist>
typedef _Mylist::difference_type _Flist_const_iterator< _Mylist >::difference_type
template<class _Mylist>
typedef forward_iterator_tag _Flist_const_iterator< _Mylist >::iterator_category
template<class _Mylist>
typedef _Mylist::const_pointer _Flist_const_iterator< _Mylist >::pointer
template<class _Mylist>
typedef _Mylist::const_reference _Flist_const_iterator< _Mylist >::reference
template<class _Mylist>
typedef _Mylist::value_type _Flist_const_iterator< _Mylist >::value_type

Constructor & Destructor Documentation

template<class _Mylist>
_Flist_const_iterator< _Mylist >::_Flist_const_iterator ( )
inline
155  : _Mybase()
156  { // construct with null node pointer
157  }
_Flist_unchecked_const_iterator< _Mylist, _Iterator_base > _Mybase
Definition: forward_list:145
template<class _Mylist>
_Flist_const_iterator< _Mylist >::_Flist_const_iterator ( _Nodeptr  _Pnode,
const _Mylist *  _Plist 
)
inline
160  : _Mybase(_Pnode, _Plist)
161  { // construct with node pointer _Pnode
162  }
_Flist_unchecked_const_iterator< _Mylist, _Iterator_base > _Mybase
Definition: forward_list:145

Member Function Documentation

template<class _Mylist>
_Myiter& _Flist_const_iterator< _Mylist >::_Rechecked ( _Unchecked_type  _Right)
inline
167  { // reset from unchecked iterator
168  this->_Ptr = _Right._Ptr;
169  return (*this);
170  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mylist>
_Unchecked_type _Flist_const_iterator< _Mylist >::_Unchecked ( ) const
inline
173  { // make an unchecked iterator
174  return (_Unchecked_type(this->_Ptr, (_Mylist *)this->_Getcont()));
175  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
_Flist_unchecked_const_iterator< _Mylist > _Unchecked_type
Definition: forward_list:164
template<class _Mylist>
bool _Flist_const_iterator< _Mylist >::operator!= ( const _Myiter _Right) const
inline
242  { // test for iterator inequality
243  return (!(*this == _Right));
244  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mylist>
reference _Flist_const_iterator< _Mylist >::operator* ( ) const
inline
178  { // return designated value
179  #if _ITERATOR_DEBUG_LEVEL == 2
180  if (this->_Getcont() == 0
181  || this->_Ptr == 0
182  || this->_Ptr
183  == (_Nodeptr)&((_Mylist *)this->_Getcont())->_Myhead)
184  { // report error
185  _DEBUG_ERROR("forward_list iterator not dereferencable");
187  }
188 
189  #elif _ITERATOR_DEBUG_LEVEL == 1
190  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
192  (_Nodeptr)&((_Mylist *)this->_Getcont())->_Myhead);
193  #endif /* _ITERATOR_DEBUG_LEVEL */
194 
195  return (_Mylist::_Myval(this->_Ptr));
196  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
_Mylist::_Nodeptr _Nodeptr
Definition: forward_list:148
#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& _Flist_const_iterator< _Mylist >::operator++ ( )
inline
199  { // preincrement
200  #if _ITERATOR_DEBUG_LEVEL == 2
201  if (this->_Getcont() == 0
202  || this->_Ptr == 0)
203  { // report error
204  _DEBUG_ERROR("forward_list iterator not incrementable");
206  }
207 
208  #elif _ITERATOR_DEBUG_LEVEL == 1
209  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
210  #endif /* _ITERATOR_DEBUG_LEVEL */
211 
212  this->_Ptr = _Mylist::_Nextnode(this->_Ptr);
213  return (*this);
214  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:346
template<class _Mylist>
_Myiter _Flist_const_iterator< _Mylist >::operator++ ( int  )
inline
217  { // postincrement
218  _Myiter _Tmp = *this;
219  ++*this;
220  return (_Tmp);
221  }
_Flist_const_iterator< _Mylist > _Myiter
Definition: forward_list:144
template<class _Mylist>
bool _Flist_const_iterator< _Mylist >::operator== ( const _Myiter _Right) const
inline
224  { // test for iterator equality
225  #if _ITERATOR_DEBUG_LEVEL == 2
226  if (this->_Getcont() == 0
227  || this->_Getcont() != _Right._Getcont())
228  { // report error
229  _DEBUG_ERROR("forward_list iterators incompatible");
231  }
232 
233  #elif _ITERATOR_DEBUG_LEVEL == 1
234  _SCL_SECURE_VALIDATE(this->_Getcont() != 0
235  && this->_Getcont() == _Right._Getcont());
236  #endif /* _ITERATOR_DEBUG_LEVEL */
237 
238  return (this->_Ptr == _Right._Ptr);
239  }
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: