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 >::difference_type distance_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>::difference_type checked_array_iterator< _Iterator >::distance_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
377  : _Myarray(), _Mysize(0), _Myindex(0)
378  { // default construct
379  }
_Iterator _Myarray
Definition: iterator:517
size_t _Mysize
Definition: iterator:518
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
checked_array_iterator< _Iterator >::checked_array_iterator ( _Iterator  _Array,
size_t  _Size,
size_t  _Index = 0 
)
inline
383  : _Myarray(_Array), _Mysize(_Size), _Myindex(_Index)
384  { // construct with array, size, and optional index
386  }
_Iterator _Myarray
Definition: iterator:517
size_t _Mysize
Definition: iterator:518
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:276
_Check_return_ _In_ long _Size
Definition: io.h:325
size_t _Myindex
Definition: iterator:519

Member Function Documentation

template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::_Rechecked ( _Unchecked_type  _Right)
inline
396  { // reset from unchecked iterator
398  return (*this);
399  }
_Iterator _Myarray
Definition: iterator:517
const _Ty & _Right
Definition: algorithm:4087
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
_Unchecked_type checked_array_iterator< _Iterator >::_Unchecked ( ) const
inline
402  { // make an unchecked iterator
403  return (base());
404  }
_Iterator base() const
Definition: iterator:388
template<class _Iterator>
_Iterator checked_array_iterator< _Iterator >::base ( ) const
inline
389  { // return unwrapped iterator
390  return (_Myarray + _Myindex);
391  }
_Iterator _Myarray
Definition: iterator:517
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator!= ( const _Myt _Right) const
inline
491  { // test for iterator inequality
492  return (!(*this == _Right));
493  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Iterator>
reference checked_array_iterator< _Iterator >::operator* ( ) const
inline
407  { // return designated object
409  && _Myindex < _Mysize);
410  return (_Myarray[_Myindex]);
411  }
_Iterator _Myarray
Definition: iterator:517
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:286
size_t _Mysize
Definition: iterator:518
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator+ ( difference_type  _Off) const
inline
457  { // return this + integer
458  _Myt _Tmp = *this;
459  return (_Tmp += _Off);
460  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator++ ( )
inline
419  { // preincrement
421  && _Myindex < _Mysize);
422  ++_Myindex;
423  return (*this);
424  }
_Iterator _Myarray
Definition: iterator:517
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:286
size_t _Mysize
Definition: iterator:518
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator++ ( int  )
inline
427  { // postincrement
428  _Myt _Tmp = *this;
429  ++*this;
430  return (_Tmp);
431  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator+= ( difference_type  _Off)
inline
449  { // increment by integer
451  && _Myindex + _Off <= _Mysize);
452  _Myindex += _Off;
453  return (*this);
454  }
_Iterator _Myarray
Definition: iterator:517
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:286
size_t _Mysize
Definition: iterator:518
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator- ( difference_type  _Off) const
inline
468  { // return this - integer
469  _Myt _Tmp = *this;
470  return (_Tmp -= _Off);
471  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
difference_type checked_array_iterator< _Iterator >::operator- ( const _Myt _Right) const
inline
474  { // return difference of iterators
476  return (_Myindex - _Right._Myindex);
477  }
_Iterator _Myarray
Definition: iterator:517
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:276
const _Ty & _Right
Definition: algorithm:4087
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator-- ( )
inline
434  { // predecrement
436  && 0 < _Myindex);
437  --_Myindex;
438  return (*this);
439  }
_Iterator _Myarray
Definition: iterator:517
#define _SCL_SECURE_ALWAYS_VALIDATE_RANGE(cond)
Definition: yvals.h:286
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
_Myt checked_array_iterator< _Iterator >::operator-- ( int  )
inline
442  { // postdecrement
443  _Myt _Tmp = *this;
444  --*this;
445  return (_Tmp);
446  }
checked_array_iterator< _Iterator > _Myt
Definition: iterator:361
template<class _Iterator>
_Myt& checked_array_iterator< _Iterator >::operator-= ( difference_type  _Off)
inline
463  { // decrement by integer
464  return (*this += -_Off);
465  }
template<class _Iterator>
pointer checked_array_iterator< _Iterator >::operator-> ( ) const
inline
414  { // return pointer to class object
415  return (_STD pointer_traits<pointer>::pointer_to(**this));
416  }
Definition: xmemory0:198
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator< ( const _Myt _Right) const
inline
496  { // test if this < _Right
498  return (_Myindex < _Right._Myindex);
499  }
_Iterator _Myarray
Definition: iterator:517
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:276
const _Ty & _Right
Definition: algorithm:4087
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator<= ( const _Myt _Right) const
inline
507  { // test if this <= _Right
508  return (!(_Right < *this));
509  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator== ( const _Myt _Right) const
inline
485  { // test for iterator equality
487  return (_Myindex == _Right._Myindex);
488  }
_Iterator _Myarray
Definition: iterator:517
#define _SCL_SECURE_ALWAYS_VALIDATE(cond)
Definition: yvals.h:276
const _Ty & _Right
Definition: algorithm:4087
size_t _Myindex
Definition: iterator:519
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator> ( const _Myt _Right) const
inline
502  { // test if this > _Right
503  return (_Right < *this);
504  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Iterator>
bool checked_array_iterator< _Iterator >::operator>= ( const _Myt _Right) const
inline
512  { // test if this >= _Right
513  return (!(*this < _Right));
514  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Iterator>
reference checked_array_iterator< _Iterator >::operator[] ( difference_type  _Off) const
inline
480  { // subscript
481  return (*(*this + _Off));
482  }

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: