Reference

mfan(3hdf)

Multi-file Annotation Interface

NAME

ANstart, ANfileinfo, ANend, ANcreate, ANcreatef, ANselect, ANnumann, ANannlist, ANannlen, ANwriteann, ANreadann, ANendaccess - Multi-file Annotation Interface

SYNOPSIS

#include <mfan.h>

extern int32 ANstart(int32 file_id);

extern intn ANfileinfo
(

int32 an_id,

int32 *n_file_label,

int32 *n_file_desc,

int32 *n_obj_label,

int32 *n_obj_desc
);

extern int32 ANend(int32 an_id);

extern int32 ANcreate
(

int32 an_id,

uint16 elem_tag,

uint16 elem_ref,

ann_type type
);

extern int32 ANcreatef
(

int32 an_id,

ann_type type
);

extern int32 ANselect
(

int32 an_id,

int32 index,

ann_type type
);

extern intn ANnumann
(

int32 an_id,

ann_type type,

uint16 elem_tag,

uint16 elem_ref
);

extern intn ANannlist
(

int32 an_id,

ann_type type,

uint16 elem_tag,

uint16 elem_ref,

int32 ann_list[]
);

extern int32 ANannlen(int32 ann_id);

extern int32 ANwriteann
(

int32 ann_id,

char *ann,

int32 annlen
);

extern int32 ANreadann
(

int32 ann_id,

char *ann,

int32 maxlen
);

extern intn ANendaccess(int32 ann_id);

PARAMETERS

int32 file_id

IN: file to start annotation access on.

int32 an_id (ANfileinfo)

IN: annotation interface id.

int32 *n_file_label

OUT: the # of file labels.

int32 *n_file_desc

OUT: the # of file descriptions.

int32 *n_obj_label

OUT: the # of object labels.

int32 *n_obj_desc

OUT: the # of object descriptions.

int32 an_id (ANend)

IN: Annotation ID of file to close.

int32 an_id (ANcreate)

IN: annotation interface ID.

uint16 elem_tag (ANcreate)

IN: tag of item to be assigned annotation.

uint16 elem_ref (ANcreate)

IN: reference number of itme to be assigned ann.

ann_type type (ANcreate)

IN: annotation type.

Possible values for an ann_type are as follows:

AN_DATA_LABEL

Data label.

AN_DATA_DESC

Data description.

ann_type type (ANcreatef)

IN: annotation type.

Possible values for an ann_type are as follows:

AN_FILE_LABEL

File label.

AN_FILE_DESC

File description.

int32 index

IN: index of annottion to get ID for.

int32 an_id (ANnumann)

IN: annotation interface id.

uint16 elem_tag (ANnumann)

IN: tag of item of which this is annotation.

uint16 elem_ref (ANnumann)

IN: ref of item of which this is annotation.

int32 ann_list[]

OUT: array of ann_id's that match criteria.

int32 ann_id (ANannlen)

IN: annotation id.

char *ann (ANwriteann)

IN: annotation to write.

int32 annlen

IN: length of annotation.

int32 ann_id (ANreadann)

IN: annotation id (handle).

char *ann (ANreadann)

OUT: space to return annotation in.

int32 maxlen

IN: size of space to return annotation in.

DESCRIPTION

ANstart

Start annotation handling on the file return a annotation ID to the file.

ANfileinfo

Reports general information about the number of file and object(i.e. Data) annotations in the file. This routine is generally used to find the range of acceptable indices for ANselect calls.

ANend

End annotation access to file.

ANcreate

Creates a data annotation, returns an 'an_id' to work with the new annotation which can either be a label or description. Valid annotation types are AN_DATA_LABEL for data labels and AN_DATA_DESC for data descriptions.

ANcreatef

Creates a file annotation, returns an 'an_id' to work with the new file annotation which can either be a label or description. Valid annotation types are AN_FILE_LABEL for file labels and AN_FILE_DESC for file descritpions.

ANselect

Get an annotation Id from index of 'type'. The position index is ZERO based.

ANnumann

Find number of annotation of 'type' for the given element tag/ref pair.

ANannlist

Find and generate list of annotation ids of 'type' for the given element tag/ref pair.

ANannlen

Uses the annotation id to find ann_key & file_id.

ANwriteann

Checks for pre-existence of given annotation, replacing old one if it exists. Writes out annotation.

ANreadann

Gets tag and ref of annotation. Finds DD for that annotation. Reads the annotation, taking care of NULL terminator, if necessary.

ANendaccess

Terminates access to an annotation. For now does nothing.

RETURNS

ANstart

A file ID or FAIL.

ANfileinfo

Returns SUCCEED if successful and FAIL othewise.

ANend

SUCCEED if successful and FAIL otherwise.

ANcreate

An ID to an annotation which can either be a label or description.

ANcreatef

An ID to an annotation which can either be a file label or description.

ANselect

An ID to an annotation type which can either be a label or description.

ANnumann

Number of annotation found if successful and FAIL (-1) otherwise.

ANannlist

Number of annotations ids found if successful and FAIL (-1) otherwise.

ANannlen

Length of annotation if successful and FAIL (-1) otherwise.

ANwriteann

SUCCEED (0) if successful and FAIL (-1) otherwise.

ANreadann

SUCCEED (0) if successful and FAIL (-1) otherwise.

ANendaccess

SUCCEED or FAIL.

NAME

ANstart

ANstart - open file for annotation handling.

ANfileinfo

ANfileinfo - Report high-level information about the ANxxx interface for a given file.

ANend

ANend - End annotation access to file file.

ANcreate

ANcreate - create a new element annotation and return a handle(id).

ANcreatef

ANcreatef - create a new file annotation and return a handle(id).

ANselect

ANselect - get an annotation ID from index of 'type'.

ANnumann

ANnumann - find number of annotation of 'type' that match the given element tag/ref.

ANannlist

ANannlist - generate list of annotation ids of 'type' that match the given element tag/ref.

ANannlen

ANannlen - get length of annotation givne annotation id.

ANwriteann

ANwriteann - write annotation given ann_id.

ANreadann

ANreadann - read annotation given ann_id.

ANendaccess

ANendaccess - end access to an annotation given it's id.