casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
casacore::BaseTableIterator Class Reference

Base class for table iterator. More...

#include <BaseTabIter.h>

Public Member Functions

 BaseTableIterator (BaseTable *, const Block< String > &columnNames, const Block< CountedPtr< BaseCompare > > &, const Block< Int > &orders, int option)
 Create the table iterator to iterate through the given columns in the given order. More...
 
BaseTableIteratorclone () const
 Clone this iterator. More...
 
virtual ~BaseTableIterator ()
 
virtual void reset ()
 Reset the iterator (i.e. More...
 
virtual BaseTablenext ()
 Return the next group. More...
 
virtual void copyState (const BaseTableIterator &)
 
const StringkeyChangeAtLastNext () const
 Report Name of slowest sort column that changed to terminate the most recent call to next() Enables clients to sense iteration boundary properties and organize associated iterations. More...
 

Protected Member Functions

 BaseTableIterator (const BaseTableIterator &)
 Copy constructor (to be used by clone) More...
 

Protected Attributes

BaseTablesortTab_p
 
uInt lastRow_p
 
uInt nrkeys_p
 
String keyChangeAtLastNext_p
 
PtrBlock< BaseColumn * > colPtr_p
 
Block< CountedPtr< BaseCompare > > cmpObj_p
 

Private Member Functions

BaseTableIteratoroperator= (const BaseTableIterator &)
 Assignment is not needed, because the assignment operator in the envelope class TableIterator has reference semantics. More...
 

Private Attributes

Block< void * > lastVal_p
 
Block< void * > curVal_p
 

Detailed Description

Base class for table iterator.

Intended use:

Internal

Review Status

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

Prerequisite

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 83 of file BaseTabIter.h.

Constructor & Destructor Documentation

casacore::BaseTableIterator::BaseTableIterator ( BaseTable ,
const Block< String > &  columnNames,
const Block< CountedPtr< BaseCompare > > &  ,
const Block< Int > &  orders,
int  option 
)

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 comare object is null, the default ObjCompare<T> will be used.

virtual casacore::BaseTableIterator::~BaseTableIterator ( )
virtual
casacore::BaseTableIterator::BaseTableIterator ( const BaseTableIterator )
protected

Copy constructor (to be used by clone)

Member Function Documentation

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

Clone this iterator.

virtual void casacore::BaseTableIterator::copyState ( const BaseTableIterator )
virtual
const String& casacore::BaseTableIterator::keyChangeAtLastNext ( ) const
inline

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

Definition at line 113 of file BaseTabIter.h.

virtual BaseTable* casacore::BaseTableIterator::next ( )
virtual

Return the next group.

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

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

Declaring it private, makes it unusable.

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

Reset the iterator (i.e.

restart iteration).

Member Data Documentation

Block<CountedPtr<BaseCompare> > casacore::BaseTableIterator::cmpObj_p
protected

Definition at line 121 of file BaseTabIter.h.

PtrBlock<BaseColumn*> casacore::BaseTableIterator::colPtr_p
protected

Definition at line 120 of file BaseTabIter.h.

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

Definition at line 133 of file BaseTabIter.h.

String casacore::BaseTableIterator::keyChangeAtLastNext_p
protected

Definition at line 119 of file BaseTabIter.h.

uInt casacore::BaseTableIterator::lastRow_p
protected

Definition at line 117 of file BaseTabIter.h.

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

Definition at line 132 of file BaseTabIter.h.

uInt casacore::BaseTableIterator::nrkeys_p
protected

Definition at line 118 of file BaseTabIter.h.

BaseTable* casacore::BaseTableIterator::sortTab_p
protected

Definition at line 113 of file BaseTabIter.h.


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