Produced by IDL 6.1
Developer Documentation

./toolbox/io
header_index_section__define.pro

INDEX_FILE_SECTION
|
+-header_index_section

All known superclasses:
INDEX_FILE_SECTION
Last modification date:
Thu Jun 2 23:56:08 2005

This extends the index_file_section class to properly handle the header section of an index file. The added basic functionality is to treat the header section like a dictionary, that is, a list of keyword-value pairs. See UML for all IO Classes

Fields Summary
HEADER
object reference
a key_value_parser object for converting the lines in the section to a structure

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

Routine Summary  9 routines

procedure header_index_section__define

This extends the index_file_section class to properly handle the header section of an index file.

function HEADER_INDEX_SECTION::init(lun, filename)

private

Class Constructor

procedure HEADER_INDEX_SECTION::cleanup

private

Class Destructor

procedure HEADER_INDEX_SECTION::create, hdr_lines[, start_line_number]

Creates the header section, given the strings to place there.

function HEADER_INDEX_SECTION::read_file()

Reads the header section of an index file.

function HEADER_INDEX_SECTION::get_value(keyword)

Retrieves the value for a header keyword.

function HEADER_INDEX_SECTION::get_line_number(keyword)

private

Retrieves the position in the file of the header keyword supplied

function HEADER_INDEX_SECTION::set_value(keyword, value)

Sets the value for the keyword in the file header

procedure HEADER_INDEX_SECTION::list

Prints out the contents of the header (in it's structure form)

Routine Details

header_index_section__define

procedure header_index_section__define

This extends the index_file_section class to properly handle the header section of an index file. The added basic functionality is to treat the header section like a dictionary, that is, a list of keyword-value pairs. See UML for all IO Classes

Inherits
index_file_section

HEADER_INDEX_SECTION::init private

function HEADER_INDEX_SECTION::init(lun, filename)

Class Constructor

Parameters
lun
.
filename
.

HEADER_INDEX_SECTION::cleanup private

procedure HEADER_INDEX_SECTION::cleanup

Class Destructor

HEADER_INDEX_SECTION::create

procedure HEADER_INDEX_SECTION::create, hdr_lines[, start_line_number]

Creates the header section, given the strings to place there.

Parameters
hdr_lines
in, required
string array
lines to be placed in header section; must be of form 'keyword = value' for each line.
start_line_number
in, optional
long
line to start at, defaults to zero

HEADER_INDEX_SECTION::read_file

function HEADER_INDEX_SECTION::read_file()

Reads the header section of an index file. After reading in the lines, creates a key_value_parser object to manage them.

HEADER_INDEX_SECTION::get_value

function HEADER_INDEX_SECTION::get_value(keyword)

Retrieves the value for a header keyword.

Returns
string value of keyword passed in. -1 if keyword is not found.

Parameters
keyword
in, required
string
keyword whose value is returned

HEADER_INDEX_SECTION::get_line_number private

function HEADER_INDEX_SECTION::get_line_number(keyword)

Retrieves the position in the file of the header keyword supplied

Returns
position in the file of the header keyword supplied

Parameters
keyword
in, required
string
keyword whose position is returned

HEADER_INDEX_SECTION::set_value

function HEADER_INDEX_SECTION::set_value(keyword, value)

Sets the value for the keyword in the file header

Returns
0 - failure, 1 - success
Uses
get_line_number header->set_key_value

Parameters
keyword
in, required
string
keyword whose value is set
value
in, required
string
value to set for keyword

HEADER_INDEX_SECTION::list

procedure HEADER_INDEX_SECTION::list

Prints out the contents of the header (in it's structure form)

Uses
header->list


Produced by IDLdoc 1.6 on Thu Jun 2 23:56:25 2005