ivl 679
ivl::same_place_reverse_iterator< _Iterator > Class Template Reference

#include <same_place_reverse_iterator.hpp>

List of all members.

Public Member Functions

iterator_type base () const
reference operator* ()
same_place_reverse_iterator operator+ (difference_type __n) const
same_place_reverse_iteratoroperator++ ()
same_place_reverse_iterator operator++ (int)
same_place_reverse_iteratoroperator+= (difference_type __n)
same_place_reverse_iterator operator- (difference_type __n) const
same_place_reverse_iteratoroperator-- ()
same_place_reverse_iterator operator-- (int)
same_place_reverse_iteratoroperator-= (difference_type __n)
pointer operator-> () const
reference operator[] (difference_type __n) const
 same_place_reverse_iterator (iterator_type __x)
 same_place_reverse_iterator (const same_place_reverse_iterator &__x)
 same_place_reverse_iterator ()
template<typename _Iter >
 same_place_reverse_iterator (const same_place_reverse_iterator< _Iter > &__x)

Detailed Description

template<typename _Iterator>
class ivl::same_place_reverse_iterator< _Iterator >

This is a class taken from the std::reverse_iterator with the difference that instead of the relation &*(reverse_iterator(i)) == &*(i - 1) we have &*(reverse_iterator(i)) == &*(i). When using this type of relation we need to ensure that there is a valid pointer right before the beginning of the data pointer, or, an invalid pointer that will "do the trick", meaning that it will never be dereferenced, and will only be checked for inequality versus another pointer. There reason for this class is an expected (but not proven) speed improvement for removing the (i - 1) overhead in &*(i - 1). It is thought to be a legal iterator for our rbegin() and rend() based on the stl standards, however (TODO) this needs to be researched furthermore and in case there are contradictions with the std standards or in case there is no speed improvement we will probably need to fall back to std::reverse_iterator and do the proper changes in all member functions that return or manipulate reverse iterators. There is probably an unsafety issue in the cases that a pointer before the beginning of the data is invalid. If same_place_reverse_iterator is not used for pointers, in some cases like subarray there is a chance (needs to be researched too) that the unsafety issue is not there at all.


Constructor & Destructor Documentation

template<typename _Iterator>
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator ( ) [inline]

The default constructor default-initializes member current. If it is a pointer, that means it is zero-initialized.

template<typename _Iterator>
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator ( iterator_type  __x) [inline, explicit]

This iterator will move in the opposite direction that x does.

template<typename _Iterator>
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator ( const same_place_reverse_iterator< _Iterator > &  __x) [inline]

The copy constructor is normal.

template<typename _Iterator>
template<typename _Iter >
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator ( const same_place_reverse_iterator< _Iter > &  __x) [inline]

A same_place_reverse_iterator across other types can be copied in the normal fashion.


Member Function Documentation

template<typename _Iterator>
iterator_type ivl::same_place_reverse_iterator< _Iterator >::base ( ) const [inline]
Returns:
current, the iterator used for underlying work.
template<typename _Iterator>
reference ivl::same_place_reverse_iterator< _Iterator >::operator* ( ) [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator+ ( difference_type  __n) const [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator++ ( ) [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator++ ( int  ) [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator+= ( difference_type  __n) [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator- ( difference_type  __n) const [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator-- ( int  ) [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator-- ( ) [inline]
Returns:
TODO
template<typename _Iterator>
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator-= ( difference_type  __n) [inline]
Returns:
TODO
template<typename _Iterator>
pointer ivl::same_place_reverse_iterator< _Iterator >::operator-> ( ) const [inline]
Returns:
TODO
template<typename _Iterator>
reference ivl::same_place_reverse_iterator< _Iterator >::operator[] ( difference_type  __n) const [inline]
Returns:
TODO

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations