Produced by IDL 7.1.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:
Wed Sep 28 13:27:14 2016

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
LINES
pointer
.

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  11 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(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.

procedure HEADER_INDEX_SECTION::process_line, line, index

Procedure to process each line.

function HEADER_INDEX_SECTION::read_file()

Reads the header section of an index file.

function HEADER_INDEX_SECTION::get_lines([count])

Retrieves array of lines in section; commented out lines are not included

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(filename)

Class Constructor

Parameters
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::process_line

procedure HEADER_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

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_lines

function HEADER_INDEX_SECTION::get_lines([count])

Retrieves array of lines in section; commented out lines are not included

Returns
array of lines in section, -1 if no lines

Parameters
count
out, optional
variable
number of lines returned

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 Wed Sep 28 13:27:26 2016