Nugget
|
#include <generic_iterator.h>
Public Types | |
typedef eastl::iterator_traits< Iterator >::iterator_category | iterator_category |
typedef eastl::iterator_traits< Iterator >::value_type | value_type |
typedef eastl::iterator_traits< Iterator >::difference_type | difference_type |
typedef eastl::iterator_traits< Iterator >::reference | reference |
typedef eastl::iterator_traits< Iterator >::pointer | pointer |
typedef Iterator | iterator_type |
typedef iterator_type | wrapped_iterator_type |
typedef Container | container_type |
typedef generic_iterator< Iterator, Container > | this_type |
Public Member Functions | |
generic_iterator (const iterator_type &x) | |
this_type & | operator= (const iterator_type &x) |
template<typename Iterator2 > | |
generic_iterator (const generic_iterator< Iterator2, Container > &x) | |
reference | operator* () const |
pointer | operator-> () const |
this_type & | operator++ () |
this_type | operator++ (int) |
this_type & | operator-- () |
this_type | operator-- (int) |
reference | operator[] (const difference_type &n) const |
this_type & | operator+= (const difference_type &n) |
this_type | operator+ (const difference_type &n) const |
this_type & | operator-= (const difference_type &n) |
this_type | operator- (const difference_type &n) const |
const iterator_type & | base () const |
Protected Attributes | |
Iterator | mIterator |
Converts something which can be iterated into a formal iterator. While this class' primary purpose is to allow the conversion of a pointer to an iterator, you can convert anything else to an iterator by defining an iterator_traits<> specialization for that object type. See EASTL iterator.h for this.
Example usage: typedef generic_iterator<int*> IntArrayIterator; typedef generic_iterator<int*, char> IntArrayIteratorOther;