TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
VectorIteratorMultiple< T > Class Template Referencefinal

Vector iterator template to be used to iterate multiple vectors at a single invocation. More...

#include <tdme/utilities/VectorIteratorMultiple.h>

Collaboration diagram for VectorIteratorMultiple< T >:
Collaboration graph

Public Member Functions

 VectorIteratorMultiple ()
 Public constructor. More...
 
 VectorIteratorMultiple (vector< vector< T > * > &vectorList)
 Public constructor. More...
 
void clear ()
 Clears list of array lists to iterate. More...
 
void addVector (vector< T > *vector)
 Adds vector to iterator. More...
 
VectorIteratorMultiple< T > * reset ()
 Resets vector iterator for iterating. More...
 
bool hasNext ()
 Determines if next element is available. More...
 
next ()
 Retrieves next element, hasNext must have been called before. More...
 
VectorIteratorMultipleiterator ()
 
VectorIteratorMultiple< T > * clone ()
 Clones this iterator. More...
 

Private Attributes

int32_t vectorIdx { 0 }
 
int32_t elementIdx { 0 }
 
vector< vector< T > * > vectorList
 

Detailed Description

template<typename T>
class tdme::utilities::VectorIteratorMultiple< T >

Vector iterator template to be used to iterate multiple vectors at a single invocation.

Author
Andreas Drewke
Version
$Id$

Definition at line 21 of file VectorIteratorMultiple.h.

Constructor & Destructor Documentation

◆ VectorIteratorMultiple() [1/2]

Public constructor.

Definition at line 32 of file VectorIteratorMultiple.h.

◆ VectorIteratorMultiple() [2/2]

VectorIteratorMultiple ( vector< vector< T > * > &  vectorList)
inline

Public constructor.

Parameters
vectorListvector list

Definition at line 40 of file VectorIteratorMultiple.h.

Member Function Documentation

◆ addVector()

void addVector ( vector< T > *  vector)
inline

Adds vector to iterator.

Parameters
vectorvector

Definition at line 56 of file VectorIteratorMultiple.h.

◆ clear()

void clear ( )
inline

Clears list of array lists to iterate.

Definition at line 48 of file VectorIteratorMultiple.h.

◆ clone()

VectorIteratorMultiple< T > * clone ( )
inline

Clones this iterator.

Definition at line 106 of file VectorIteratorMultiple.h.

◆ hasNext()

bool hasNext ( )
inline

Determines if next element is available.

Returns
bool if next element available

Definition at line 75 of file VectorIteratorMultiple.h.

◆ iterator()

VectorIteratorMultiple * iterator ( )
inline
Returns
iterator

Definition at line 98 of file VectorIteratorMultiple.h.

◆ next()

T next ( )
inline

Retrieves next element, hasNext must have been called before.

Definition at line 91 of file VectorIteratorMultiple.h.

◆ reset()

VectorIteratorMultiple< T > * reset ( )
inline

Resets vector iterator for iterating.

Returns
this vector iterator

Definition at line 65 of file VectorIteratorMultiple.h.

Member Data Documentation

◆ elementIdx

int32_t elementIdx { 0 }
private

Definition at line 25 of file VectorIteratorMultiple.h.

◆ vectorIdx

int32_t vectorIdx { 0 }
private

Definition at line 24 of file VectorIteratorMultiple.h.

◆ vectorList

vector<vector<T>*> vectorList
private

Definition at line 26 of file VectorIteratorMultiple.h.


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