TableIterProxy.h
Classes
- TableIterProxy -- Proxy for table iterator access. (full description)
Interface
- Public Members
- TableIterProxy()
- TableIterProxy (const TableProxy& tab, const Vector<String>& columns, const String& order, const String& sortType)
- TableIterProxy (const TableIterProxy&)
- ~TableIterProxy()
- TableIterProxy& operator= (const TableIterProxy&)
- Bool isNull() const
- const TableIterator& iterator() const
- Bool nextPart (TableProxy& table)
- TableProxy next()
- void reset()
Review Status
- Reviewed By:
- Paul Shannon
- Date Reviewed:
- 1995/09/15
- Programs:
- Tests:
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()
}
Member Description
Default constructor initializes to not open.
This constructor is only needed for the Block container.
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).
TableIterProxy& operator= (const TableIterProxy&)
Assignment (copy semantics).
Bool isNull() const
Is the internal iterator object null?
Get the TableIterator object.
Get the next subtable and return it in the TableProxy argument.
When no more subtables are available, it returns False.
Iterate to the next part (for Python use).
An IterError exception is thrown at the end of the loop.
Reset the iterator (for Python use).