Loading...
Searching...
No Matches
casacore::BaseTableIterator Class Reference
tables package (libcasa_tables) » Tables_module » Tables_module_internal_classes

More...

`#include <BaseTabIter.h>`

## Public Member Functions

| BaseTableIterator (const std::shared_ptr< BaseTable > &, const Block< String > &columnNames, const Block< std::shared_ptr< BaseCompare > > &cmpObjs, const Block< Int > &orders, int option, bool cacheIterationBoundaries=false)
| Create the table iterator to iterate through the given columns in the given order.
BaseTableIterator * | clone () const
| Clone this iterator.
virtual | ~BaseTableIterator ()
BaseTableIterator & | operator= (const BaseTableIterator &)=delete
| Assignment is not needed, because the assignment operator in the envelope class TableIterator has reference semantics.
virtual void | reset ()
| Reset the iterator (i.e.
virtual std::shared_ptr< BaseTable > | next ()
| Return the next group.
virtual void | copyState (const BaseTableIterator &)
const String & | keyChangeAtLastNext () const
| Report Name of slowest sort column that changed (according to the comparison function) to terminate the most recent call to next() Enables clients to sense iteration boundary properties and organize associated iterations.

## Protected Member Functions

| BaseTableIterator (const BaseTableIterator &)
| Copy constructor (to be used by clone).
std::shared_ptr< BaseTable > | noCachedIterBoundariesNext ()

## Protected Attributes

std::shared_ptr< BaseTable > | sortTab_p
rownr_t | lastRow_p
uInt | nrkeys_p
String | keyChangeAtLastNext_p
Block< BaseColumn * > | colPtr_p
Block< std::shared_ptr< BaseCompare > > | cmpObj_p

## Private Attributes

Block< void * > | lastVal_p
Block< void * > | curVal_p
std::shared_ptr< Vector< rownr_t > > | sortIterBoundaries_p
std::shared_ptr< Vector< size_t > > | sortIterKeyIdxChange_p
Vector< rownr_t >::iterator | sortIterBoundariesIt_p
Vector< size_t >::iterator | sortIterKeyIdxChangeIt_p
RefTable * | aRefTable_p
std::shared_ptr< BaseTable > | aBaseTable_p

## Detailed Description

Base class for table iterator

### Intended use:

Internal

### Review Status

Reviewed By:
  UNKNOWN
Date Reviewed:
  before2004/08/25

### Prerequisite

- BaseTable
- TableIterator

### Etymology

BaseTableIterator is the base class for the classes doing the actual iterating through a table.

### Synopsis

BaseTableIterator is the base class for the table iterators. It is a letter class of the envelope TableIterator. Currently there are no classes derived from BaseTableIterator, since it can do all the work itself. However, in the future this need not to be true anymore.

BaseTableIterator iterates by sorting the table in the required order and then creating a RefTable for each step containing the rows for that iteration step. Each iteration step assembles the rows with equal key values.

Definition at line 81 of file BaseTabIter.h.

## Constructor & Destructor Documentation

## BaseTableIterator() [1/2]

casacore::BaseTableIterator::BaseTableIterator | ( | const std::shared_ptr< BaseTable > & | ,
|  | const Block< String > & | columnNames,
|  | const Block< std::shared_ptr< BaseCompare > > & | cmpObjs,
|  | const Block< Int > & | orders,
|  | int | option,
|  | bool | cacheIterationBoundaries = false )

Create the table iterator to iterate through the given columns in the given order.

The given compare objects will be used for the sort and to compare if values are equal. If a compare object in cmpObjs is null, the default ObjCompare<T> will be used. If cacheIterationBoundaries is set to true then the iteration boundaries computed at construction time while sorting the table are used when advancing with next(). Otherwise, for each next() call the comparison functions are reevaluated again to get the iteration boundary. This improves performance in general but will break existing applications that change the comparison objects (cmpObjs) between iterations.

Referenced by BaseTableIterator(), clone(), copyState(), and operator=().

## ~BaseTableIterator()

virtual casacore::BaseTableIterator::~BaseTableIterator | ( |  | ) |

virtual

## BaseTableIterator() [2/2]

casacore::BaseTableIterator::BaseTableIterator | ( | const BaseTableIterator & |  | ) |

protected

Copy constructor (to be used by clone).

References BaseTableIterator().

## Member Function Documentation

## clone()

BaseTableIterator * casacore::BaseTableIterator::clone | ( |  | ) | const

Clone this iterator.

References BaseTableIterator().

## copyState()

virtual void casacore::BaseTableIterator::copyState | ( | const BaseTableIterator & |  | ) |

virtual

References BaseTableIterator().

## keyChangeAtLastNext()

const String & casacore::BaseTableIterator::keyChangeAtLastNext | ( |  | ) | const

inline

Report Name of slowest sort column that changed (according to the comparison function) to terminate the most recent call to next() Enables clients to sense iteration boundary properties and organize associated iterations.

Definition at line 125 of file BaseTabIter.h.

References keyChangeAtLastNext_p.

## next()

virtual std::shared_ptr< BaseTable > casacore::BaseTableIterator::next | ( |  | ) |

virtual

Return the next group.

## noCachedIterBoundariesNext()

std::shared_ptr< BaseTable > casacore::BaseTableIterator::noCachedIterBoundariesNext | ( |  | ) |

protected

## operator=()

BaseTableIterator & casacore::BaseTableIterator::operator= | ( | const BaseTableIterator & |  | ) |

delete

Assignment is not needed, because the assignment operator in the envelope class TableIterator has reference semantics.

References BaseTableIterator().

## reset()

virtual void casacore::BaseTableIterator::reset | ( |  | ) |

virtual

Reset the iterator (i.e.

restart iteration).

## Member Data Documentation

## aBaseTable_p

std::shared_ptr<BaseTable> casacore::BaseTableIterator::aBaseTable_p

private

Definition at line 150 of file BaseTabIter.h.

## aRefTable_p

RefTable* casacore::BaseTableIterator::aRefTable_p

private

Definition at line 149 of file BaseTabIter.h.

## cmpObj_p

Block<std::shared_ptr<BaseCompare> > casacore::BaseTableIterator::cmpObj_p

protected

Definition at line 134 of file BaseTabIter.h.

## colPtr_p

Block<BaseColumn*> casacore::BaseTableIterator::colPtr_p

protected

Definition at line 133 of file BaseTabIter.h.

## curVal_p

Block<void*> casacore::BaseTableIterator::curVal_p

private

Definition at line 143 of file BaseTabIter.h.

## keyChangeAtLastNext_p

String casacore::BaseTableIterator::keyChangeAtLastNext_p

protected

Definition at line 132 of file BaseTabIter.h.

Referenced by keyChangeAtLastNext().

## lastRow_p

rownr_t casacore::BaseTableIterator::lastRow_p

protected

Definition at line 130 of file BaseTabIter.h.

## lastVal_p

Block<void*> casacore::BaseTableIterator::lastVal_p

private

Definition at line 142 of file BaseTabIter.h.

## nrkeys_p

uInt casacore::BaseTableIterator::nrkeys_p

protected

Definition at line 131 of file BaseTabIter.h.

## sortIterBoundaries_p

std::shared_ptr<Vector<rownr_t> > casacore::BaseTableIterator::sortIterBoundaries_p

private

Definition at line 145 of file BaseTabIter.h.

## sortIterBoundariesIt_p

Vector<rownr_t>::iterator casacore::BaseTableIterator::sortIterBoundariesIt_p

private

Definition at line 147 of file BaseTabIter.h.

## sortIterKeyIdxChange_p

std::shared_ptr<Vector<size_t> > casacore::BaseTableIterator::sortIterKeyIdxChange_p

private

Definition at line 146 of file BaseTabIter.h.

## sortIterKeyIdxChangeIt_p

Vector<size_t>::iterator casacore::BaseTableIterator::sortIterKeyIdxChangeIt_p

private

Definition at line 148 of file BaseTabIter.h.

## sortTab_p

std::shared_ptr<BaseTable> casacore::BaseTableIterator::sortTab_p

protected

Definition at line 129 of file BaseTabIter.h.

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

- tables/Tables/BaseTabIter.h