Helper for defining iterators over Array's.
More...
#include <Array.h>
Public Types | |
| typedef ArrayIterator< N > | const_iterator |
Iterator type for an Array<N>. | |
Static Public Member Functions | |
| static const_iterator | make_iterator (const Arrayrep *rep, unsigned int offs) |
Construct an Array<N>::const_iterator. | |
Helper for defining iterators over Array's.
Helper for defining iterators over Array's, specialized for N == 1.
For Array<N> with N >= 2, we want to use ArrayIterator<N> as the iterator class. However, for Array<1>, we want to use just an Arrayelt*. I'm too lazy to either specialize ArrayIterator<1> or to add a new Array<1> specialization. So this is an easier way of achieving the same effect. Array<N> uses as its iterator type ArrayIteratorChooser<N>::const_iterator; this small class then gets specialized for == 1. We also need to provide a way to create the iterators (since it will be done differently in the two cases). This is supplied by the make_iterator method.
For N == 1, we specialize so that Array<N> uses Arrayelt* as its iterator type.
| ArrayIteratorChooser< N >::const_iterator CxxUtils::ArrayIteratorChooser< N >::make_iterator | ( | const Arrayrep * | rep, | |
| unsigned int | offs | |||
| ) | [inline, static] |
Construct an Array<N>::const_iterator.
| rep | Arrayrep from which to initialize the iterator. | |
| offs | Offset of the first element referenced by the iterator within rep. |
1.6.1