The API for writing HDF4 files is identical to that used by the
IEEEIO interface except that the files
are opened using a different subroutine/class in order to
declare that the file is an HDF type. However, the same
subroutine/destructor can be used to close the file regardless
of what interface was used to open it. There are also some
HDF4-specific methods in the FlexIO-HDFIO API which give you
full access to HDF4/SDS-specific capabilities.
Opening Files using HDFIO
IObase *file = new HDFIO(char *filename,
IObase::AccessMode mode);
IOFile *file = HDFIOopen(char
*filename,char *accessmode);
INTEGER*8 file = hdf_open(character
filename(*),character accessmode(*))
isCoordVar() and
getCoord(). This is only for situations where the
dimscales must be manipulated directly rather than using the more
generic method of storing this information as Attributes
(C++|
C|
Fort). For the most
part, you should stick with the methods defined in the
Simple Unigrid Writer API in
order to stay maximally compatable with visualization
systems. It will do the correct thing with respect to
dimscales without any special effort on the user's part.