|
Developer Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox/io rows_index_section__define.pro
INDEX_FILE_SECTION | +-rows_index_section
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 to array of structures mirroring index rows section |
FRMT |
pointer to 3xN array of formats for printing rows section |
FRMT_QUIET |
pointer to array of integers determining which columns are used for 'quiet' listing |
FRMT_USER |
pointer to array of integers determining which columns are used for 'user' listing |
PARAM_TYPES |
pointer to 2 by N array of param names and syntax types |
FLOAT_FORMAT |
string representing how all floats are to be printed |
FORMAT_STRING |
string used for reading index lines into row structures. determined by frmt array |
FORMAT_HEADER |
top row to be printed in listings |
INDEX_HEADER |
integer for accessing the format for the column header in the index file |
LIST_HEADER |
integer for accessing the format for the column header for listings |
COLUMN_NAME |
integer for accessing the column name to be printed |
INDEX_VALUE |
integer for accessing the format for the column value in the index file |
LIST_VALUE |
integer for accessing the format for the column value in a listing |
COLUMN_TYPE |
integer for accessing the column syntax type |
MORE_FORMAT |
boolean: wether or not to use 'more' format listing style |
TMP_ROW |
. |
TMP_LINES |
. |
NUM_TMP_LINES |
. |
MAX_TMP_LINES |
. |
Fields inherited from INDEX_FILE_SECTION: | ||||||||||||||||||||||
|
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. |
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.
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.
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
ROWS_INDEX_SECTION::process_line |
Procedure to process each line. Invoked by index_file_section::read_file.
Parameters | |
line |
The line to handle. |
index |
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
Keywords | |
max_nrows |
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.
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 |
array of column names to print (must contain exact matches) |
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.
ROWS_INDEX_SECTION::list_all_columns |
procedure ROWS_INDEX_SECTION::list_all_columns, [rows=array], [file=string] |
Lists ALL the columns.
ROWS_INDEX_SECTION::list_quiet |
procedure ROWS_INDEX_SECTION::list_quiet, [rows=array], [file=string] |
Lists only a handfull of statically determined columns.
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 |
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 |
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 |
header keyword: must match exactly with what list prints. |
row |
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 |
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
Parameters | |
index_num |
index number of row for which the line number is returned |
row_index |
the index into the array of lines this index number is found |
ROWS_INDEX_SECTION::overwrite_row |
Overwrites a row in the index with a new one
Parameters | |
index_num |
index number of row which is to be overwritten |
row |
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
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
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 |
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 |
number of new lines found in file |
Keywords | |
max_nrows |
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 |
indicies of the columns to list |
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
Parameters | |
value |
value to be returned as a formated string |
frmt |
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() |