| 
    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 
   | 
 
Iterator class for TTable rows, that allows logical row removal while iterating. More...
#include <table.h>

Public Member Functions | |
| TRowIteratorWithRemove () | |
| Default constructor.  More... | |
| TRowIteratorWithRemove (TInt RowIdx, TTable *TablePtr) | |
| Constructs iterator pointing to given row.  More... | |
| TRowIteratorWithRemove (TInt RowIdx, TTable *TablePtr, TBool IsStart) | |
| Constructs iterator pointing to given row.  More... | |
| TRowIteratorWithRemove (const TRowIteratorWithRemove &RowI) | |
| Copy constructor.  More... | |
| TRowIteratorWithRemove & | operator++ (int) | 
| Increments the iterator.  More... | |
| TRowIteratorWithRemove & | Next () | 
| Increments the iterator (For Python compatibility).  More... | |
| bool | operator< (const TRowIteratorWithRemove &RowI) const | 
Checks if this iterator points to a row that is before the one pointed by RowI.  More... | |
| bool | operator== (const TRowIteratorWithRemove &RowI) const | 
Checks if this iterator points to the same row pointed by RowI.  More... | |
| TInt | GetRowIdx () const | 
| Gets physical index of current row.  More... | |
| TInt | GetNextRowIdx () const | 
| Gets physical index of next row.  More... | |
| TInt | GetNextIntAttr (TInt ColIdx) const | 
| Returns value of integer attribute specified by integer column index for next row.  More... | |
| TFlt | GetNextFltAttr (TInt ColIdx) const | 
| Returns value of float attribute specified by float column index for next row.  More... | |
| TStr | GetNextStrAttr (TInt ColIdx) const | 
| Returns value of string attribute specified by string column index for next row.  More... | |
| TInt | GetNextIntAttr (const TStr &Col) const | 
| Returns value of integer attribute specified by attribute name for next row.  More... | |
| TFlt | GetNextFltAttr (const TStr &Col) const | 
| Returns value of float attribute specified by attribute name for next row.  More... | |
| TStr | GetNextStrAttr (const TStr &Col) const | 
| Returns value of string attribute specified by attribute name for next row.  More... | |
| TBool | IsFirst () const | 
| Checks whether iterator points to first valid row of the table.  More... | |
| void | RemoveNext () | 
| Removes next row.  More... | |
| TBool | CompareAtomicConst (TInt ColIdx, const TPrimitive &Val, TPredComp Cmp) | 
Compares value in column ColIdx with given primitive Val.  More... | |
Private Attributes | |
| TInt | CurrRowIdx | 
| Physical row index of current row pointer by iterator.  More... | |
| TTable * | Table | 
| Reference to table containing this row.  More... | |
| TBool | Start | 
| A flag indicating whether the current row in the first valid row of the table.  More... | |
Iterator class for TTable rows, that allows logical row removal while iterating.
      
  | 
  inline | 
Default constructor.
Definition at line 380 of file table.h.
Constructs iterator pointing to given row.
Definition at line 215 of file table.cpp.
      
  | 
  inline | 
Constructs iterator pointing to given row.
Definition at line 384 of file table.h.
      
  | 
  inline | 
Copy constructor.
Definition at line 387 of file table.h.
| TBool TRowIteratorWithRemove::CompareAtomicConst | ( | TInt | ColIdx, | 
| const TPrimitive & | Val, | ||
| TPredComp | Cmp | ||
| ) | 
Compares value in column ColIdx with given primitive Val. 
Definition at line 282 of file table.cpp.
References atFlt, atInt, atStr, Cmp(), TPredicate::EvalAtom(), TPredicate::EvalStrAtom(), TPrimitive::GetFlt(), TPrimitive::GetInt(), GetNextFltAttr(), GetNextIntAttr(), GetNextStrAttr(), TPrimitive::GetStr(), and TPrimitive::GetType().
Referenced by TTable::SelectAtomicConst().


Returns value of float attribute specified by float column index for next row.
Definition at line 252 of file table.cpp.
References TTable::FltCols, GetNextRowIdx(), and Table.
Referenced by CompareAtomicConst(), TTable::Select(), and TTable::SelectAtomic().


Returns value of float attribute specified by attribute name for next row.
Definition at line 265 of file table.cpp.
References TTable::FltCols, TTable::GetColIdx(), GetNextRowIdx(), and Table.

Returns value of integer attribute specified by integer column index for next row.
Definition at line 248 of file table.cpp.
References GetNextRowIdx(), TTable::IntCols, and Table.
Referenced by CompareAtomicConst(), TTable::Select(), and TTable::SelectAtomic().


Returns value of integer attribute specified by attribute name for next row.
Definition at line 260 of file table.cpp.
References TTable::GetColIdx(), GetNextRowIdx(), TTable::IntCols, and Table.

| TInt TRowIteratorWithRemove::GetNextRowIdx | ( | ) | const | 
Gets physical index of next row.
Definition at line 243 of file table.cpp.
References CurrRowIdx, TTable::FirstValidRow, TTable::Next, Start, and Table.
Referenced by GetNextFltAttr(), GetNextIntAttr(), GetNextStrAttr(), TTable::KeepSortedRows(), Next(), RemoveNext(), TTable::Select(), TTable::SelectAtomic(), and TTable::SelectAtomicConst().

Returns value of string attribute specified by string column index for next row.
Definition at line 256 of file table.cpp.
References GetNextRowIdx(), TTable::GetStrValIdx(), and Table.
Referenced by CompareAtomicConst(), TTable::Select(), and TTable::SelectAtomic().


Returns value of string attribute specified by attribute name for next row.
Definition at line 270 of file table.cpp.
References GetNextRowIdx(), TTable::GetStrVal(), and Table.

| TInt TRowIteratorWithRemove::GetRowIdx | ( | ) | const | 
Gets physical index of current row.
Definition at line 239 of file table.cpp.
References CurrRowIdx.
| TBool TRowIteratorWithRemove::IsFirst | ( | ) | const | 
Checks whether iterator points to first valid row of the table.
Definition at line 274 of file table.cpp.
References CurrRowIdx, TTable::FirstValidRow, and Table.
| TRowIteratorWithRemove & TRowIteratorWithRemove::Next | ( | ) | 
Increments the iterator (For Python compatibility).
Definition at line 222 of file table.cpp.
References Assert, CurrRowIdx, GetNextRowIdx(), and Start.
Referenced by operator++().


| TRowIteratorWithRemove & TRowIteratorWithRemove::operator++ | ( | int | ) | 
Increments the iterator.
Definition at line 218 of file table.cpp.
References Next().

| bool TRowIteratorWithRemove::operator< | ( | const TRowIteratorWithRemove & | RowI | ) | const | 
Checks if this iterator points to a row that is before the one pointed by RowI. 
Definition at line 229 of file table.cpp.
References CurrRowIdx.
| bool TRowIteratorWithRemove::operator== | ( | const TRowIteratorWithRemove & | RowI | ) | const | 
Checks if this iterator points to the same row pointed by RowI. 
Definition at line 235 of file table.cpp.
References CurrRowIdx.
| void TRowIteratorWithRemove::RemoveNext | ( | ) | 
Removes next row.
Definition at line 278 of file table.cpp.
References CurrRowIdx, GetNextRowIdx(), TTable::RemoveRow(), and Table.
Referenced by TTable::KeepSortedRows(), TTable::Select(), TTable::SelectAtomic(), and TTable::SelectAtomicConst().


      
  | 
  private | 
Physical row index of current row pointer by iterator.
Definition at line 375 of file table.h.
Referenced by GetNextRowIdx(), GetRowIdx(), IsFirst(), Next(), operator<(), operator==(), and RemoveNext().
      
  | 
  private | 
A flag indicating whether the current row in the first valid row of the table.
Definition at line 377 of file table.h.
Referenced by GetNextRowIdx(), and Next().
      
  | 
  private | 
Reference to table containing this row.
Definition at line 376 of file table.h.
Referenced by GetNextFltAttr(), GetNextIntAttr(), GetNextRowIdx(), GetNextStrAttr(), IsFirst(), and RemoveNext().