Produced by IDL 7.1.1
User Documentation

./toolbox/io
flag_file__define.pro

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

Routine Summary  40 routines

procedure flag_file__define

FLAG_FILE is the class for managing a single flag file.

function FLAG_FILE::init([file_name=string], [file_path=string], [debug=bool])

Class Constructor - flags and constants set here.

function FLAG_FILE::get_param_types()

Retrieves the array that specifies the types allowable for each column of the flag file

procedure FLAG_FILE::set_file_name, file_name

Sets file name of index file

procedure FLAG_FILE::reset

Sets up object to read/create new index file

procedure FLAG_FILE::set_file_path, file_path

Sets path to index file

function FLAG_FILE::get_file_name()

Retrieves file name of index file

function FLAG_FILE::is_file_loaded()

Finds if object contains index file's contents in memory Also checks to make sure that the file info on disk matches that in memory.

procedure FLAG_FILE::set_version, version

Sets version number of I/O modules

function FLAG_FILE::get_version()

Retrieves the version number of the I/O module using this object

procedure FLAG_FILE::new_file, [file_name=string]

Creates a new flag file.

function FLAG_FILE::create_header()

Returns a string array, where each element will be a line in the flag file header.

procedure FLAG_FILE::set_flag, scan, _EXTRA=_EXTRA

Along with set_flag_rec, sets a line in the flag file representing a flagging rule.

procedure FLAG_FILE::set_flag_rec, recnum, _EXTRA=_EXTRA

Along with set_flag, sets a line in the flag file representing a flagging rule.

procedure FLAG_FILE::read_file, ver_status, [file_name=string]

Loads the contents of a flag file into memory Initializes the objects resposible for managing each section of the flag file.

function FLAG_FILE::get_old_flags_class(file_version[, status])

Returns the name of the class to use for managing a flag format, given the formats version number

procedure FLAG_FILE::convert_old_flag_file, old_flags_class, status

Reads in the contents of the current flag file, given the name of the class to do this with, and then rewrites the flag file using the current format.

procedure FLAG_FILE::list, _EXTRA=_EXTRA

Prints out contents of flag file.

procedure FLAG_FILE::list_ids

Prints out unique idstrings of flag file.

procedure FLAG_FILE::unflag, id

Comments out a line in the flagging file, given either the ID or IDSTRING of the flag to unflag.

function FLAG_FILE::get_lines_and_line_nums([status], _EXTRA=_EXTRA)

Returns the lines and their locations in the flag file

function FLAG_FILE::get_line_nums(count)

Call to the row object's method of the same name

function FLAG_FILE::get_lines(status, _EXTRA=_EXTRA)

Call to the row object's method of the same name

function FLAG_FILE::get_row_strcts(status, indicies, _EXTRA=_EXTRA)

Call to the row object's method of the same name

function FLAG_FILE::get_unique_ids(count)

Call to the row object's method of the same name

function FLAG_FILE::get_formatted_header()

Call to the row object's method of the same name

function FLAG_FILE::get_verbose_header()

Call to the row object's method of the same name

function FLAG_FILE::get_values_list_format()

Call to the row object's method of the same name

function FLAG_FILE::get_deliminator()

Call to the row object's method of the same name

function FLAG_FILE::get_not_applicable_symbol()

Call to the row object's method of the same name

function FLAG_FILE::search_flags(status, _EXTRA=_EXTRA)

Call to the row object's method of the same name

procedure FLAG_FILE::set_debug_on

Makes this object and child objects verbose

procedure FLAG_FILE::set_debug_off

Makes this object and child objects quiet

function FLAG_FILE::has_valid_rows()

Is the row object valid?

function FLAG_FILE::get_num_lines()

Call to the row object's method of the same name

procedure FLAG_FILE::set_index_value_recnums, recnums

Call to the row object's method of the same name

procedure FLAG_FILE::reset_index_value_recnums

Call to the row object's method of the same name

procedure FLAG_FILE::append_index_value_recnums, recnums

Call to the row object's method of the same name

function FLAG_FILE::get_index_value_recnums(status)

Call to the row object's method of the same name

procedure FLAG_FILE::show_state

Routine Details

flag_file__define

procedure flag_file__define

FLAG_FILE is the class for managing a single flag file. Its main components are objects for managing the files header and flags sections. See UML fro all IO Classes.

FLAG_FILE::init

function FLAG_FILE::init([file_name=string], [file_path=string], [debug=bool])

Class Constructor - flags and constants set here.

Keywords
file_name
in, optional
string
file name of index file
file_path
in, optional
string
directory where file is located
debug
in, optional
bool
object is verbose or quiet

FLAG_FILE::get_param_types

function FLAG_FILE::get_param_types()

Retrieves the array that specifies the types allowable for each column of the flag file

Returns
a string array of column names and types

FLAG_FILE::set_file_name

procedure FLAG_FILE::set_file_name, file_name

Sets file name of index file

Parameters
file_name
in
string
name of index file

FLAG_FILE::reset

procedure FLAG_FILE::reset

Sets up object to read/create new index file

FLAG_FILE::set_file_path

procedure FLAG_FILE::set_file_path, file_path

Sets path to index file

Parameters
file_path
in
string
path to index file

FLAG_FILE::get_file_name

function FLAG_FILE::get_file_name()

Retrieves file name of index file

Returns
file name of index file

FLAG_FILE::is_file_loaded

function FLAG_FILE::is_file_loaded()

Finds if object contains index file's contents in memory Also checks to make sure that the file info on disk matches that in memory. If that does not match, this function returns 0 (not loaded).

Returns
0,1

FLAG_FILE::set_version

procedure FLAG_FILE::set_version, version

Sets version number of I/O modules

Parameters
version
in
string
version number

FLAG_FILE::get_version

function FLAG_FILE::get_version()

Retrieves the version number of the I/O module using this object

Returns
version number (string)

FLAG_FILE::new_file

procedure FLAG_FILE::new_file, [file_name=string]

Creates a new flag file. Only writes the header section, flags section marker and header.

Keywords
file_name
in, optional
string
base file name of new flag file

FLAG_FILE::create_header

function FLAG_FILE::create_header()

Returns a string array, where each element will be a line in the flag file header. The most important line here is the version key/value pair.

Returns
a string array representing the flag file header

FLAG_FILE::set_flag

procedure FLAG_FILE::set_flag, scan, _EXTRA=_EXTRA

Along with set_flag_rec, sets a line in the flag file representing a flagging rule. The input here is a scan number, and optional arguments that are determined by the current flagging format being used. If the flag file does not yet exist, it is created here. The input arguments are used to construct a string, and this string is appended to the flag file.

Parameters
scan
in, required
long
scan nubmer to flag

Keywords
_EXTRA
.

FLAG_FILE::set_flag_rec

procedure FLAG_FILE::set_flag_rec, recnum, _EXTRA=_EXTRA

Along with set_flag, sets a line in the flag file representing a flagging rule. The input here is a single or array of record number, and optional arguments that are determined by the current flagging format being used. If the flag file does not yet exist, it is created here. The input arguments are used to construct a string, and this string is appended to the flag file.

Parameters
recnum
in, required
long
record nubmer to flag

Keywords
_EXTRA
.

FLAG_FILE::read_file

procedure FLAG_FILE::read_file, ver_status, [file_name=string]

Loads the contents of a flag file into memory Initializes the objects resposible for managing each section of the flag file. If an old format is encountered, then this flag is converted to the current format, with a backup of the original file saved off.

Parameters
ver_status
.

Keywords
file_name
in, optional
string
base file name of the flag file

FLAG_FILE::get_old_flags_class

function FLAG_FILE::get_old_flags_class(file_version[, status])

Returns the name of the class to use for managing a flag format, given the formats version number

Returns
the name of the class to use to read this old flag format

Parameters
file_version
in, required
string
the value found in the flag file's version tag
status
out, optional
variable
1 - class name found, 0 - not found

FLAG_FILE::convert_old_flag_file

procedure FLAG_FILE::convert_old_flag_file, old_flags_class, status

Reads in the contents of the current flag file, given the name of the class to do this with, and then rewrites the flag file using the current format.

Parameters
old_flags_class
in, required
string
class to use to read original file
status
.

FLAG_FILE::list

procedure FLAG_FILE::list, _EXTRA=_EXTRA

Prints out contents of flag file. For testing purposes only.

Keywords
_EXTRA
.

FLAG_FILE::list_ids

procedure FLAG_FILE::list_ids

Prints out unique idstrings of flag file. For testing purposes only.

FLAG_FILE::unflag

procedure FLAG_FILE::unflag, id

Comments out a line in the flagging file, given either the ID or IDSTRING of the flag to unflag.

Parameters
id
in, required
string,long
if string, this is the IDSTRING to unflag, if long, the ID

FLAG_FILE::get_lines_and_line_nums

function FLAG_FILE::get_lines_and_line_nums([status], _EXTRA=_EXTRA)

Returns the lines and their locations in the flag file

Returns
a 2-D string array of lines and their locations in the flag file

Parameters
status
out, optional
variable
0 - failure, 1 - success

Keywords
_EXTRA
.

FLAG_FILE::get_line_nums

function FLAG_FILE::get_line_nums(count)

Call to the row object's method of the same name

Parameters
count
.

FLAG_FILE::get_lines

function FLAG_FILE::get_lines(status, _EXTRA=_EXTRA)

Call to the row object's method of the same name

Parameters
status
.

Keywords
_EXTRA
.

FLAG_FILE::get_row_strcts

function FLAG_FILE::get_row_strcts(status, indicies, _EXTRA=_EXTRA)

Call to the row object's method of the same name

Parameters
status
.
indicies
.

Keywords
_EXTRA
.

FLAG_FILE::get_unique_ids

function FLAG_FILE::get_unique_ids(count)

Call to the row object's method of the same name

Parameters
count
.

FLAG_FILE::get_formatted_header

function FLAG_FILE::get_formatted_header()

Call to the row object's method of the same name

FLAG_FILE::get_verbose_header

function FLAG_FILE::get_verbose_header()

Call to the row object's method of the same name

FLAG_FILE::get_values_list_format

function FLAG_FILE::get_values_list_format()

Call to the row object's method of the same name

FLAG_FILE::get_deliminator

function FLAG_FILE::get_deliminator()

Call to the row object's method of the same name

FLAG_FILE::get_not_applicable_symbol

function FLAG_FILE::get_not_applicable_symbol()

Call to the row object's method of the same name

FLAG_FILE::search_flags

function FLAG_FILE::search_flags(status, _EXTRA=_EXTRA)

Call to the row object's method of the same name

Parameters
status
.

Keywords
_EXTRA
.

FLAG_FILE::set_debug_on

procedure FLAG_FILE::set_debug_on

Makes this object and child objects verbose

FLAG_FILE::set_debug_off

procedure FLAG_FILE::set_debug_off

Makes this object and child objects quiet

FLAG_FILE::has_valid_rows

function FLAG_FILE::has_valid_rows()

Is the row object valid?

Returns
0 - object not valid, 1 - object valid

FLAG_FILE::get_num_lines

function FLAG_FILE::get_num_lines()

Call to the row object's method of the same name

FLAG_FILE::set_index_value_recnums

procedure FLAG_FILE::set_index_value_recnums, recnums

Call to the row object's method of the same name

Parameters
recnums
.

FLAG_FILE::reset_index_value_recnums

procedure FLAG_FILE::reset_index_value_recnums

Call to the row object's method of the same name

FLAG_FILE::append_index_value_recnums

procedure FLAG_FILE::append_index_value_recnums, recnums

Call to the row object's method of the same name

Parameters
recnums
.

FLAG_FILE::get_index_value_recnums

function FLAG_FILE::get_index_value_recnums(status)

Call to the row object's method of the same name

Parameters
status
.

FLAG_FILE::show_state

procedure FLAG_FILE::show_state


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