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

Public Types

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

Public Member Functions

 _Tree_const_iterator ()
 
 _Tree_const_iterator (_Nodeptr _Pnode, const _Mytree *_Plist)
 
_Myiter_Rechecked (_Unchecked_type _Right)
 
_Unchecked_type _Unchecked () const
 
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
 
- Public Member Functions inherited from _Tree_unchecked_const_iterator< _Mytree, _Iterator_base >
 _Tree_unchecked_const_iterator ()
 
 _Tree_unchecked_const_iterator (_Nodeptr _Pnode, const _Mytree *_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 _Tree_unchecked_const_iterator< _Mytree, _Iterator_base >
_Nodeptr _Ptr
 

Member Typedef Documentation

template<class _Mytree>
typedef _Tree_unchecked_const_iterator<_Mytree, _Iterator_base> _Tree_const_iterator< _Mytree >::_Mybase
template<class _Mytree>
typedef _Tree_const_iterator<_Mytree> _Tree_const_iterator< _Mytree >::_Myiter
template<class _Mytree>
typedef _Mytree::_Nodeptr _Tree_const_iterator< _Mytree >::_Nodeptr
template<class _Mytree>
typedef _Tree_unchecked_const_iterator<_Mytree> _Tree_const_iterator< _Mytree >::_Unchecked_type
template<class _Mytree>
typedef _Mytree::difference_type _Tree_const_iterator< _Mytree >::difference_type
template<class _Mytree>
typedef bidirectional_iterator_tag _Tree_const_iterator< _Mytree >::iterator_category
template<class _Mytree>
typedef _Mytree::const_pointer _Tree_const_iterator< _Mytree >::pointer
template<class _Mytree>
typedef _Mytree::const_reference _Tree_const_iterator< _Mytree >::reference
template<class _Mytree>
typedef _Mytree::value_type _Tree_const_iterator< _Mytree >::value_type

Constructor & Destructor Documentation

template<class _Mytree>
_Tree_const_iterator< _Mytree >::_Tree_const_iterator ( )
inline
208  : _Mybase()
209  { // construct with null node pointer
210  }
_Tree_unchecked_const_iterator< _Mytree, _Iterator_base > _Mybase
Definition: xtree:198
template<class _Mytree>
_Tree_const_iterator< _Mytree >::_Tree_const_iterator ( _Nodeptr  _Pnode,
const _Mytree *  _Plist 
)
inline
213  : _Mybase(_Pnode, _Plist)
214  { // construct with node pointer _Pnode
215  }
_Tree_unchecked_const_iterator< _Mytree, _Iterator_base > _Mybase
Definition: xtree:198

Member Function Documentation

template<class _Mytree>
_Myiter& _Tree_const_iterator< _Mytree >::_Rechecked ( _Unchecked_type  _Right)
inline
220  { // reset from unchecked iterator
221  this->_Ptr = _Right._Ptr;
222  return (*this);
223  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Mytree>
_Unchecked_type _Tree_const_iterator< _Mytree >::_Unchecked ( ) const
inline
226  { // make an unchecked iterator
227  return (_Unchecked_type(this->_Ptr, (_Mytree *)this->_Getcont()));
228  }
_Tree_unchecked_const_iterator< _Mytree > _Unchecked_type
Definition: xtree:217
const _Container_base0 * _Getcont() const
Definition: xutility:57
template<class _Mytree>
bool _Tree_const_iterator< _Mytree >::operator!= ( const _Myiter _Right) const
inline
340  { // test for iterator inequality
341  return (!(*this == _Right));
342  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Mytree>
reference _Tree_const_iterator< _Mytree >::operator* ( ) const
inline
231  { // return designated value
232  #if _ITERATOR_DEBUG_LEVEL == 2
233  const auto _Mycont = static_cast<const _Mytree *>(this->_Getcont());
234  if (_Mycont == 0
235  || this->_Ptr == nullptr_t{}
236  || this->_Ptr == _Mycont->_Myhead)
237  { // report error
238  _DEBUG_ERROR("map/set iterator not dereferencable");
240  }
241 
242  #elif _ITERATOR_DEBUG_LEVEL == 1
243  _SCL_SECURE_VALIDATE(this->_Ptr != nullptr_t{});
244  const auto _Mycont = static_cast<const _Mytree *>(this->_Getcont());
245  _SCL_SECURE_VALIDATE(_Mycont != 0);
246  _SCL_SECURE_VALIDATE_RANGE(this->_Ptr != _Mycont->_Myhead);
247  #endif /* _ITERATOR_DEBUG_LEVEL */
248 
249  return (_Mytree::_Myval(this->_Ptr));
250  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:396
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:392
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:391
template<class _Mytree>
_Myiter& _Tree_const_iterator< _Mytree >::operator++ ( )
inline
258  { // preincrement
259  #if _ITERATOR_DEBUG_LEVEL == 2
260  if (this->_Getcont() == 0
261  || this->_Ptr == nullptr_t{}
262  || _Mytree::_Isnil(this->_Ptr))
263  { // report error
264  _DEBUG_ERROR("map/set iterator not incrementable");
266  }
267 
268  #elif _ITERATOR_DEBUG_LEVEL == 1
269  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != nullptr_t{});
270  _SCL_SECURE_VALIDATE_RANGE(!_Mytree::_Isnil(this->_Ptr));
271  #endif /* _ITERATOR_DEBUG_LEVEL */
272 
273  ++static_cast<_Mybase&>(*this);
274  return (*this);
275  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:396
_Tree_unchecked_const_iterator< _Mytree, _Iterator_base > _Mybase
Definition: xtree:198
#define _SCL_SECURE_VALIDATE_RANGE(cond)
Definition: yvals.h:392
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:391
template<class _Mytree>
_Myiter _Tree_const_iterator< _Mytree >::operator++ ( int  )
inline
278  { // postincrement
279  _Myiter _Tmp = *this;
280  ++*this;
281  return (_Tmp);
282  }
_Tree_const_iterator< _Mytree > _Myiter
Definition: xtree:197
template<class _Mytree>
_Myiter& _Tree_const_iterator< _Mytree >::operator-- ( )
inline
285  { // predecrement
286  #if _ITERATOR_DEBUG_LEVEL == 2
287  if (this->_Getcont() == 0
288  || this->_Ptr == nullptr_t{})
289  { // report error
290  _DEBUG_ERROR("map/set iterator not decrementable");
292  }
293 
294  _Nodeptr _Ptrsav = this->_Ptr;
295  --static_cast<_Mybase&>(*this);
296  if (_Ptrsav == this->_Ptr)
297  { // report error
298  _DEBUG_ERROR("map/set iterator not decrementable");
300  }
301 
302  #elif _ITERATOR_DEBUG_LEVEL == 1
303  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != nullptr_t{});
304 
305  _Nodeptr _Ptrsav = this->_Ptr;
306  --static_cast<_Mybase&>(*this);
307  _SCL_SECURE_VALIDATE(_Ptrsav != this->_Ptr);
308 
309  #else /* _ITERATOR_DEBUG_LEVEL == 0 */
310  --static_cast<_Mybase&>(*this);
311  #endif /* _ITERATOR_DEBUG_LEVEL */
312 
313  return (*this);
314  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
_Mytree::_Nodeptr _Nodeptr
Definition: xtree:201
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:396
_Tree_unchecked_const_iterator< _Mytree, _Iterator_base > _Mybase
Definition: xtree:198
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:391
template<class _Mytree>
_Myiter _Tree_const_iterator< _Mytree >::operator-- ( int  )
inline
317  { // postdecrement
318  _Myiter _Tmp = *this;
319  --*this;
320  return (_Tmp);
321  }
_Tree_const_iterator< _Mytree > _Myiter
Definition: xtree:197
template<class _Mytree>
pointer _Tree_const_iterator< _Mytree >::operator-> ( ) const
inline
253  { // return pointer to class object
254  return (pointer_traits<pointer>::pointer_to(**this));
255  }
Definition: xmemory0:244
template<class _Mytree>
bool _Tree_const_iterator< _Mytree >::operator== ( const _Myiter _Right) const
inline
324  { // test for iterator equality
325  #if _ITERATOR_DEBUG_LEVEL == 2
326  if (this->_Getcont() != _Right._Getcont())
327  { // report error
328  _DEBUG_ERROR("map/set iterators incompatible");
330  }
331 
332  #elif _ITERATOR_DEBUG_LEVEL == 1
333  _SCL_SECURE_VALIDATE(this->_Getcont() == _Right._Getcont());
334  #endif /* _ITERATOR_DEBUG_LEVEL */
335 
336  return (this->_Ptr == _Right._Ptr);
337  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_INVALID_ARGUMENT
Definition: yvals.h:395
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
constexpr const _Ty &() _Right
Definition: algorithm:3591
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:391

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