Produced by IDL 7.1.1
Developer Documentation

./toolbox/io
index_iterator__define.pro

Last modification date:
Wed Sep 28 13:27:14 2016

This iterator should work with the various types of indexes although it needs to be provided with the relevant rows base class so that the appropriate formating and location of the ID field can be known.

Fields Summary
LINE_BLOCK
pointer
a pointer to an array of lines in the current group
ROW_BLOCK
pointer
a pointer to an array of row structures that are filled from line_block right before row_block is returned.
BLOCK_SIZE
longword integer
the current number of elements in line_block and row_block.
FORMAT_STRING
string
the row format string used to read one line into one row structure.
IDSTART
longword integer
the location of the first character of the ID field.
IDLEN
longword integer
the number of characters (length) in the ID field.
NEXT_ID
string
the next ID field value, the group corresponding to this value is returned by next. Set to an empty string if there are no more groups (at end).
INDEXPATH
string
.
LUN
longword integer
.

Routine Summary  6 routines

procedure index_iterator__define

A class for iteratoring through an index file, in groups sharing a common ID (typically TIMESTAMP or SCAN) - one field in each line.

function INDEX_ITERATOR::init(indexPath, rows_base_class)

private

Class constructor

procedure INDEX_ITERATOR::cleanup

private

Class destructor

function INDEX_ITERATOR::next_id()

private

The value of the ID shared by the row group to be returned by the next call to next.

function INDEX_ITERATOR::next()

private

Returns an array of row structures corresponding to all of the rows sequential rows sharing the next_id value when this called.

function INDEX_ITERATOR::get_name()

Returns the path to the index file used at creation.

Routine Details

index_iterator__define

procedure index_iterator__define

A class for iteratoring through an index file, in groups sharing a common ID (typically TIMESTAMP or SCAN) - one field in each line. When that field value changes, the current grouping is ended an the next grouping begins.

INDEX_ITERATOR::init private

function INDEX_ITERATOR::init(indexPath, rows_base_class)

Class constructor

Parameters
indexPath
in, required
string
The full path to the index file.
rows_base_class
in, required
string
The class name to use when getting the row format string and the corresponding row structure, ID field start and ID field length.

INDEX_ITERATOR::cleanup private

procedure INDEX_ITERATOR::cleanup

Class destructor

INDEX_ITERATOR::next_id private

function INDEX_ITERATOR::next_id()

The value of the ID shared by the row group to be returned by the next call to next. This is the empty string if there are no more groups (at the end of the index).

Returns
id string, "" at end, no more groups

INDEX_ITERATOR::next private

function INDEX_ITERATOR::next()

Returns an array of row structures corresponding to all of the rows sequential rows sharing the next_id value when this called. next_id may repeat in a subsequent group, but not the next group. Returns -1 if there are no more rows (at end).

Returns
array of row stuctures or -1 if there are no more groups.

INDEX_ITERATOR::get_name

function INDEX_ITERATOR::get_name()

Returns the path to the index file used at creation.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:27 2016