SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TTableIterator Class Reference

Iterator over a vector of tables. More...

#include <table.h>

Collaboration diagram for TTableIterator:

Public Member Functions

 TTableIterator (TVec< PTable > &PTableV)
 Default constructor. More...
 
PTable Next ()
 Returns next table in the sequence and update iterator. More...
 
bool HasNext ()
 Checks if iterator has reached end of the sequence. More...
 

Private Attributes

TVec< PTablePTableV
 Vector of TTables which are to be iterated over. More...
 
TInt CurrTableIdx
 Index of the current table pointed to by this iterator. More...
 

Detailed Description

Iterator over a vector of tables.

Definition at line 423 of file table.h.

Constructor & Destructor Documentation

TTableIterator::TTableIterator ( TVec< PTable > &  PTableV)
inline

Default constructor.

Definition at line 428 of file table.h.

428 : PTableV(PTableV), CurrTableIdx(0) {}
TVec< PTable > PTableV
Vector of TTables which are to be iterated over.
Definition: table.h:424
TInt CurrTableIdx
Index of the current table pointed to by this iterator.
Definition: table.h:425

Member Function Documentation

bool TTableIterator::HasNext ( )
inline

Checks if iterator has reached end of the sequence.

Definition at line 432 of file table.h.

References TVec< TVal, TSizeTy >::Len().

432 { return CurrTableIdx < PTableV.Len(); }
TVec< PTable > PTableV
Vector of TTables which are to be iterated over.
Definition: table.h:424
TInt CurrTableIdx
Index of the current table pointed to by this iterator.
Definition: table.h:425

Here is the call graph for this function:

PTable TTableIterator::Next ( )
inline

Returns next table in the sequence and update iterator.

Definition at line 430 of file table.h.

430 { return PTableV[CurrTableIdx++]; }
TVec< PTable > PTableV
Vector of TTables which are to be iterated over.
Definition: table.h:424
TInt CurrTableIdx
Index of the current table pointed to by this iterator.
Definition: table.h:425

Member Data Documentation

TInt TTableIterator::CurrTableIdx
private

Index of the current table pointed to by this iterator.

Definition at line 425 of file table.h.

TVec<PTable> TTableIterator::PTableV
private

Vector of TTables which are to be iterated over.

Definition at line 424 of file table.h.


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