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:3723
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:77
template<class _Mytree>
bool _Tree_const_iterator< _Mytree >::operator!= ( const _Myiter _Right) const
inline
335  { // test for iterator inequality
336  return (!(*this == _Right));
337  }
constexpr const _Ty &() _Right
Definition: algorithm:3723
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");
239  }
240 
241  #elif _ITERATOR_DEBUG_LEVEL == 1
242  _SCL_SECURE_VALIDATE(this->_Ptr != nullptr_t{});
243  const auto _Mycont = static_cast<const _Mytree *>(this->_Getcont());
244  _SCL_SECURE_VALIDATE(_Mycont != 0);
245  _SCL_SECURE_VALIDATE_RANGE(this->_Ptr != _Mycont->_Myhead);
246  #endif /* _ITERATOR_DEBUG_LEVEL */
247 
248  return (_Mytree::_Myval(this->_Ptr));
249  }
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 _Mytree>
_Myiter& _Tree_const_iterator< _Mytree >::operator++ ( )
inline
257  { // preincrement
258  #if _ITERATOR_DEBUG_LEVEL == 2
259  if (this->_Getcont() == 0
260  || this->_Ptr == nullptr_t{}
261  || _Mytree::_Isnil(this->_Ptr))
262  { // report error
263  _DEBUG_ERROR("map/set iterator not incrementable");
264  }
265 
266  #elif _ITERATOR_DEBUG_LEVEL == 1
267  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != nullptr_t{});
268  _SCL_SECURE_VALIDATE_RANGE(!_Mytree::_Isnil(this->_Ptr));
269  #endif /* _ITERATOR_DEBUG_LEVEL */
270 
271  ++static_cast<_Mybase&>(*this);
272  return (*this);
273  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
_Tree_unchecked_const_iterator< _Mytree, _Iterator_base > _Mybase
Definition: xtree:198
#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 _Mytree>
_Myiter _Tree_const_iterator< _Mytree >::operator++ ( int  )
inline
276  { // postincrement
277  _Myiter _Tmp = *this;
278  ++*this;
279  return (_Tmp);
280  }
_Tree_const_iterator< _Mytree > _Myiter
Definition: xtree:197
template<class _Mytree>
_Myiter& _Tree_const_iterator< _Mytree >::operator-- ( )
inline
283  { // predecrement
284  #if _ITERATOR_DEBUG_LEVEL == 2
285  if (this->_Getcont() == 0
286  || this->_Ptr == nullptr_t{})
287  { // report error
288  _DEBUG_ERROR("map/set iterator not decrementable");
289  }
290 
291  _Nodeptr _Ptrsav = this->_Ptr;
292  --static_cast<_Mybase&>(*this);
293  if (_Ptrsav == this->_Ptr)
294  { // report error
295  _DEBUG_ERROR("map/set iterator not decrementable");
296  }
297 
298  #elif _ITERATOR_DEBUG_LEVEL == 1
299  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != nullptr_t{});
300 
301  _Nodeptr _Ptrsav = this->_Ptr;
302  --static_cast<_Mybase&>(*this);
303  _SCL_SECURE_VALIDATE(_Ptrsav != this->_Ptr);
304 
305  #else /* _ITERATOR_DEBUG_LEVEL == 0 */
306  --static_cast<_Mybase&>(*this);
307  #endif /* _ITERATOR_DEBUG_LEVEL */
308 
309  return (*this);
310  }
const _Container_base0 * _Getcont() const
Definition: xutility:77
_Mytree::_Nodeptr _Nodeptr
Definition: xtree:201
_Tree_unchecked_const_iterator< _Mytree, _Iterator_base > _Mybase
Definition: xtree:198
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
#define _SCL_SECURE_VALIDATE(cond)
Definition: yvals.h:431
template<class _Mytree>
_Myiter _Tree_const_iterator< _Mytree >::operator-- ( int  )
inline
313  { // postdecrement
314  _Myiter _Tmp = *this;
315  --*this;
316  return (_Tmp);
317  }
_Tree_const_iterator< _Mytree > _Myiter
Definition: xtree:197
template<class _Mytree>
pointer _Tree_const_iterator< _Mytree >::operator-> ( ) const
inline
252  { // return pointer to class object
253  return (pointer_traits<pointer>::pointer_to(**this));
254  }
Definition: xmemory0:254
template<class _Mytree>
bool _Tree_const_iterator< _Mytree >::operator== ( const _Myiter _Right) const
inline
320  { // test for iterator equality
321  #if _ITERATOR_DEBUG_LEVEL == 2
322  if (this->_Getcont() != _Right._Getcont())
323  { // report error
324  _DEBUG_ERROR("map/set iterators incompatible");
325  }
326 
327  #elif _ITERATOR_DEBUG_LEVEL == 1
328  _SCL_SECURE_VALIDATE(this->_Getcont() == _Right._Getcont());
329  #endif /* _ITERATOR_DEBUG_LEVEL */
330 
331  return (this->_Ptr == _Right._Ptr);
332  }
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: