[Top] [Prev] [Next] [Bottom]

ANnumann/afnumann

intn ANnumann(int32 an_id, int32 annot_type, uint16 obj_tag, uint16 obj_ref)
an_id

IN:

Multifile annotation interface identifier returned by ANstart

annot_type

IN:

Target annotation type

obj_tag

IN:

Tag of the object the target annotation is attached to

obj_ref

IN:

Reference number of the object the target annotation is attached to

Purpose

Returns the total number of annotations in the file that correspond to the annotation type specified by annot_type, the tag specified by obj_tag and the reference number specified by obj_ref.

Return value

Returns the number of qualifying annotations or FAIL (or -1) otherwise.

Description

The annotations referred to by the return value of ANnumann can be labels and/or descriptions. The return value is often used in conjunction with HDmalloc or malloc to specify the size of a buffer that will be used to store information about the target annotations, or in conjunction with ANannlist.

Valid values for the annot_type parameter are:

AN_DATA_LABEL - for data labels

AN_DATA_DESC - for data descriptions

Note that only data labels and data descriptions (identified by the AN_DATA_LABEL and AN_DATA_DESC definitions) are supported by ANnumann. Use ANfileinfo to set file labels and file descriptions.

Example

This example illustrates the use of ANnumann in returning the number of annotations attached to the second number data group object in the file:

	#include "hdf.h"

	int32 an_id, ann_id, file_id, stat;
	ann_type annot_type = AN_DATA_LABEL;
	uint16 obj_tag = DFTAG_NDG;
	uint16 obj_ref = 2;
	int num_ann;

	file_id = Hopen("myfile", DFACC_READ, 0);
	an_id = ANstart(file_id);
	num_ann = ANnumann(an_id, annot_type, obj_tag, obj_ref);
	       ...
	stat = ANend(an_id);
	Hclose(file_id); 
FORTRAN

integer function afnumann(an_id, annot_type, obj_tag, obj_ref)

integer an_id, obj_tag, obj_ref, annot_type



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.