1. Need to provide a flag to h4toh5open to control whether to clobber the output file (HDF5) or not.
Revised call (sample):
h45id = H4toh5open( char * h4file, char *h5file,
int access );
access: H45_CREATE=1, H45_OPEN=2, H45_CLOBBER=3
H45_CREATE: if the file exists, error. if the file doesn't exist,
create it.
H45_OPEN: if the file does not exist, error. If the file exists, open
for write.
H45_CLOBBER: if the file does not exist, create it. If the file exists,
delete it and create a new file.
2. Propose to add an alternative open which takes file descriptors rather than file names.
Purpose: for complex cases, it is easier for the calling program to set up the files and just pass in the open descriptor.
Example: the caller may want to use an HDF4 file that is already
open.
Example: the output HDF5 file needs to be created with certain file
creation properties.
Current API:
h45id = H4toh5open( char * h4file, char *h5file, int access );
Add new function:
h45id = H4toh5open_id( int h4fid, hid_t h5fid, int access );
The first function opens the input file for read and open or creates the output file with default settings. H4toh5close(h45id) closes the input and output file.
The second function does not open the files, but otherwise is the same. H4toh5close(h45id) does not close the file. (Is the 'access' flag needed?)
This feature requires changes to H4toh5close(), to either close or not close the file descriptors depending on which H4toh5open was called.
3. Add property lists to most API calls
Purpose: add a property list to allow new behavior to be added in the future wihtout changing the signature. There are no properties currently defined, so all plist are currently defaults.
Example: H4toh5open( char * h4file, char * h5file, int access, hid_t plistid);
To do: determine which API calls should have property lists
Function | Needs Properties? | Remarks |
H4toh5open | yes | |
H4toh5close | no | |
H4toh5basvgroup | ||
H4toh5advgroup | ||
H4toh5sds | ||
H4toh5image | ||
H4toh5vdata | ||
H4toh5pal | ||
H4toh5onedimscale | ||
H4toh5alldimscales | ||
H4toh5annofil_label | no | |
H4toh5annofil_desc | no | |
H4toh5annofil_alllabels | ||
H4toh5annofil_alldescs | ||
H4toh5annoobj_label | ||
H4toh5annoobj_desc | ||
H4toh5annoobj_alllabels | ||
H4toh5annoobj_alldescs | ||
H4toh5_glosdsattr | ||
H4toh5_gloimageattr | ||
H4toh5_Eget | no |