Produced by IDL 7.1.1
Developer Documentation

./toolbox/io
rows_index_section__define.pro

INDEX_FILE_SECTION
|
+-rows_index_section

All known superclasses:
INDEX_FILE_SECTION
Last modification date:
Wed Sep 28 13:27:14 2016

This virtual class extends the index_file_section class, but is extended by the line_index_section and cntm_index_section to manage the rows section of spectral line index files and continuum index files, respectively.

Fields Summary
ROWS
pointer
pointer to array of structures mirroring index rows section
FRMT
pointer
pointer to 3xN array of formats for printing rows section
FRMT_QUIET
pointer
pointer to array of integers determining which columns are used for 'quiet' listing
FRMT_USER
pointer
pointer to array of integers determining which columns are used for 'user' listing
PARAM_TYPES
pointer
pointer to 2 by N array of param names and syntax types
FLOAT_FORMAT
string
string representing how all floats are to be printed
FORMAT_STRING
string
string used for reading index lines into row structures. determined by frmt array
FORMAT_HEADER
string
top row to be printed in listings
INDEX_HEADER
integer
integer for accessing the format for the column header in the index file
LIST_HEADER
integer
integer for accessing the format for the column header for listings
COLUMN_NAME
integer
integer for accessing the column name to be printed
INDEX_VALUE
integer
integer for accessing the format for the column value in the index file
LIST_VALUE
integer
integer for accessing the format for the column value in a listing
COLUMN_TYPE
integer
integer for accessing the column syntax type
MORE_FORMAT
integer
boolean: wether or not to use 'more' format listing style
TMP_ROW
pointer
.
TMP_LINES
pointer
.
NUM_TMP_LINES
longword integer
.
MAX_TMP_LINES
longword integer
.

Fields inherited from INDEX_FILE_SECTION:
longword integer  LINES_INCR
longword integer  MAX_LINE_WIDTH
longword integer  NUM_LINES
string  FILENAME
string  SECTION_MARKER
pointer  LINE_NUMS
pointer  ALL_LINES
longword integer  SECTION_READ
longword integer  ALLOW_APPEND
longword integer  PAD_WIDTH
longword integer  DEBUG

Routine Summary  42 routines

procedure rows_index_section__define

This virtual class extends the index_file_section class, but is extended by the line_index_section and cntm_index_section to manage the rows section of spectral line index files and continuum index files, respectively.

function ROWS_INDEX_SECTION::init(filename)

private

Class Constructor

procedure ROWS_INDEX_SECTION::cleanup

private

Class Destructor

procedure ROWS_INDEX_SECTION::create

Creates rows section, but writes no actual rows to it, just the section marker, and the format_header ("#INDEX FILES etc.

function ROWS_INDEX_SECTION::get_rows_ptr()

Retrieves the pointer to the array of structures that mirror the lines in the row section.

function ROWS_INDEX_SECTION::get_num_rows()

Retrieves the number of rows in the rows section, not counting the marker and the format header

procedure ROWS_INDEX_SECTION::process_line, line, index

Procedure to process each line.

function ROWS_INDEX_SECTION::read_file([max_nrows=long])

Reads the rows section into memory, then converts all lines (array of strings) into row structures

procedure ROWS_INDEX_SECTION::create_formats, idField, idStart, idLen

private

Uses format array to create format strings for printing/reading index file.

function ROWS_INDEX_SECTION::get_param_types()

private

Returns the 2-N array of parameter names and their syntax types

procedure ROWS_INDEX_SECTION::list, [rows=array], [/verbose], [columns=array], [/user], [file=string]

Prints the rows section of the index file for those rows specified.

procedure ROWS_INDEX_SECTION::list_columns_by_name, column_names, [rows=array], [file=string]

Lists only those rows and column names passed to it.

procedure ROWS_INDEX_SECTION::list_columns_by_user, [rows=array], [file=string]

Lists only those columns previously set by user, using set_user_columns.

procedure ROWS_INDEX_SECTION::list_all_columns, [rows=array], [file=string]

Lists ALL the columns.

procedure ROWS_INDEX_SECTION::list_quiet, [rows=array], [file=string]

Lists only a handfull of statically determined columns.

function ROWS_INDEX_SECTION::get_frmt_index(frmt_header)

private

Returns index of format specification according to header name

function ROWS_INDEX_SECTION::get_frmt_header_keyword(frmt_header)

private

Uses the objects format array to build a string for one formated header word

function ROWS_INDEX_SECTION::get_frmt_row_value(frmt_header, row)

private

Uses the objects format array to build a formated string of a value from the index file

procedure ROWS_INDEX_SECTION::write_rows, row_strcts

private

Writes the information in rows_structs to the index file using the current self.

function ROWS_INDEX_SECTION::get_line_number(index_num[, row_index])

Retrieves the line number in the file of a row with the given index number

procedure ROWS_INDEX_SECTION::overwrite_row, index_num, row

Overwrites a row in the index with a new one

procedure ROWS_INDEX_SECTION::overwrite_row_column, index_num, column_name, value

Overwirtes a specific value in a row within the index file

procedure ROWS_INDEX_SECTION::set_more_format_on

Sets the object to print rows using the interactive 'more' format

procedure ROWS_INDEX_SECTION::set_more_format_off

Sets the object NOT to print rows using the interactive 'more' format

procedure ROWS_INDEX_SECTION::print_line, line, lun, _EXTRA=_EXTRA

Prints a line either to stdout, or using the interactive 'more' format The choice to use more or not is now handled elsewhere.

procedure ROWS_INDEX_SECTION::list_available_columns

Prints the available columns for list; these are also the valid search keywords

procedure ROWS_INDEX_SECTION::list_user_columns

Prints the columns currently selected for the user specified listing

function ROWS_INDEX_SECTION::get_format_keywords()

Extracts just the keywords from the format array

function ROWS_INDEX_SECTION::get_format_index(keyword)

Find the index for a keyword in the format array @ returns the index for the given keyword; -1 if not found

procedure ROWS_INDEX_SECTION::add_user_column, column

Adds a column to the list of user columns

procedure ROWS_INDEX_SECTION::set_user_columns, columns

Sets what columns should be used for user listing

function ROWS_INDEX_SECTION::get_available_columns()

Returns the available columns for list; these are also the valid search keywords

procedure ROWS_INDEX_SECTION::read_new_rows[, num_new_lines], [max_nrows=long]

For reading into memory the new rows that may have been written to the index file ( by hand, or by an online process ).

procedure ROWS_INDEX_SECTION::list_columns_by_index, col_indicies, [rows=array], [file=string]

General method for listing columns based off the indicies passed to it.

function ROWS_INDEX_SECTION::get_formatted_values(value, frmt)

Returns a string representation of the value passed in, using the passed in format If the given format is not recognized as a special formatting function, then it is assumed it is simply an IDL format string

function ROWS_INDEX_SECTION::format_source_name(source)

function ROWS_INDEX_SECTION::format_file_name(filename)

function ROWS_INDEX_SECTION::format_sexigesimal(value)

function ROWS_INDEX_SECTION::format_sexigesimal_ra(value)

function ROWS_INDEX_SECTION::format_sexigesimal_degrees(value)

function ROWS_INDEX_SECTION::format_dateobs(value)

function ROWS_INDEX_SECTION::get_format_string()

Routine Details

rows_index_section__define

procedure rows_index_section__define

This virtual class extends the index_file_section class, but is extended by the line_index_section and cntm_index_section to manage the rows section of spectral line index files and continuum index files, respectively.

Inherits
index_file_section

ROWS_INDEX_SECTION::init private

function ROWS_INDEX_SECTION::init(filename)

Class Constructor

Parameters
filename
.

ROWS_INDEX_SECTION::cleanup private

procedure ROWS_INDEX_SECTION::cleanup

Class Destructor

ROWS_INDEX_SECTION::create

procedure ROWS_INDEX_SECTION::create

Creates rows section, but writes no actual rows to it, just the section marker, and the format_header ("#INDEX FILES etc..").

ROWS_INDEX_SECTION::get_rows_ptr

function ROWS_INDEX_SECTION::get_rows_ptr()

Retrieves the pointer to the array of structures that mirror the lines in the row section. Be sure to NOT delete this pointer.

Returns
pointer to array of structures that mirror the lines in the row section.

ROWS_INDEX_SECTION::get_num_rows

function ROWS_INDEX_SECTION::get_num_rows()

Retrieves the number of rows in the rows section, not counting the marker and the format header

Returns
number of rows in the rows section

ROWS_INDEX_SECTION::process_line

procedure ROWS_INDEX_SECTION::process_line, line, index

Procedure to process each line. Invoked by index_file_section::read_file.

Parameters
line
in, required
string
The line to handle.
index
in, required
integer
The index number for this line - ignored here because of underlying assumptions.

ROWS_INDEX_SECTION::read_file

function ROWS_INDEX_SECTION::read_file([max_nrows=long])

Reads the rows section into memory, then converts all lines (array of strings) into row structures

Uses
INDEX_FILE_SECTION::read_file()

Keywords
max_nrows
in, optional
long
Maximum number of rows to read.

ROWS_INDEX_SECTION::create_formats private

procedure ROWS_INDEX_SECTION::create_formats, idField, idStart, idLen

Uses format array to create format strings for printing/reading index file. Results get stored in object fields: format_string, format_header For the named idField, return the start of that field in the format string and the length of that field in idStart and idLen.

Parameters
idField
.
idStart
.
idLen
.

ROWS_INDEX_SECTION::get_param_types private

function ROWS_INDEX_SECTION::get_param_types()

Returns the 2-N array of parameter names and their syntax types

ROWS_INDEX_SECTION::list

procedure ROWS_INDEX_SECTION::list, [rows=array], [/verbose], [columns=array], [/user], [file=string]

Prints the rows section of the index file for those rows specified. Columns keyword overrieds, verobse, and user. User keyword overrides verbose. If no keywords are set, the default mode is 'quiet', where just a handfull of columns are listed. The column names used with the columns keywords must be exact matches. Use list_available_columns to see what the choices are. To use the user keyword, first set the user colums using set_user_columns.

Keywords
rows
in, optional
array
the row numbers which are to be printed
verbose
in, optional
boolean
set to true and ALL info on each row is printed
columns
in, optional
array
array of column names to print (must contain exact matches)
user
in, optional
boolean
set to true and only the columns selected by user are listed
file
in, optional
string (def. /dev/tty)
The file to write to. Defaults to the current screen, using "more" to page the output.

ROWS_INDEX_SECTION::list_columns_by_name

procedure ROWS_INDEX_SECTION::list_columns_by_name, column_names, [rows=array], [file=string]

Lists only those rows and column names passed to it.

Parameters
column_names
in, required
array
array of column names to print (must contain exact matches)

Keywords
rows
in, optional
array
the row numbers which are to be printed
file
in, optional
string (def. /dev/tty)
The file to write to. Defaults to the current screen, using "more" to page the output.

ROWS_INDEX_SECTION::list_columns_by_user

procedure ROWS_INDEX_SECTION::list_columns_by_user, [rows=array], [file=string]

Lists only those columns previously set by user, using set_user_columns.

Keywords
rows
in, optional
array
the row numbers which are to be printed
file
in, optional
string (def. /dev/tty)
The file to write to. Defaults to the current screen, using "more" to page the output.

ROWS_INDEX_SECTION::list_all_columns

procedure ROWS_INDEX_SECTION::list_all_columns, [rows=array], [file=string]

Lists ALL the columns.

Keywords
rows
in, optional
array
the row numbers which are to be printed
file
in, optional
string (def. /dev/tty)
The file to write to. Defaults to the current screen, using "more" to page the output.

ROWS_INDEX_SECTION::list_quiet

procedure ROWS_INDEX_SECTION::list_quiet, [rows=array], [file=string]

Lists only a handfull of statically determined columns.

Keywords
rows
in, optional
array
the row numbers which are to be printed
file
in, optional
string (def. /dev/tty)
The file to write to. Defaults to the current screen, using "more" to page the output.

ROWS_INDEX_SECTION::get_frmt_index private

function ROWS_INDEX_SECTION::get_frmt_index(frmt_header)

Returns index of format specification according to header name

Parameters
frmt_header
in, required
string
header keyword: must match exactly with what list prints.

ROWS_INDEX_SECTION::get_frmt_header_keyword private

function ROWS_INDEX_SECTION::get_frmt_header_keyword(frmt_header)

Uses the objects format array to build a string for one formated header word

Parameters
frmt_header
in, required
string
header keyword: must match exactly with what list prints.

ROWS_INDEX_SECTION::get_frmt_row_value private

function ROWS_INDEX_SECTION::get_frmt_row_value(frmt_header, row)

Uses the objects format array to build a formated string of a value from the index file

Parameters
frmt_header
in, required
string
header keyword: must match exactly with what list prints.
row
in, required
struct
structure reflecting one row from the index file

ROWS_INDEX_SECTION::write_rows private

procedure ROWS_INDEX_SECTION::write_rows, row_strcts

Writes the information in rows_structs to the index file using the current self.format_string.

Parameters
row_strcts
in, required
struct array
the index values to write, in the same order as expected by the format string, one row_strcts element for each line to be written.

ROWS_INDEX_SECTION::get_line_number

function ROWS_INDEX_SECTION::get_line_number(index_num[, row_index])

Retrieves the line number in the file of a row with the given index number

Returns
the line number (zero based) in the file where this index number is located

Parameters
index_num
in, required
long
index number of row for which the line number is returned
row_index
out, optional
variable
the index into the array of lines this index number is found

ROWS_INDEX_SECTION::overwrite_row

procedure ROWS_INDEX_SECTION::overwrite_row, index_num, row

Overwrites a row in the index with a new one

Uses
get_line_number

Parameters
index_num
in, required
long
index number of row which is to be overwritten
row
in, required
struct
new row to write in index file at index_num

ROWS_INDEX_SECTION::overwrite_row_column

procedure ROWS_INDEX_SECTION::overwrite_row_column, index_num, column_name, value

Overwirtes a specific value in a row within the index file

Uses
overwrite_row

Parameters
index_num
in, required
long
index number of row which is to be overwritten
column_name
in, required
string
column in row which is to be overwritten
value
in, required
varies
value to place in row.

ROWS_INDEX_SECTION::set_more_format_on

procedure ROWS_INDEX_SECTION::set_more_format_on

Sets the object to print rows using the interactive 'more' format

ROWS_INDEX_SECTION::set_more_format_off

procedure ROWS_INDEX_SECTION::set_more_format_off

Sets the object NOT to print rows using the interactive 'more' format

ROWS_INDEX_SECTION::print_line

procedure ROWS_INDEX_SECTION::print_line, line, lun, _EXTRA=_EXTRA

Prints a line either to stdout, or using the interactive 'more' format The choice to use more or not is now handled elsewhere. If lun is not supplied, -1 is used (stdout).

Parameters
line
.
lun
.

Keywords
_EXTRA
.

ROWS_INDEX_SECTION::list_available_columns

procedure ROWS_INDEX_SECTION::list_available_columns

Prints the available columns for list; these are also the valid search keywords

ROWS_INDEX_SECTION::list_user_columns

procedure ROWS_INDEX_SECTION::list_user_columns

Prints the columns currently selected for the user specified listing

ROWS_INDEX_SECTION::get_format_keywords

function ROWS_INDEX_SECTION::get_format_keywords()

Extracts just the keywords from the format array

Returns
keywords from the format array

ROWS_INDEX_SECTION::get_format_index

function ROWS_INDEX_SECTION::get_format_index(keyword)

Find the index for a keyword in the format array @ returns the index for the given keyword; -1 if not found

Parameters
keyword
.

ROWS_INDEX_SECTION::add_user_column

procedure ROWS_INDEX_SECTION::add_user_column, column

Adds a column to the list of user columns

Parameters
column
.

ROWS_INDEX_SECTION::set_user_columns

procedure ROWS_INDEX_SECTION::set_user_columns, columns

Sets what columns should be used for user listing

Parameters
columns
in, required
string array
array of columns to print on list command

ROWS_INDEX_SECTION::get_available_columns

function ROWS_INDEX_SECTION::get_available_columns()

Returns the available columns for list; these are also the valid search keywords

ROWS_INDEX_SECTION::read_new_rows

procedure ROWS_INDEX_SECTION::read_new_rows[, num_new_lines], [max_nrows=long]

For reading into memory the new rows that may have been written to the index file ( by hand, or by an online process ). Jumps to previous last line, and reads new rows.

Parameters
num_new_lines
out, optional
variable
number of new lines found in file

Keywords
max_nrows
in, optional
long
maximum number of total lines when finished.

ROWS_INDEX_SECTION::list_columns_by_index

procedure ROWS_INDEX_SECTION::list_columns_by_index, col_indicies, [rows=array], [file=string]

General method for listing columns based off the indicies passed to it. Responsible for formatting each column according to the default or special formatting used.

Parameters
col_indicies
in, required
array
indicies of the columns to list

Keywords
rows
in, optional
array
the row numbers which are to be printed
file
in, optional
string (def. /dev/tty)
The file to write to. Defaults to the current screen, using "more" to page the output.

ROWS_INDEX_SECTION::get_formatted_values

function ROWS_INDEX_SECTION::get_formatted_values(value, frmt)

Returns a string representation of the value passed in, using the passed in format If the given format is not recognized as a special formatting function, then it is assumed it is simply an IDL format string

Returns
string representing the formatted value

Parameters
value
in, required
any
value to be returned as a formated string
frmt
in, required
string
format to be used on value -either a function name or an IDL format string

ROWS_INDEX_SECTION::format_source_name

function ROWS_INDEX_SECTION::format_source_name(source)

Parameters
source
.

ROWS_INDEX_SECTION::format_file_name

function ROWS_INDEX_SECTION::format_file_name(filename)

Parameters
filename
.

ROWS_INDEX_SECTION::format_sexigesimal

function ROWS_INDEX_SECTION::format_sexigesimal(value)

Parameters
value
.

ROWS_INDEX_SECTION::format_sexigesimal_ra

function ROWS_INDEX_SECTION::format_sexigesimal_ra(value)

Parameters
value
.

ROWS_INDEX_SECTION::format_sexigesimal_degrees

function ROWS_INDEX_SECTION::format_sexigesimal_degrees(value)

Parameters
value
.

ROWS_INDEX_SECTION::format_dateobs

function ROWS_INDEX_SECTION::format_dateobs(value)

Parameters
value
.

ROWS_INDEX_SECTION::get_format_string

function ROWS_INDEX_SECTION::get_format_string()


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