STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cliext::RandomAccessIterator< _Cont_t > Class Template Reference
Inheritance diagram for cliext::RandomAccessIterator< _Cont_t >:

Public Types

typedef _Cont_t::value_type _Value_t
 
typedef RandomAccessIterator< _Cont_t > _Mytype_t
 
typedef _STLCLR Generic::IRandomAccessIterator< _Value_t_Myiter_t
 
typedef random_access_iterator_tag iterator_category
 
typedef _Value_t value_type
 
typedef int difference_type
 
typedef value_type pointer
 
typedef value_type reference
 
typedef value_type const_reference
 
typedef ConstRandomAccessIterator< _Cont_t > _Myciter_t
 
typedef _STLCLR Generic::ContainerRandomAccessIterator< _Value_t_Mygeniter_t
 

Public Member Functions

 RandomAccessIterator (_Cont_t^_Cont, int _Offset)
 
 operator _Myciter_t ()
 
 RandomAccessIterator (_Mygeniter_t%_Right)
 
 operator _Mygeniter_t ()
 
virtual System::Object Clone ()
 
int get_bias ()
 
System::Object get_node ()
 
bool valid ()
 
System::Object container ()
 
void next ()
 
bool equal_to (_STLCLR Generic::IInputIterator< _Value_t >^_Right)
 
bool equal_to (_Mytype_t%_Right)
 
const_reference get_cref ()
 
reference get_ref ()
 
void prev ()
 
difference_type move (difference_type _Offset)
 
difference_type distance (_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
 
difference_type distance (_Mytype_t%_Right)
 
bool less_than (_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
 
bool less_than (_Mytype_t%_Right)
 
bool operator== (_STLCLR Generic::IInputIterator< _Value_t >^_Right)
 
bool operator== (_Mytype_t%_Right)
 
bool operator!= (_STLCLR Generic::IInputIterator< _Value_t >^_Right)
 
bool operator!= (_Mytype_t%_Right)
 
difference_type operator- (_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
 
bool operator< (_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
 
bool operator< (_Mytype_t%_Right)
 
bool operator>= (_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
 
bool operator>= (_Mytype_t%_Right)
 
bool operator> (_Mytype_t%_Right)
 
bool operator<= (_Mytype_t%_Right)
 

Static Public Member Functions

static reference operator-> (RandomAccessIterator%_Left)
 
static reference operator* (RandomAccessIterator%_Left)
 
static RandomAccessIterator operator++ (RandomAccessIterator%_Left)
 
static RandomAccessIterator operator-- (RandomAccessIterator%_Left)
 
static RandomAccessIterator operator+ (RandomAccessIterator%_Left, difference_type _Right)
 
static RandomAccessIterator operator+ (difference_type _Left, RandomAccessIterator%_Right)
 
static RandomAccessIterator operator- (RandomAccessIterator%_Left, difference_type _Right)
 
static bool operator> (_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Left, _Mytype_t%_Right)
 
static bool operator<= (_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Left, _Mytype_t%_Right)
 

Public Attributes

property value_type default [difference_type]
 
_STLCLR_FIELD_ACCESS __pad0__: _Cont_t^ _Mycont
 
difference_type _Myoffset
 

Member Typedef Documentation

template<typename _Cont_t >
typedef ConstRandomAccessIterator<_Cont_t> cliext::RandomAccessIterator< _Cont_t >::_Myciter_t
template<typename _Cont_t >
typedef _STLCLR Generic::ContainerRandomAccessIterator<_Value_t> cliext::RandomAccessIterator< _Cont_t >::_Mygeniter_t
template<typename _Cont_t >
typedef _STLCLR Generic::IRandomAccessIterator<_Value_t> cliext::RandomAccessIterator< _Cont_t >::_Myiter_t
template<typename _Cont_t >
typedef RandomAccessIterator<_Cont_t> cliext::RandomAccessIterator< _Cont_t >::_Mytype_t
template<typename _Cont_t >
typedef _Cont_t::value_type cliext::RandomAccessIterator< _Cont_t >::_Value_t
template<typename _Cont_t >
typedef value_type cliext::RandomAccessIterator< _Cont_t >::const_reference
template<typename _Cont_t >
typedef int cliext::RandomAccessIterator< _Cont_t >::difference_type
template<typename _Cont_t >
typedef random_access_iterator_tag cliext::RandomAccessIterator< _Cont_t >::iterator_category
template<typename _Cont_t >
typedef value_type cliext::RandomAccessIterator< _Cont_t >::pointer
template<typename _Cont_t >
typedef value_type cliext::RandomAccessIterator< _Cont_t >::reference
template<typename _Cont_t >
typedef _Value_t cliext::RandomAccessIterator< _Cont_t >::value_type

Constructor & Destructor Documentation

template<typename _Cont_t >
cliext::RandomAccessIterator< _Cont_t >::RandomAccessIterator ( _Cont_t^  _Cont,
int  _Offset 
)
inline
2114  : _Mycont(_Cont), _Myoffset(_Offset)
2115  { // construct from container pointer and offset
2116  }
_Check_return_opt_ _In_ long _Offset
Definition: io.h:334
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
cliext::RandomAccessIterator< _Cont_t >::RandomAccessIterator ( _Mygeniter_t _Right)
inline
2130  : _Mycont((_Cont_t^)_Right.container()),
2131  _Myoffset(_Right.get_bias())
2132  { // construct by copying a generic iterator
2133  }
difference_type _Myoffset
Definition: iterator:2403
const _Ty & _Right
Definition: algorithm:4087

Member Function Documentation

template<typename _Cont_t >
virtual System::Object cliext::RandomAccessIterator< _Cont_t >::Clone ( )
inlinevirtual
2142  { // return a copy
2143  return (gcnew RandomAccessIterator(_Mycont, _Myoffset));
2144  }
difference_type _Myoffset
Definition: iterator:2403
RandomAccessIterator(_Cont_t^_Cont, int _Offset)
Definition: iterator:2113
template<typename _Cont_t >
System::Object cliext::RandomAccessIterator< _Cont_t >::container ( )
inline
2163  { // return owning container
2164  return (_Mycont);
2165  }
template<typename _Cont_t >
difference_type cliext::RandomAccessIterator< _Cont_t >::distance ( _STLCLR Generic::IRandomAccessIterator< _Value_t >^  _Right)
inline
2221  { // return difference of two iterators
2222  if (container() == nullptr
2223  || container() != _Right->container())
2224  throw gcnew System::ArgumentException();
2225  return (get_bias() - _Right->get_bias());
2226  }
System::Object container()
Definition: iterator:2162
int get_bias()
Definition: iterator:2146
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
difference_type cliext::RandomAccessIterator< _Cont_t >::distance ( _Mytype_t _Right)
inline
2230  { // return difference of two iterators
2231  if (container() == nullptr
2232  || container() != _Right.container())
2233  throw gcnew System::ArgumentException();
2234  return (get_bias() - _Right.get_bias());
2235  }
System::Object container()
Definition: iterator:2162
int get_bias()
Definition: iterator:2146
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::equal_to ( _STLCLR Generic::IInputIterator< _Value_t >^  _Right)
inline
2175  { // test if *this == _Right
2176  if (container() == nullptr
2177  || container() != _Right->container())
2178  throw gcnew System::ArgumentException();
2179  return (get_bias() == _Right->get_bias()
2180  && get_node() == _Right->get_node());
2181  }
System::Object get_node()
Definition: iterator:2151
System::Object container()
Definition: iterator:2162
int get_bias()
Definition: iterator:2146
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::equal_to ( _Mytype_t _Right)
inline
2184  { // test if *this == _Right
2185  if (container() == nullptr
2186  || container() != _Right.container())
2187  throw gcnew System::ArgumentException();
2188  return (get_bias() == _Right.get_bias()
2189  && get_node() == _Right.get_node());
2190  }
System::Object get_node()
Definition: iterator:2151
System::Object container()
Definition: iterator:2162
int get_bias()
Definition: iterator:2146
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
int cliext::RandomAccessIterator< _Cont_t >::get_bias ( )
inline
2147  { // get offset from wrapped iterator
2148  return (_Myoffset);
2149  }
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
const_reference cliext::RandomAccessIterator< _Cont_t >::get_cref ( )
inline
2193  { // return const reference to designated element
2194  return (_Mycont->at_bias(_Myoffset));
2195  }
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
System::Object cliext::RandomAccessIterator< _Cont_t >::get_node ( )
inline
2152  { // get node from wrapped iterator
2153  return (nullptr);
2154  }
template<typename _Cont_t >
reference cliext::RandomAccessIterator< _Cont_t >::get_ref ( )
inline
2198  { // return reference to designated element
2199  return (_Mycont->at_bias(_Myoffset));
2200  }
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::less_than ( _STLCLR Generic::IRandomAccessIterator< _Value_t >^  _Right)
inline
2238  { // test if *this < _Right
2239  if (container() == nullptr
2240  || container() != _Right->container())
2241  throw gcnew System::ArgumentException();
2242  return (get_bias() < _Right->get_bias());
2243  }
System::Object container()
Definition: iterator:2162
int get_bias()
Definition: iterator:2146
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::less_than ( _Mytype_t _Right)
inline
2246  { // test if *this < _Right
2247  if (container() == nullptr
2248  || container() != _Right.container())
2249  throw gcnew System::ArgumentException();
2250  return (get_bias() < _Right.get_bias());
2251  }
System::Object container()
Definition: iterator:2162
int get_bias()
Definition: iterator:2146
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
difference_type cliext::RandomAccessIterator< _Cont_t >::move ( difference_type  _Offset)
inline
2210  { // incremented by integer
2211  difference_type _Newoffset = _Myoffset + _Offset; // can overflow
2212 
2213  if (!_Mycont->valid_bias(_Newoffset))
2214  throw gcnew System::InvalidOperationException();
2215  _Myoffset = _Newoffset;
2216  return (_Myoffset);
2217  }
_Check_return_opt_ _In_ long _Offset
Definition: io.h:334
int difference_type
Definition: iterator:2107
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
void cliext::RandomAccessIterator< _Cont_t >::next ( )
inline
2168  { // increment
2169  if (!_Mycont->valid_bias(_Myoffset + 1))
2170  throw gcnew System::InvalidOperationException();
2171  ++_Myoffset;
2172  }
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
cliext::RandomAccessIterator< _Cont_t >::operator _Myciter_t ( )
inline
2121  { // convert to const iterator
2122  return (_Myciter_t(_Mycont, _Myoffset));
2123  }
ConstRandomAccessIterator< _Cont_t > _Myciter_t
Definition: iterator:2118
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
cliext::RandomAccessIterator< _Cont_t >::operator _Mygeniter_t ( )
inline
2136  { // convert to generic iterator
2137  return (_Mygeniter_t(_Mycont, _Myoffset));
2138  }
difference_type _Myoffset
Definition: iterator:2403
_STLCLR Generic::ContainerRandomAccessIterator< _Value_t > _Mygeniter_t
Definition: iterator:2127
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator!= ( _STLCLR Generic::IInputIterator< _Value_t >^  _Right)
inline
2285  { // test if *this != _Right
2286  return (!(*this == _Right));
2287  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator!= ( _Mytype_t _Right)
inline
2290  { // test if *this != _Right
2291  return (!(*this == _Right));
2292  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
static reference cliext::RandomAccessIterator< _Cont_t >::operator* ( RandomAccessIterator< _Cont_t >%  _Left)
inlinestatic
2260  { // return reference to designated element
2261  return (_Left.get_ref());
2262  }
template<typename _Cont_t >
static RandomAccessIterator cliext::RandomAccessIterator< _Cont_t >::operator+ ( RandomAccessIterator< _Cont_t >%  _Left,
difference_type  _Right 
)
inlinestatic
2307  { // return incremented by integer
2308  RandomAccessIterator _Iter = _Left;
2309 
2310  _Iter.move(_Right);
2311  return (_Iter);
2312  }
const _Ty & _Right
Definition: algorithm:4087
RandomAccessIterator(_Cont_t^_Cont, int _Offset)
Definition: iterator:2113
template<typename _Cont_t >
static RandomAccessIterator cliext::RandomAccessIterator< _Cont_t >::operator+ ( difference_type  _Left,
RandomAccessIterator< _Cont_t >%  _Right 
)
inlinestatic
2317  { // return incremented by integer
2318  RandomAccessIterator _Iter = _Right;
2319 
2320  _Iter.move(_Left);
2321  return (_Iter);
2322  }
const _Ty & _Right
Definition: algorithm:4087
RandomAccessIterator(_Cont_t^_Cont, int _Offset)
Definition: iterator:2113
template<typename _Cont_t >
static RandomAccessIterator cliext::RandomAccessIterator< _Cont_t >::operator++ ( RandomAccessIterator< _Cont_t >%  _Left)
inlinestatic
2268  { // return incremented
2269  _Left.next();
2270  return (_Left);
2271  }
template<typename _Cont_t >
static RandomAccessIterator cliext::RandomAccessIterator< _Cont_t >::operator- ( RandomAccessIterator< _Cont_t >%  _Left,
difference_type  _Right 
)
inlinestatic
2327  { // return decremented by integer
2328  RandomAccessIterator _Iter = _Left;
2329 
2330  _Iter.move(-_Right); // can overflow
2331  return (_Iter);
2332  }
const _Ty & _Right
Definition: algorithm:4087
RandomAccessIterator(_Cont_t^_Cont, int _Offset)
Definition: iterator:2113
template<typename _Cont_t >
difference_type cliext::RandomAccessIterator< _Cont_t >::operator- ( _STLCLR Generic::IRandomAccessIterator< _Value_t >^  _Right)
inline
2336  { // return difference of two iterators
2337  return (distance(_Right));
2338  }
difference_type distance(_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
Definition: iterator:2219
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
static RandomAccessIterator cliext::RandomAccessIterator< _Cont_t >::operator-- ( RandomAccessIterator< _Cont_t >%  _Left)
inlinestatic
2298  { // return decremented
2299  _Left.prev();
2300  return (_Left);
2301  }
template<typename _Cont_t >
static reference cliext::RandomAccessIterator< _Cont_t >::operator-> ( RandomAccessIterator< _Cont_t >%  _Left)
inlinestatic
2255  { // return pointer to class object
2256  return (_Left.get_ref());
2257  }
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator< ( _STLCLR Generic::IRandomAccessIterator< _Value_t >^  _Right)
inline
2341  { // test if *this < _Right
2342  return (less_than(_Right));
2343  }
bool less_than(_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
Definition: iterator:2237
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator< ( _Mytype_t _Right)
inline
2346  { // test if *this < _Right
2347  return (less_than(_Right));
2348  }
bool less_than(_STLCLR Generic::IRandomAccessIterator< _Value_t >^_Right)
Definition: iterator:2237
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
static bool cliext::RandomAccessIterator< _Cont_t >::operator<= ( _STLCLR Generic::IRandomAccessIterator< _Value_t >^  _Left,
_Mytype_t _Right 
)
inlinestatic
2374  { // test if _Left <= _Right
2375  return (!(_Right < _Left));
2376  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator<= ( _Mytype_t _Right)
inline
2379  { // test if *this <= _Right
2380  return (!(_Right < *this));
2381  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator== ( _STLCLR Generic::IInputIterator< _Value_t >^  _Right)
inline
2275  { // test if *this == _Right
2276  return (equal_to(_Right));
2277  }
bool equal_to(_STLCLR Generic::IInputIterator< _Value_t >^_Right)
Definition: iterator:2174
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator== ( _Mytype_t _Right)
inline
2280  { // test if *this == _Right
2281  return (equal_to(_Right));
2282  }
bool equal_to(_STLCLR Generic::IInputIterator< _Value_t >^_Right)
Definition: iterator:2174
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
static bool cliext::RandomAccessIterator< _Cont_t >::operator> ( _STLCLR Generic::IRandomAccessIterator< _Value_t >^  _Left,
_Mytype_t _Right 
)
inlinestatic
2362  { // test if _Left > _Right
2363  return (_Right < _Left);
2364  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator> ( _Mytype_t _Right)
inline
2367  { // test if *this > _Right
2368  return (_Right < *this);
2369  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator>= ( _STLCLR Generic::IRandomAccessIterator< _Value_t >^  _Right)
inline
2351  { // test if *this >= _Right
2352  return (!(*this < _Right));
2353  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::operator>= ( _Mytype_t _Right)
inline
2356  { // test if *this >= _Right
2357  return (!(*this < _Right));
2358  }
const _Ty & _Right
Definition: algorithm:4087
template<typename _Cont_t >
void cliext::RandomAccessIterator< _Cont_t >::prev ( )
inline
2203  { // decrement
2204  if (!_Mycont->valid_bias(_Myoffset - 1))
2205  throw gcnew System::InvalidOperationException();
2206  --_Myoffset;
2207  }
difference_type _Myoffset
Definition: iterator:2403
template<typename _Cont_t >
bool cliext::RandomAccessIterator< _Cont_t >::valid ( )
inline
2157  { // test if iterator valid
2158  return (container() != nullptr
2159  && _Mycont->valid_bias(_Myoffset));
2160  }
difference_type _Myoffset
Definition: iterator:2403
System::Object container()
Definition: iterator:2162

Member Data Documentation

template<typename _Cont_t >
_STLCLR_FIELD_ACCESS cliext::RandomAccessIterator< _Cont_t >::__pad0__
template<typename _Cont_t >
difference_type cliext::RandomAccessIterator< _Cont_t >::_Myoffset
template<typename _Cont_t >
property value_type cliext::RandomAccessIterator< _Cont_t >::default[difference_type]
Initial value:
{
{
RandomAccessIterator _Where = *this + _Pos;
return (*_Where);
}
{
RandomAccessIterator _Where = *this + _Pos;
*_Where = _Val;
}
}

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