SNAP Library 3.0, User Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TTableIterator Class Reference

Iterator over a vector of tables. More...

#include <table.h>

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 432 of file table.h.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 437 of file table.h.

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

Member Function Documentation

bool TTableIterator::HasNext ( )
inline

Checks if iterator has reached end of the sequence.

Definition at line 441 of file table.h.

441 { return CurrTableIdx < PTableV.Len(); }
TVec< PTable > PTableV
Vector of TTables which are to be iterated over.
Definition: table.h:433
TInt CurrTableIdx
Index of the current table pointed to by this iterator.
Definition: table.h:434
PTable TTableIterator::Next ( )
inline

Returns next table in the sequence and update iterator.

Definition at line 439 of file table.h.

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

Member Data Documentation

TInt TTableIterator::CurrTableIdx
private

Index of the current table pointed to by this iterator.

Definition at line 434 of file table.h.

TVec<PTable> TTableIterator::PTableV
private

Vector of TTables which are to be iterated over.

Definition at line 433 of file table.h.


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