casa
$Rev:20696$
|
Proxy for table iterator access. More...
#include <TableIterProxy.h>
Public Member Functions | |
TableIterProxy () | |
Default constructor initializes to not open. | |
TableIterProxy (const TableProxy &tab, const Vector< String > &columns, const String &order, const String &sortType) | |
Construct for the given table column(s). | |
TableIterProxy (const TableIterProxy &) | |
Copy constructor (copy semantics). | |
~TableIterProxy () | |
TableIterProxy & | operator= (const TableIterProxy &) |
Assignment (copy semantics). | |
Bool | isNull () const |
Is the internal iterator object null? | |
const TableIterator & | iterator () const |
Get the TableIterator object. | |
Bool | nextPart (TableProxy &table) |
Get the next subtable and return it in the TableProxy argument. | |
TableProxy | next () |
Iterate to the next part (for Python use). | |
void | reset () |
Reset the iterator (for Python use). | |
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 .
// Get a table proxy. TableProxy proxy("sometable"); Vector<String> columns(1, "SOMECOL"); TableIterProxy tgi (proxy, columns, "a", "q"); TableProxy subTable; // Iterate through the table. while (tgi.next (subTable)) { ..use Table object subTable.table() }
Definition at line 85 of file TableIterProxy.h.
Default constructor initializes to not open.
This constructor is only needed for the Block container.
casa::TableIterProxy::TableIterProxy | ( | const TableProxy & | tab, |
const Vector< String > & | columns, | ||
const String & | order, | ||
const String & | sortType | ||
) |
Construct 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, otherwise heapsort.
casa::TableIterProxy::TableIterProxy | ( | const TableIterProxy & | ) |
Copy constructor (copy semantics).
Bool casa::TableIterProxy::isNull | ( | ) | const [inline] |
Is the internal iterator object null?
Definition at line 110 of file TableIterProxy.h.
References casa::TableIterator::isNull(), and iter_p.
const TableIterator& casa::TableIterProxy::iterator | ( | ) | const [inline] |
Bool casa::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& casa::TableIterProxy::operator= | ( | const TableIterProxy & | ) |
Assignment (copy semantics).
void casa::TableIterProxy::reset | ( | ) |
Reset the iterator (for Python use).
Bool casa::TableIterProxy::firstTime_p [private] |
Definition at line 131 of file TableIterProxy.h.
TableIterator casa::TableIterProxy::iter_p [private] |
Definition at line 130 of file TableIterProxy.h.
Referenced by isNull(), and iterator().