Lunchbox  1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lunchbox::LFVectorIterator< V, T > Class Template Reference

An iterator for LFVector. More...

#include <lfVectorIterator.h>

+ Inheritance diagram for lunchbox::LFVectorIterator< V, T >:
+ Collaboration diagram for lunchbox::LFVectorIterator< V, T >:

Public Member Functions

 LFVectorIterator (V *vector, size_t i)
 Construct an iterator for a given vector and position. More...
 
template<class U , class W >
 LFVectorIterator (const LFVectorIterator< U, W > &from)
 Copy-construct an iterator. More...
 
T & operator* () const
 Dereference the element at the current position. More...
 
T * operator-> () const
 Address the element at the current position. More...
 
T & operator[] (const size_t &n) const
 Address the element at the given position. More...
 
- Public Member Functions inherited from lunchbox::IndexIterator< LFVectorIterator< V, T >, V, T >
 IndexIterator (V *container, const size_t i)
 Construct an iterator for a given container and position. More...
 
 IndexIterator (const LFVectorIterator< V, T > &from)
 Copy-construct an iterator. More...
 
 IndexIterator (const IndexIterator< U, V, W > &from)
 Copy-construct an iterator. More...
 
LFVectorIterator< V, T > & operator= (const IndexIterator &rhs)
 Assign the container and position from another iterator. More...
 
LFVectorIterator< V, T > & operator= (const IndexIterator< LFVectorIterator< V, T >, U, W > &rhs)
 Assign the container and position from another iterator. More...
 
LFVectorIterator< V, T > & operator++ ()
 Increment the iterator position. More...
 
LFVectorIterator< V, T > operator++ (int)
 Increment the iterator position. More...
 
LFVectorIterator< V, T > & operator-- ()
 Decrement the iterator position. More...
 
LFVectorIterator< V, T > operator-- (int)
 Decrement the iterator position. More...
 
LFVectorIterator< V, T > operator+ (const size_t &n) const
 Increment the iterator position by a given amount. More...
 
LFVectorIterator< V, T > & operator+= (const size_t &n)
 Increment the iterator position by a given amount. More...
 
LFVectorIterator< V, T > operator- (const size_t &n) const
 Decrement the iterator position by a given amount. More...
 
ssize_t operator- (const LFVectorIterator< V, T > &n) const
 Compute the distance between this and another iterator. More...
 
LFVectorIterator< V, T > & operator-= (const size_t &n)
 Decrement the iterator position by a given amount. More...
 
bool operator== (const LFVectorIterator< V, T > &rhs) const
 
bool operator!= (const LFVectorIterator< V, T > &rhs) const
 
bool operator< (const LFVectorIterator< V, T > &rhs) const
 
bool operator> (const LFVectorIterator< V, T > &rhs) const
 
bool operator<= (const LFVectorIterator< V, T > &rhs) const
 
bool operator>= (const LFVectorIterator< V, T > &rhs) const
 
size_t getPosition () const
 

Friends

template<class , int32_t >
class LFVector
 

Additional Inherited Members

- Protected Attributes inherited from lunchbox::IndexIterator< LFVectorIterator< V, T >, V, T >
V * container_
 
size_t i_
 

Detailed Description

template<class V, class T>
class lunchbox::LFVectorIterator< V, T >

An iterator for LFVector.

Template Parameters
Vthe LFVector type
Tthe LFVector element type

Definition at line 36 of file lfVectorIterator.h.

Constructor & Destructor Documentation

template<class V, class T>
lunchbox::LFVectorIterator< V, T >::LFVectorIterator ( V *  vector,
size_t  i 
)
inline

Construct an iterator for a given vector and position.

Version
1.8

Definition at line 42 of file lfVectorIterator.h.

template<class V, class T>
template<class U , class W >
lunchbox::LFVectorIterator< V, T >::LFVectorIterator ( const LFVectorIterator< U, W > &  from)
inline

Copy-construct an iterator.

Version
1.8

Definition at line 46 of file lfVectorIterator.h.

Member Function Documentation

template<class V, class T>
T& lunchbox::LFVectorIterator< V, T >::operator* ( ) const
inline

Dereference the element at the current position.

Version
1.8

Definition at line 49 of file lfVectorIterator.h.

template<class V, class T>
T* lunchbox::LFVectorIterator< V, T >::operator-> ( ) const
inline

Address the element at the current position.

Version
1.8

Definition at line 52 of file lfVectorIterator.h.

template<class V, class T>
T& lunchbox::LFVectorIterator< V, T >::operator[] ( const size_t &  n) const
inline

Address the element at the given position.

Version
1.8

Definition at line 55 of file lfVectorIterator.h.


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