casacore
|
Proxy for table iterator access. More...
#include <TableIterProxy.h>
Public Member Functions | |
TableIterProxy () | |
Default constructor initializes to not open. More... | |
TableIterProxy (const TableProxy &tab, const Vector< String > &columns, const String &order, const String &sortType, const Vector< Double > &intervals=Vector< Double >()) | |
Construct iterator for the given table column(s). More... | |
TableIterProxy (const TableIterProxy &) | |
Copy constructor (copy semantics). More... | |
~TableIterProxy () | |
TableIterProxy & | operator= (const TableIterProxy &) |
Assignment (copy semantics). More... | |
Bool | isNull () const |
Is the internal iterator object null? More... | |
const TableIterator & | iterator () const |
Get the TableIterator object. More... | |
Bool | nextPart (TableProxy &table) |
Get the next subtable and return it in the TableProxy argument. More... | |
TableProxy | next () |
Iterate to the next part (for Python use). More... | |
void | reset () |
Reset the iterator (for Python use). More... | |
Private Member Functions | |
void | makeStepIter (const Table &tab, const Block< String > &columns, const Vector< Double > &iterSteps, TableIterator::Order order, TableIterator::Option sortType) |
Make an iterator where iteration intervals may have been given. More... | |
Private Attributes | |
TableIterator | iter_p |
Bool | firstTime_p |
Proxy for table iterator access.
Public interface
TableIterProxy holds a TableIterator object for the table glish client.
TableIterProxy gives access to the table iterator functionality. It is primarily meant to be used in classes that wrap access to it from scripting languages (like Glish and Python). However, it can also be used directly from other C++ code.
A TableIterProxy object is usually created by class TableProxy.
Definition at line 86 of file TableIterProxy.h.
casacore::TableIterProxy::TableIterProxy | ( | ) |
Default constructor initializes to not open.
This constructor is only needed for the Block container.
casacore::TableIterProxy::TableIterProxy | ( | const TableProxy & | tab, |
const Vector< String > & | columns, | ||
const String & | order, | ||
const String & | sortType, | ||
const Vector< Double > & | intervals = Vector< Double >() |
||
) |
Construct iterator for the given table column(s).
Order and sortType are case-insentive strings and only the first character in it is important.
order[0]=a means ascending; d means descending.
sortType[0]=q means quicksort, i means insertion sort, n means nosort, h means heapsort, otherwise parsort
For each column an iteration interval can be given making it possible to iterate in e.g. time chunks of 1 minute. Not given or zero means no interval is given for that column, thus a normal comparison is done. It can only be used for numerical columns (not complex). However, if for a string column the interbval is set to non-zero, it means that case-insensitive comparison will be used.
casacore::TableIterProxy::TableIterProxy | ( | const TableIterProxy & | ) |
Copy constructor (copy semantics).
casacore::TableIterProxy::~TableIterProxy | ( | ) |
|
inline |
Is the internal iterator object null?
Definition at line 118 of file TableIterProxy.h.
References casacore::TableIterator::isNull(), and iter_p.
|
inline |
|
private |
Make an iterator where iteration intervals may have been given.
TableProxy casacore::TableIterProxy::next | ( | ) |
Iterate to the next part (for Python use).
An IterError exception is thrown at the end of the loop.
Bool casacore::TableIterProxy::nextPart | ( | TableProxy & | table | ) |
Get the next subtable and return it in the TableProxy argument.
When no more subtables are available, it returns False.
TableIterProxy& casacore::TableIterProxy::operator= | ( | const TableIterProxy & | ) |
Assignment (copy semantics).
void casacore::TableIterProxy::reset | ( | ) |
Reset the iterator (for Python use).
|
private |
Definition at line 147 of file TableIterProxy.h.
|
private |
Definition at line 146 of file TableIterProxy.h.
Referenced by isNull(), and iterator().