STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
_Vector_const_iterator< _Myvec > Class Template Reference
Inheritance diagram for _Vector_const_iterator< _Myvec >:
_Iterator012< random_access_iterator_tag, _Myvec::value_type, _Myvec::difference_type, _Myvec::const_pointer, _Myvec::const_reference, _Iterator_base > _Iterator_base0 _Vector_iterator< _Myvec >

Public Types

typedef _Vector_const_iterator< _Myvec > _Myiter
 
typedef random_access_iterator_tag iterator_category
 
typedef _Myvec::value_type value_type
 
typedef _Myvec::difference_type difference_type
 
typedef _Myvec::const_pointer pointer
 
typedef _Myvec::const_reference reference
 
typedef _Myvec::pointer _Tptr
 
typedef pointer _Unchecked_type
 
- Public Types inherited from _Iterator012< random_access_iterator_tag, _Myvec::value_type, _Myvec::difference_type, _Myvec::const_pointer, _Myvec::const_reference, _Iterator_base >
typedef random_access_iterator_tag iterator_category
 
typedef _Myvec::value_type value_type
 
typedef _Myvec::difference_type difference_type
 
typedef _Myvec::difference_type distance_type
 
typedef _Myvec::const_pointer pointer
 
typedef _Myvec::const_reference reference
 

Public Member Functions

 _Vector_const_iterator ()
 
 _Vector_const_iterator (_Tptr _Parg, const _Container_base *_Pvector)
 
_Myiter_Rechecked (_Unchecked_type _Right)
 
_Unchecked_type _Unchecked () const
 
reference operator* () const
 
pointer operator-> () const
 
_Myiteroperator++ ()
 
_Myiter operator++ (int)
 
_Myiteroperator-- ()
 
_Myiter operator-- (int)
 
_Myiteroperator+= (difference_type _Off)
 
_Myiter operator+ (difference_type _Off) const
 
_Myiteroperator-= (difference_type _Off)
 
_Myiter operator- (difference_type _Off) const
 
difference_type operator- (const _Myiter &_Right) const
 
reference operator[] (difference_type _Off) const
 
bool operator== (const _Myiter &_Right) const
 
bool operator!= (const _Myiter &_Right) const
 
bool operator< (const _Myiter &_Right) const
 
bool operator> (const _Myiter &_Right) const
 
bool operator<= (const _Myiter &_Right) const
 
bool operator>= (const _Myiter &_Right) const
 
void _Compat (const _Myiter &) const
 
- Public Member Functions inherited from _Iterator_base0
void _Adopt (const void *)
 
const _Container_base0_Getcont () const
 

Public Attributes

_Tptr _Ptr
 

Member Typedef Documentation

template<class _Myvec>
typedef _Vector_const_iterator<_Myvec> _Vector_const_iterator< _Myvec >::_Myiter
template<class _Myvec>
typedef _Myvec::pointer _Vector_const_iterator< _Myvec >::_Tptr
template<class _Myvec>
typedef pointer _Vector_const_iterator< _Myvec >::_Unchecked_type
template<class _Myvec>
typedef _Myvec::difference_type _Vector_const_iterator< _Myvec >::difference_type
template<class _Myvec>
typedef random_access_iterator_tag _Vector_const_iterator< _Myvec >::iterator_category
template<class _Myvec>
typedef _Myvec::const_pointer _Vector_const_iterator< _Myvec >::pointer
template<class _Myvec>
typedef _Myvec::const_reference _Vector_const_iterator< _Myvec >::reference
template<class _Myvec>
typedef _Myvec::value_type _Vector_const_iterator< _Myvec >::value_type

Constructor & Destructor Documentation

template<class _Myvec>
_Vector_const_iterator< _Myvec >::_Vector_const_iterator ( )
inline
41  : _Ptr()
42  { // construct with null pointer
43  }
_Tptr _Ptr
Definition: vector:258
template<class _Myvec>
_Vector_const_iterator< _Myvec >::_Vector_const_iterator ( _Tptr  _Parg,
const _Container_base _Pvector 
)
inline
46  : _Ptr(_Parg)
47  { // construct with pointer _Parg
48  this->_Adopt(_Pvector);
49  }
_Tptr _Ptr
Definition: vector:258
void _Adopt(const void *)
Definition: xutility:53

Member Function Documentation

template<class _Myvec>
void _Vector_const_iterator< _Myvec >::_Compat ( const _Myiter ) const
inline
254  { // test for compatible iterator pair
255  }
template<class _Myvec>
_Myiter& _Vector_const_iterator< _Myvec >::_Rechecked ( _Unchecked_type  _Right)
inline
54  { // reset from unchecked iterator
55  this->_Ptr = (_Tptr)_Right;
56  return (*this);
57  }
_Tptr _Ptr
Definition: vector:258
_Myvec::pointer _Tptr
Definition: vector:38
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
_Unchecked_type _Vector_const_iterator< _Myvec >::_Unchecked ( ) const
inline
60  { // make an unchecked iterator
61  return (_Unchecked_type(this->_Ptr));
62  }
pointer _Unchecked_type
Definition: vector:51
_Tptr _Ptr
Definition: vector:258
template<class _Myvec>
bool _Vector_const_iterator< _Myvec >::operator!= ( const _Myiter _Right) const
inline
209  { // test for iterator inequality
210  return (!(*this == _Right));
211  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
reference _Vector_const_iterator< _Myvec >::operator* ( ) const
inline
65  { // return designated object
66  #if _ITERATOR_DEBUG_LEVEL == 2
67  if (this->_Getcont() == 0
68  || this->_Ptr == 0
69  || this->_Ptr < ((_Myvec *)this->_Getcont())->_Myfirst
70  || ((_Myvec *)this->_Getcont())->_Mylast <= this->_Ptr)
71  { // report error
72  _DEBUG_ERROR("vector iterator not dereferencable");
74  }
75 
76  #elif _ITERATOR_DEBUG_LEVEL == 1
77  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
79  this->_Ptr != _Tptr()
80  && ((_Myvec *)this->_Getcont())->_Myfirst <= this->_Ptr
81  && this->_Ptr < ((_Myvec *)this->_Getcont())->_Mylast);
82  #endif /* _ITERATOR_DEBUG_LEVEL */
83 
84  _Analysis_assume_(this->_Ptr != _Tptr());
85 
86  return (*this->_Ptr);
87  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
_Tptr _Ptr
Definition: vector:258
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
_Myvec::pointer _Tptr
Definition: vector:38
#define _Analysis_assume_(expr)
Definition: sal.h:2916
#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 _Myvec>
_Myiter _Vector_const_iterator< _Myvec >::operator+ ( difference_type  _Off) const
inline
175  { // return this + integer
176  _Myiter _Tmp = *this;
177  return (_Tmp += _Off);
178  }
_Vector_const_iterator< _Myvec > _Myiter
Definition: vector:31
template<class _Myvec>
_Myiter& _Vector_const_iterator< _Myvec >::operator++ ( )
inline
95  { // preincrement
96  #if _ITERATOR_DEBUG_LEVEL == 2
97  if (this->_Getcont() == 0
98  || this->_Ptr == 0
99  || ((_Myvec *)this->_Getcont())->_Mylast <= this->_Ptr)
100  { // report error
101  _DEBUG_ERROR("vector iterator not incrementable");
103  }
104 
105  #elif _ITERATOR_DEBUG_LEVEL == 1
106  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
108  this->_Ptr != _Tptr()
109  && this->_Ptr < ((_Myvec *)this->_Getcont())->_Mylast);
110  #endif /* _ITERATOR_DEBUG_LEVEL */
111 
112  ++this->_Ptr;
113  return (*this);
114  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
_Tptr _Ptr
Definition: vector:258
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
_Myvec::pointer _Tptr
Definition: vector:38
#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 _Myvec>
_Myiter _Vector_const_iterator< _Myvec >::operator++ ( int  )
inline
117  { // postincrement
118  _Myiter _Tmp = *this;
119  ++*this;
120  return (_Tmp);
121  }
_Vector_const_iterator< _Myvec > _Myiter
Definition: vector:31
template<class _Myvec>
_Myiter& _Vector_const_iterator< _Myvec >::operator+= ( difference_type  _Off)
inline
153  { // increment by integer
154  #if _ITERATOR_DEBUG_LEVEL == 2
155  if (this->_Getcont() == 0
156  || this->_Ptr + _Off < ((_Myvec *)this->_Getcont())->_Myfirst
157  || ((_Myvec *)this->_Getcont())->_Mylast < this->_Ptr + _Off)
158  { // report error
159  _DEBUG_ERROR("vector iterator + offset out of range");
161  }
162 
163  #elif _ITERATOR_DEBUG_LEVEL == 1
164  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
166  ((_Myvec *)this->_Getcont())->_Myfirst <= this->_Ptr + _Off
167  && this->_Ptr + _Off <= ((_Myvec *)this->_Getcont())->_Mylast);
168  #endif /* _ITERATOR_DEBUG_LEVEL */
169 
170  _Ptr += _Off;
171  return (*this);
172  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
_Tptr _Ptr
Definition: vector:258
#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 _Myvec>
_Myiter _Vector_const_iterator< _Myvec >::operator- ( difference_type  _Off) const
inline
186  { // return this - integer
187  _Myiter _Tmp = *this;
188  return (_Tmp -= _Off);
189  }
_Vector_const_iterator< _Myvec > _Myiter
Definition: vector:31
template<class _Myvec>
difference_type _Vector_const_iterator< _Myvec >::operator- ( const _Myiter _Right) const
inline
192  { // return difference of iterators
193  _Compat(_Right);
194  return (this->_Ptr - _Right._Ptr);
195  }
_Tptr _Ptr
Definition: vector:258
void _Compat(const _Myiter &) const
Definition: vector:253
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
_Myiter& _Vector_const_iterator< _Myvec >::operator-- ( )
inline
124  { // predecrement
125  #if _ITERATOR_DEBUG_LEVEL == 2
126  if (this->_Getcont() == 0
127  || this->_Ptr == 0
128  || this->_Ptr <= ((_Myvec *)this->_Getcont())->_Myfirst)
129  { // report error
130  _DEBUG_ERROR("vector iterator not decrementable");
132  }
133 
134  #elif _ITERATOR_DEBUG_LEVEL == 1
135  _SCL_SECURE_VALIDATE(this->_Getcont() != 0);
137  this->_Ptr != _Tptr()
138  && ((_Myvec *)this->_Getcont())->_Myfirst < this->_Ptr);
139  #endif /* _ITERATOR_DEBUG_LEVEL */
140 
141  --this->_Ptr;
142  return (*this);
143  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
_Tptr _Ptr
Definition: vector:258
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
_Myvec::pointer _Tptr
Definition: vector:38
#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 _Myvec>
_Myiter _Vector_const_iterator< _Myvec >::operator-- ( int  )
inline
146  { // postdecrement
147  _Myiter _Tmp = *this;
148  --*this;
149  return (_Tmp);
150  }
_Vector_const_iterator< _Myvec > _Myiter
Definition: vector:31
template<class _Myvec>
_Myiter& _Vector_const_iterator< _Myvec >::operator-= ( difference_type  _Off)
inline
181  { // decrement by integer
182  return (*this += -_Off);
183  }
template<class _Myvec>
pointer _Vector_const_iterator< _Myvec >::operator-> ( ) const
inline
90  { // return pointer to class object
92  }
Definition: xmemory0:198
template<class _Myvec>
bool _Vector_const_iterator< _Myvec >::operator< ( const _Myiter _Right) const
inline
214  { // test if this < _Right
215  _Compat(_Right);
216  return (this->_Ptr < _Right._Ptr);
217  }
_Tptr _Ptr
Definition: vector:258
void _Compat(const _Myiter &) const
Definition: vector:253
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
bool _Vector_const_iterator< _Myvec >::operator<= ( const _Myiter _Right) const
inline
225  { // test if this <= _Right
226  return (!(_Right < *this));
227  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
bool _Vector_const_iterator< _Myvec >::operator== ( const _Myiter _Right) const
inline
203  { // test for iterator equality
204  _Compat(_Right);
205  return (this->_Ptr == _Right._Ptr);
206  }
_Tptr _Ptr
Definition: vector:258
void _Compat(const _Myiter &) const
Definition: vector:253
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
bool _Vector_const_iterator< _Myvec >::operator> ( const _Myiter _Right) const
inline
220  { // test if this > _Right
221  return (_Right < *this);
222  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
bool _Vector_const_iterator< _Myvec >::operator>= ( const _Myiter _Right) const
inline
230  { // test if this >= _Right
231  return (!(*this < _Right));
232  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Myvec>
reference _Vector_const_iterator< _Myvec >::operator[] ( difference_type  _Off) const
inline
198  { // subscript
199  return (*(*this + _Off));
200  }

Member Data Documentation

template<class _Myvec>
_Tptr _Vector_const_iterator< _Myvec >::_Ptr

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