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

Public Types

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

Public Member Functions

 _String_const_iterator ()
 
 _String_const_iterator (pointer _Parg, const _Container_base *_Pstring)
 
_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

pointer _Ptr
 

Member Typedef Documentation

template<class _Mystr>
typedef _String_const_iterator<_Mystr> _String_const_iterator< _Mystr >::_Myiter
template<class _Mystr>
typedef pointer _String_const_iterator< _Mystr >::_Unchecked_type
template<class _Mystr>
typedef _Mystr::difference_type _String_const_iterator< _Mystr >::difference_type
template<class _Mystr>
typedef random_access_iterator_tag _String_const_iterator< _Mystr >::iterator_category
template<class _Mystr>
typedef _Mystr::const_pointer _String_const_iterator< _Mystr >::pointer
template<class _Mystr>
typedef _Mystr::const_reference _String_const_iterator< _Mystr >::reference
template<class _Mystr>
typedef _Mystr::value_type _String_const_iterator< _Mystr >::value_type

Constructor & Destructor Documentation

template<class _Mystr>
_String_const_iterator< _Mystr >::_String_const_iterator ( )
inline
47  { // construct with null pointer
48  this->_Ptr = 0;
49  }
pointer _Ptr
Definition: xstring:268
template<class _Mystr>
_String_const_iterator< _Mystr >::_String_const_iterator ( pointer  _Parg,
const _Container_base _Pstring 
)
inline
52  { // construct with pointer _Parg
53  this->_Adopt(_Pstring);
54  this->_Ptr = _Parg;
55  }
pointer _Ptr
Definition: xstring:268
void _Adopt(const void *)
Definition: xutility:53

Member Function Documentation

template<class _Mystr>
void _String_const_iterator< _Mystr >::_Compat ( const _Myiter ) const
inline
264  { // test for compatible iterator pair
265  }
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::_Rechecked ( _Unchecked_type  _Right)
inline
60  { // reset from unchecked iterator
61  this->_Ptr = _Right;
62  return (*this);
63  }
pointer _Ptr
Definition: xstring:268
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
_Unchecked_type _String_const_iterator< _Mystr >::_Unchecked ( ) const
inline
66  { // make an unchecked iterator
67  return (_Unchecked_type(this->_Ptr));
68  }
pointer _Unchecked_type
Definition: xstring:57
pointer _Ptr
Definition: xstring:268
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator!= ( const _Myiter _Right) const
inline
219  { // test for iterator inequality
220  return (!(*this == _Right));
221  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
reference _String_const_iterator< _Mystr >::operator* ( ) const
inline
71  { // return designated object
72  #if _ITERATOR_DEBUG_LEVEL == 2
73  if (this->_Getcont() == 0
74  || this->_Ptr == 0
75  || this->_Ptr < ((_Mystr *)this->_Getcont())->_Myptr()
76  || ((_Mystr *)this->_Getcont())->_Myptr()
77  + ((_Mystr *)this->_Getcont())->_Mysize <= this->_Ptr)
78  { // report error
79  _DEBUG_ERROR("string iterator not dereferencable");
81  }
82 
83  #elif _ITERATOR_DEBUG_LEVEL == 1
84  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
86  ((_Mystr *)this->_Getcont())->_Myptr() <= this->_Ptr
87  && this->_Ptr < ((_Mystr *)this->_Getcont())->_Myptr()
88  + ((_Mystr *)this->_Getcont())->_Mysize);
89  #endif /* _ITERATOR_DEBUG_LEVEL */
90 
91  _Analysis_assume_(this->_Ptr != 0);
92 
93  return (*this->_Ptr);
94  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
#define _Analysis_assume_(expr)
Definition: sal.h:2916
pointer _Ptr
Definition: xstring:268
#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 _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator+ ( difference_type  _Off) const
inline
185  { // return this + integer
186  _Myiter _Tmp = *this;
187  return (_Tmp += _Off);
188  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:38
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator++ ( )
inline
102  { // preincrement
103  #if _ITERATOR_DEBUG_LEVEL == 2
104  if (this->_Getcont() == 0
105  || this->_Ptr == 0
106  || ((_Mystr *)this->_Getcont())->_Myptr()
107  + ((_Mystr *)this->_Getcont())->_Mysize <= this->_Ptr)
108  { // report error
109  _DEBUG_ERROR("string iterator not incrementable");
111  }
112 
113  #elif _ITERATOR_DEBUG_LEVEL == 1
114  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
116  this->_Ptr < ((_Mystr *)this->_Getcont())->_Myptr()
117  + ((_Mystr *)this->_Getcont())->_Mysize);
118  #endif /* _ITERATOR_DEBUG_LEVEL */
119 
120  ++this->_Ptr;
121  return (*this);
122  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
pointer _Ptr
Definition: xstring:268
#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 _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator++ ( int  )
inline
125  { // postincrement
126  _Myiter _Tmp = *this;
127  ++*this;
128  return (_Tmp);
129  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:38
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator+= ( difference_type  _Off)
inline
160  { // increment by integer
161  #if _ITERATOR_DEBUG_LEVEL == 2
162  if (this->_Getcont() == 0
163  || this->_Ptr == 0
164  || this->_Ptr + _Off < ((_Mystr *)this->_Getcont())->_Myptr()
165  || ((_Mystr *)this->_Getcont())->_Myptr()
166  + ((_Mystr *)this->_Getcont())->_Mysize < this->_Ptr + _Off)
167  { // report error
168  _DEBUG_ERROR("string iterator + offset out of range");
170  }
171 
172  #elif _ITERATOR_DEBUG_LEVEL == 1
173  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
175  ((_Mystr *)this->_Getcont())->_Myptr() <= this->_Ptr + _Off
176  && this->_Ptr + _Off <= ((_Mystr *)this->_Getcont())->_Myptr()
177  + ((_Mystr *)this->_Getcont())->_Mysize);
178  #endif /* _ITERATOR_DEBUG_LEVEL */
179 
180  _Ptr += _Off;
181  return (*this);
182  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
pointer _Ptr
Definition: xstring:268
#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 _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator- ( difference_type  _Off) const
inline
196  { // return this - integer
197  _Myiter _Tmp = *this;
198  return (_Tmp -= _Off);
199  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:38
template<class _Mystr>
difference_type _String_const_iterator< _Mystr >::operator- ( const _Myiter _Right) const
inline
202  { // return difference of iterators
203  _Compat(_Right);
204  return (this->_Ptr - _Right._Ptr);
205  }
void _Compat(const _Myiter &) const
Definition: xstring:263
pointer _Ptr
Definition: xstring:268
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator-- ( )
inline
132  { // predecrement
133  #if _ITERATOR_DEBUG_LEVEL == 2
134  if (this->_Getcont() == 0
135  || this->_Ptr == 0
136  || this->_Ptr <= ((_Mystr *)this->_Getcont())->_Myptr())
137  { // report error
138  _DEBUG_ERROR("string iterator not decrementable");
140  }
141 
142  #elif _ITERATOR_DEBUG_LEVEL == 1
143  _SCL_SECURE_VALIDATE(this->_Getcont() != 0 && this->_Ptr != 0);
145  ((_Mystr *)this->_Getcont())->_Myptr() < this->_Ptr);
146  #endif /* _ITERATOR_DEBUG_LEVEL */
147 
148  --this->_Ptr;
149  return (*this);
150  }
const _Container_base0 * _Getcont() const
Definition: xutility:57
#define _SCL_SECURE_OUT_OF_RANGE
Definition: yvals.h:351
pointer _Ptr
Definition: xstring:268
#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 _Mystr>
_Myiter _String_const_iterator< _Mystr >::operator-- ( int  )
inline
153  { // postdecrement
154  _Myiter _Tmp = *this;
155  --*this;
156  return (_Tmp);
157  }
_String_const_iterator< _Mystr > _Myiter
Definition: xstring:38
template<class _Mystr>
_Myiter& _String_const_iterator< _Mystr >::operator-= ( difference_type  _Off)
inline
191  { // decrement by integer
192  return (*this += -_Off);
193  }
template<class _Mystr>
pointer _String_const_iterator< _Mystr >::operator-> ( ) const
inline
97  { // return pointer to class object
99  }
Definition: xmemory0:198
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator< ( const _Myiter _Right) const
inline
224  { // test if this < _Right
225  _Compat(_Right);
226  return (this->_Ptr < _Right._Ptr);
227  }
void _Compat(const _Myiter &) const
Definition: xstring:263
pointer _Ptr
Definition: xstring:268
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator<= ( const _Myiter _Right) const
inline
235  { // test if this <= _Right
236  return (!(_Right < *this));
237  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator== ( const _Myiter _Right) const
inline
213  { // test for iterator equality
214  _Compat(_Right);
215  return (this->_Ptr == _Right._Ptr);
216  }
void _Compat(const _Myiter &) const
Definition: xstring:263
pointer _Ptr
Definition: xstring:268
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator> ( const _Myiter _Right) const
inline
230  { // test if this > _Right
231  return (_Right < *this);
232  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
bool _String_const_iterator< _Mystr >::operator>= ( const _Myiter _Right) const
inline
240  { // test if this >= _Right
241  return (!(*this < _Right));
242  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Mystr>
reference _String_const_iterator< _Mystr >::operator[] ( difference_type  _Off) const
inline
208  { // subscript
209  return (*(*this + _Off));
210  }

Member Data Documentation

template<class _Mystr>
pointer _String_const_iterator< _Mystr >::_Ptr

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