Lunchbox  1.4.0
Public Member Functions | Protected Attributes | Friends
lunchbox::IndexIterator< S, C, T > Class Template Reference

Counter-based, as opposed to pointer-based, iterator for any container. More...

#include <indexIterator.h>

+ Inheritance diagram for lunchbox::IndexIterator< S, C, T >:
+ Collaboration diagram for lunchbox::IndexIterator< S, C, T >:

List of all members.

Public Member Functions

 IndexIterator (C *container, const size_t i)
 IndexIterator (const S &from)
template<class U , class V , class W >
 IndexIterator (const IndexIterator< U, V, W > &from)
S & operator= (const IndexIterator &rhs)
template<class U , class W >
S & operator= (const IndexIterator< S, U, W > &rhs)
S & operator++ ()
S & operator-- ()
operator++ (int)
operator-- (int)
operator+ (const size_t &n) const
S & operator+= (const size_t &n)
operator- (const size_t &n) const
S & operator-= (const size_t &n)
ssize_t operator- (const S &n) const
bool operator== (const S &rhs) const
bool operator!= (const S &rhs) const
bool operator< (const S &rhs) const
bool operator> (const S &rhs) const
bool operator<= (const S &rhs) const
bool operator>= (const S &rhs) const
size_t getPosition () const

Protected Attributes

C * container_
size_t i_

Friends

class IndexIterator

Detailed Description

template<class S, class C, class T>
class lunchbox::IndexIterator< S, C, T >

Counter-based, as opposed to pointer-based, iterator for any container.

Uses curiously recurring template pattern to return proper type from assignment and other operators. Access methods are to be implemented by a subclass using container_ and i_. Furthermore subclasses need to implement the necessary constructors (see LFVectorIterator for example).

Definition at line 35 of file indexIterator.h.


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