STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
checked_array_iterator< _Iterator > Class Template Reference

Public Types

typedef checked_array_iterator< _Iterator > _Myt
 
typedef iterator_traits< _Iterator >::iterator_category iterator_category
 
typedef iterator_traits< _Iterator >::value_type value_type
 
typedef iterator_traits< _Iterator >::difference_type difference_type
 
typedef iterator_traits< _Iterator >::pointer pointer
 
typedef iterator_traits< _Iterator >::reference reference
 
typedef _Iterator _Unchecked_type
 

Public Member Functions

 checked_array_iterator ()
 
 checked_array_iterator (_Iterator _Array, size_t _Size, size_t _Index=0)
 
_Iterator base () const
 
_Myt_Rechecked (_Unchecked_type _Right)
 
_Unchecked_type _Unchecked () const
 
reference operator* () const
 
pointer operator-> () const
 
_Mytoperator++ ()
 
_Myt operator++ (int)
 
_Mytoperator-- ()
 
_Myt operator-- (int)
 
_Mytoperator+= (difference_type _Off)
 
_Myt operator+ (difference_type _Off) const
 
_Mytoperator-= (difference_type _Off)
 
_Myt operator- (difference_type _Off) const
 
difference_type operator- (const _Myt &_Right) const
 
reference operator[] (difference_type _Off) const
 
bool operator== (const _Myt &_Right) const
 
bool operator!= (const _Myt &_Right) const
 
bool operator< (const _Myt &_Right) const
 
bool operator> (const _Myt &_Right) const
 
bool operator<= (const _Myt &_Right) const
 
bool operator>= (const _Myt &_Right) const
 

Private Attributes

_Iterator _Myarray
 
size_t _Mysize
 
size_t _Myindex
 

Member Typedef Documentation

template<class _Iterator>
typedef checked_array_iterator<_Iterator> checked_array_iterator< _Iterator >::_Myt
template<class _Iterator>
typedef _Iterator checked_array_iterator< _Iterator >::_Unchecked_type
template<class _Iterator>
typedef iterator_traits<_Iterator>::difference_type checked_array_iterator< _Iterator >::difference_type
template<class _Iterator>
typedef iterator_traits<_Iterator>::iterator_category checked_array_iterator< _Iterator >::iterator_category
template<class _Iterator>
typedef iterator_traits<_Iterator>::pointer checked_array_iterator< _Iterator >::pointer
template<class _Iterator>
typedef iterator_traits<_Iterator>::reference checked_array_iterator< _Iterator >::reference
template<class _Iterator>
typedef iterator_traits<_Iterator>::value_type checked_array_iterator< _Iterator >::value_type

Constructor & Destructor Documentation

template<class _Iterator>
checked_array_iterator< _Iterator >::checked_array_iterator ( )
inline
375  : _Myarray(), _Mysize(0), _Myindex(0)
376  { // default construct
377  }
_Iterator _Myarray
Definition: iterator:515
size_t _Mysize
Definition: iterator:516
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
checked_array_iterator< _Iterator >::checked_array_iterator ( _Iterator  _Array,
size_t  _Size,
size_t  _Index = 0 
)
inline
381  : _Myarray(_Array), _Mysize(_Size), _Myindex(_Index)
382  { // construct with array, size, and optional index
384  }
_Iterator _Myarray
Definition: iterator:515
size_t _Mysize
Definition: iterator:516
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:321
_Size
Definition: vcruntime_string.h:36
size_t _Myindex
Definition: iterator:517

Member Function Documentation

template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::_Rechecked ( _Unchecked_type  _Right)
inline
394  { // reset from unchecked iterator
396  return (*this);
397  }
_Iterator _Myarray
Definition: iterator:515
constexpr const _Ty &() _Right
Definition: algorithm:3591
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
_Unchecked_type checked_array_iterator< _Iterator >::_Unchecked ( ) const
inline
400  { // make an unchecked iterator
401  return (base());
402  }
_Iterator base() const
Definition: iterator:386
template<class _Iterator>
_Iterator checked_array_iterator< _Iterator >::base ( ) const
inline
387  { // return unwrapped iterator
388  return (_Myarray + _Myindex);
389  }
_Iterator _Myarray
Definition: iterator:515
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator!= ( const _Myt _Right) const
inline
489  { // test for iterator inequality
490  return (!(*this == _Right));
491  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Iterator>
reference checked_array_iterator< _Iterator >::operator* ( ) const
inline
405  { // return designated object
407  && _Myindex < _Mysize);
408  return (_Myarray[_Myindex]);
409  }
_Iterator _Myarray
Definition: iterator:515
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:331
size_t _Mysize
Definition: iterator:516
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator+ ( difference_type  _Off) const
inline
455  { // return this + integer
456  _Myt _Tmp = *this;
457  return (_Tmp += _Off);
458  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator++ ( )
inline
417  { // preincrement
419  && _Myindex < _Mysize);
420  ++_Myindex;
421  return (*this);
422  }
_Iterator _Myarray
Definition: iterator:515
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:331
size_t _Mysize
Definition: iterator:516
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator++ ( int  )
inline
425  { // postincrement
426  _Myt _Tmp = *this;
427  ++*this;
428  return (_Tmp);
429  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator+= ( difference_type  _Off)
inline
447  { // increment by integer
449  && _Myindex + _Off <= _Mysize);
450  _Myindex += _Off;
451  return (*this);
452  }
_Iterator _Myarray
Definition: iterator:515
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:331
size_t _Mysize
Definition: iterator:516
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator- ( difference_type  _Off) const
inline
466  { // return this - integer
467  _Myt _Tmp = *this;
468  return (_Tmp -= _Off);
469  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
difference_type checked_array_iterator< _Iterator >::operator- ( const _Myt _Right) const
inline
472  { // return difference of iterators
474  return (_Myindex - _Right._Myindex);
475  }
_Iterator _Myarray
Definition: iterator:515
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:321
constexpr const _Ty &() _Right
Definition: algorithm:3591
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator-- ( )
inline
432  { // predecrement
434  && 0 < _Myindex);
435  --_Myindex;
436  return (*this);
437  }
_Iterator _Myarray
Definition: iterator:515
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:331
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator-- ( int  )
inline
440  { // postdecrement
441  _Myt _Tmp = *this;
442  --*this;
443  return (_Tmp);
444  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator-= ( difference_type  _Off)
inline
461  { // decrement by integer
462  return (*this += -_Off);
463  }
template<class _Iterator>
pointer checked_array_iterator< _Iterator >::operator-> ( ) const
inline
412  { // return pointer to class object
413  return (_STD pointer_traits<pointer>::pointer_to(**this));
414  }
Definition: xmemory0:244
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator< ( const _Myt _Right) const
inline
494  { // test if this < _Right
496  return (_Myindex < _Right._Myindex);
497  }
_Iterator _Myarray
Definition: iterator:515
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:321
constexpr const _Ty &() _Right
Definition: algorithm:3591
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator<= ( const _Myt _Right) const
inline
505  { // test if this <= _Right
506  return (!(_Right < *this));
507  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator== ( const _Myt _Right) const
inline
483  { // test for iterator equality
485  return (_Myindex == _Right._Myindex);
486  }
_Iterator _Myarray
Definition: iterator:515
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:321
constexpr const _Ty &() _Right
Definition: algorithm:3591
size_t _Myindex
Definition: iterator:517
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator> ( const _Myt _Right) const
inline
500  { // test if this > _Right
501  return (_Right < *this);
502  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator>= ( const _Myt _Right) const
inline
510  { // test if this >= _Right
511  return (!(*this < _Right));
512  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Iterator>
reference checked_array_iterator< _Iterator >::operator[] ( difference_type  _Off) const
inline
478  { // subscript
479  return (*(*this + _Off));
480  }

Member Data Documentation

template<class _Iterator>
_Iterator checked_array_iterator< _Iterator >::_Myarray
private
template<class _Iterator>
size_t checked_array_iterator< _Iterator >::_Myindex
private
template<class _Iterator>
size_t checked_array_iterator< _Iterator >::_Mysize
private

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