#include <DerefIterator.h>
Not only is this a convenience, as these iterators automatically dereference themselves, it also solves a problem with const correctness. If one has vector<T*>::const_iterator, this only keeps the user from modifying the pointer, not from modifying the object that is pointed to. What one really wants is vector<const T*>::const_iterator, but that is not something one can get from vector<T*>.
typedef T DerefIterator< T >::Value_t |
typedef std::vector<T*> DerefIterator< T >::List_t |
typedef DerefIterator<Value_t> DerefIterator< T >::iterator |
typedef ConstDerefIterator<Value_t> DerefIterator< T >::const_iterator |
typedef std::random_access_iterator_tag DerefIterator< T >::iterator_category |
typedef Value_t DerefIterator< T >::value_type |
typedef ptrdiff_t DerefIterator< T >::difference_type |
typedef Value_t* DerefIterator< T >::pointer |
typedef Value_t& DerefIterator< T >::reference |
DerefIterator< T >::DerefIterator | ( | ) | [inline] |
DerefIterator< T >::DerefIterator | ( | typename List_t::iterator | x | ) | [inline] |
reference DerefIterator< T >::operator* | ( | ) | const [inline] |
References DerefIterator< T >::p_m.
pointer DerefIterator< T >::operator-> | ( | ) | const [inline] |
References DerefIterator< T >::p_m.
iterator& DerefIterator< T >::operator++ | ( | ) | [inline] |
References DerefIterator< T >::p_m.
iterator DerefIterator< T >::operator++ | ( | int | ) | [inline] |
References DerefIterator< T >::p_m.
iterator& DerefIterator< T >::operator-- | ( | ) | [inline] |
References DerefIterator< T >::p_m.
iterator DerefIterator< T >::operator-- | ( | int | ) | [inline] |
References DerefIterator< T >::p_m.
iterator& DerefIterator< T >::operator+= | ( | const difference_type | i | ) | [inline] |
References DerefIterator< T >::p_m.
iterator& DerefIterator< T >::operator-= | ( | const difference_type | i | ) | [inline] |
References DerefIterator< T >::p_m.
iterator DerefIterator< T >::operator+ | ( | const difference_type | i | ) | const [inline] |
References DerefIterator< T >::p_m.
iterator DerefIterator< T >::operator- | ( | const difference_type | i | ) | const [inline] |
References DerefIterator< T >::p_m.
difference_type DerefIterator< T >::operator- | ( | const iterator & | x | ) | const [inline] |
References DerefIterator< T >::p_m.
difference_type DerefIterator< T >::operator- | ( | const const_iterator & | x | ) | const [inline] |
References ConstDerefIterator< T >::p_m, and DerefIterator< T >::p_m.
reference DerefIterator< T >::operator[] | ( | const difference_type | i | ) | const [inline] |
References DerefIterator< T >::p_m.
bool DerefIterator< T >::operator== | ( | const iterator & | x | ) | const [inline] |
References DerefIterator< T >::p_m.
bool DerefIterator< T >::operator== | ( | const const_iterator & | x | ) | const [inline] |
References ConstDerefIterator< T >::p_m, and DerefIterator< T >::p_m.
bool DerefIterator< T >::operator< | ( | const iterator & | x | ) | const [inline] |
References DerefIterator< T >::p_m.
bool DerefIterator< T >::operator< | ( | const const_iterator & | x | ) | const [inline] |
References ConstDerefIterator< T >::p_m, and DerefIterator< T >::p_m.
bool DerefIterator< T >::operator!= | ( | const iterator & | y | ) | const [inline] |
bool DerefIterator< T >::operator> | ( | const iterator & | y | ) | const [inline] |
bool DerefIterator< T >::operator<= | ( | const iterator & | y | ) | const [inline] |
bool DerefIterator< T >::operator>= | ( | const iterator & | y | ) | const [inline] |
bool DerefIterator< T >::operator!= | ( | const const_iterator & | y | ) | const [inline] |
bool DerefIterator< T >::operator> | ( | const const_iterator & | y | ) | const [inline] |
bool DerefIterator< T >::operator<= | ( | const const_iterator & | y | ) | const [inline] |
bool DerefIterator< T >::operator>= | ( | const const_iterator & | y | ) | const [inline] |
friend class ConstDerefIterator< T > [friend] |
iterator operator+ | ( | const difference_type | n, | |
const iterator & | iter | |||
) | [friend] |
List_t::iterator DerefIterator< T >::p_m [protected] |
Referenced by DerefIterator< T >::operator*(), DerefIterator< T >::operator+(), DerefIterator< T >::operator++(), DerefIterator< T >::operator+=(), ConstDerefIterator< T >::operator-(), DerefIterator< T >::operator-(), DerefIterator< T >::operator--(), DerefIterator< T >::operator-=(), DerefIterator< T >::operator->(), ConstDerefIterator< T >::operator<(), DerefIterator< T >::operator<(), ConstDerefIterator< T >::operator==(), DerefIterator< T >::operator==(), and DerefIterator< T >::operator[]().