SNAP Library 4.1, Developer Reference  2018-07-26 16:30:42
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>

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 CurrTableIdx, and PTableV.

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
PTable TTableIterator::Next ( )
inline

Returns next table in the sequence and update iterator.

Definition at line 430 of file table.h.

References CurrTableIdx, and PTableV.

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.

Referenced by HasNext(), and Next().

TVec<PTable> TTableIterator::PTableV
private

Vector of TTables which are to be iterated over.

Definition at line 424 of file table.h.

Referenced by HasNext(), and Next().


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