casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::TableIterProxy Class Reference

Proxy for table iterator access. More...

#include <TableIterProxy.h>

List of all members.

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 ()
TableIterProxyoperator= (const TableIterProxy &)
 Assignment (copy semantics).
Bool isNull () const
 Is the internal iterator object null?
const TableIteratoriterator () 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

Detailed Description

Proxy for table iterator access.

Intended use:

Public interface

Review Status

Reviewed By:
Paul Shannon
Date Reviewed:
1995/09/15
Test programs:
tgtable.g

Prerequisite

Etymology

TableIterProxy holds a TableIterator object for the table glish client.

Synopsis

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 .

Example

       // 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.


Constructor & Destructor Documentation

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.

Copy constructor (copy semantics).


Member Function Documentation

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]

Get the TableIterator object.

Definition at line 114 of file TableIterProxy.h.

References iter_p.

Iterate to the next part (for Python use).

An IterError exception is thrown at the end of the loop.

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).

Reset the iterator (for Python use).


Member Data Documentation

Definition at line 131 of file TableIterProxy.h.

Definition at line 130 of file TableIterProxy.h.

Referenced by isNull(), and iterator().


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