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::difference_type distance_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  }
const _Ty & _Right
Definition: algorithm:4087
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  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mytree>
reference _Tree_const_iterator< _Mytree >::operator* ( ) const
inline
231  { // return designated value
232  #if _ITERATOR_DEBUG_LEVEL == 2
233  if (this->_Getcont() == 0
234  || this->_Ptr == 0
235  || this->_Ptr == ((_Mytree *)this->_Getcont())->_Myhead)
236  { // report error
237  _DEBUG_ERROR("map/set iterator not dereferencable");
239  }
240 
241  #elif _ITERATOR_DEBUG_LEVEL == 1
242  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
244  ((_Mytree *)this->_Getcont())->_Myhead);
245  #endif /* _ITERATOR_DEBUG_LEVEL */
246 
247  return (_Mytree::_Myval(this->_Ptr));
248  }
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 _Mytree>
_Myiter& _Tree_const_iterator< _Mytree >::operator++ ( )
inline
256  { // preincrement
257  #if _ITERATOR_DEBUG_LEVEL == 2
258  if (this->_Getcont() == 0
259  || this->_Ptr == 0
260  || _Mytree::_Isnil(this->_Ptr))
261  { // report error
262  _DEBUG_ERROR("map/set iterator not incrementable");
264  }
265 
266  #elif _ITERATOR_DEBUG_LEVEL == 1
267  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
268  _SCL_SECURE_VALIDATE_RANGE(!_Mytree::_Isnil(this->_Ptr));
269  #endif /* _ITERATOR_DEBUG_LEVEL */
270 
271  ++(*(_Mybase *)this);
272  return (*this);
273  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
_Tree_unchecked_const_iterator< _Mytree, _Iterator_base > _Mybase
Definition: xtree:198
#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 _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 == 0)
287  { // report error
288  _DEBUG_ERROR("map/set iterator not decrementable");
290  }
291 
292  _Nodeptr _Ptrsav = this->_Ptr;
293  --(*(_Mybase *)this);
294  if (_Ptrsav == this->_Ptr)
295  { // report error
296  _DEBUG_ERROR("map/set iterator not decrementable");
298  }
299 
300  #elif _ITERATOR_DEBUG_LEVEL == 1
301  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
302 
303  _Nodeptr _Ptrsav = this->_Ptr;
304  --(*(_Mybase *)this);
305  _SCL_SECURE_VALIDATE(_Ptrsav != this->_Ptr);
306 
307  #else /* _ITERATOR_DEBUG_LEVEL == 0 */
308  --(*(_Mybase *)this);
309  #endif /* _ITERATOR_DEBUG_LEVEL */
310 
311  return (*this);
312  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
_Mytree::_Nodeptr _Nodeptr
Definition: xtree:201
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
_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:346
template<class _Mytree>
_Myiter _Tree_const_iterator< _Mytree >::operator-- ( int  )
inline
315  { // postdecrement
316  _Myiter _Tmp = *this;
317  --*this;
318  return (_Tmp);
319  }
_Tree_const_iterator< _Mytree > _Myiter
Definition: xtree:197
template<class _Mytree>
pointer _Tree_const_iterator< _Mytree >::operator-> ( ) const
inline
251  { // return pointer to class object
252  return (_STD pointer_traits<pointer>::pointer_to(**this));
253  }
Definition: xmemory0:198
template<class _Mytree>
bool _Tree_const_iterator< _Mytree >::operator== ( const _Myiter _Right) const
inline
322  { // test for iterator equality
323  #if _ITERATOR_DEBUG_LEVEL == 2
324  if (this->_Getcont() == 0
325  || this->_Getcont() != _Right._Getcont())
326  { // report error
327  _DEBUG_ERROR("map/set iterators incompatible");
329  }
330 
331  #elif _ITERATOR_DEBUG_LEVEL == 1
332  _SCL_SECURE_VALIDATE(this->_Getcont() != 0
333  && 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: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: