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

Vlone/vflone

int32 Vlone(int32 file_id, int32 ref_array[], int32 maxsize)
file_id

IN:

File identifier returned by Hopen

ref_array

OUT:

Buffer for the reference numbers of the lone vgroups

maxsize

IN:

Maximum number of vgroups to store in ref_array

Purpose

Returns an array of reference numbers for all vgroups that are not linked to any vgroup in the HDF file.

Return value

Returns the total number of lone vgroups in a file if successful and FAIL (or -1) otherwise.

Description

This routine is provided for applications to locate all lone vgroups (i.e., those that are not grouped with other objects) in a HDF file. Another use is to locate all vgroups at the top of the grouping hierarchy.

The parameter maxsize specifies the maximum number of reference numbers to be returned. The reference numbers will be returned in the array ref_array[]. The array must be at least maxsize elements in size.

The return value from this function will be the total number of vgroups that are not linked to any vgroup in the file, but at most maxsize reference numbers will be returned in ref_array.

An array size of 65,000 integers for ref_array is more than adequate. The preferred method is to use dynamic memory instead; first call Vlone with a value of 0 for maxsize, and then use the returned value to allocate memory for ref_array before calling Vlone.

Example

The sample code illustrates the preferred method of using Vlone. The second call to Vlone returns the target reference numbers.

     int32 file_id;  /* id of opened HDF file */
     int32 maxsize,  status;
     int32 *ref_array;

     maxsize = Vlone(file_id, NULL, 0);
     ref_array  = (int32*) malloc(sizeof(int32)*maxsize);
     status   = Vlone(file_id, ref_array, maxsize); 
FORTRAN

integer function vflone(file_id, ref_array, maxsize)

integer file_id, ref_array(*), maxsize



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

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