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

Vgettagrefs/vfgttrs

int32 Vgettagrefs(int32 vgroup_id, int32 tag_array[], int32 ref_array[], int32 maxsize)
vgroup_id

IN:

Vgroup identifier returned by Vattach

tag_array

OUT:

Buffer for the returned tags

ref_array

OUT:

Buffer for the returned reference numbers

maxsize

IN:

Maximum number of tag/reference number pairs to store in tag_array and ref_array

Purpose

Returns the tag/reference number pairs of the HDF objects belonging to a given vgroup. Do not confuse this routine with Vgettagref.

Return value

Returns the number of tag/reference number pairs in a specified vgroup if successful and FAIL (or -1) otherwise.

Description

The input parameter maxsize specifies the maximum number of tag/reference number pairs to be returned. The tag/reference number pairs will be returned in arrays tag_array and ref_array. Each array must be at least maxsize in size.

Example

This sample code uses Vntagrefs to determine the number of tag/reference number pairs in a vgroup. It then allocates memory, and uses Vgettagrefs to extract the tag/reference number pair values.


     int32 vgroup_id;  /* pointer to an attached vgroup */
     int32 npairs, status;
     int32 *tags, *refs;

     npairs = Vntagrefs(vgroup_id);
     tags   = (int32*) malloc (sizeof(int32) * npairs);
     refs   = (int32*) malloc (sizeof(int32) * npairs);
     status = Vgettagrefs(vgroup_id, tags, refs, npairs); 
FORTRAN

integer function vfgttrs(vgroup_id, tag_array, ref_array, maxsize)

integer vgroup_id, maxsize

integer tag_array(*), ref_array(*)



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

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