HL-HDF
Migration Guide from 0.6 to 0.7+

We have had quite a few deprecated functions that has been hanging around for a while.

Now, when HDF5 1.8.x was released and they altered some functions we have taken the opportunity to do a major restructure of HL-HDF. Most of the deprecated functions has been removed and we have changed the naming convention for most of the functions to keep a consistent naming. If, for some reason you find that you are missing a nessecary function and can not use the functions that are published, please let us know and we will attempt to implement a corresponding function.

Header files

Firstly, we only require that you are including one file to get access to most of the functionality.

#include <hlhdf.h>

This file will include all other relevant files so you will not have to include several header files.

The following files has been removed and relevant functionality has been moved into other files. Use hlhdf.h instead.

  • display_hlhdf.h, if you want to print information about a hdf5 file, either use h5dump or print the node list manually
  • read_hlhdf.h
  • read_vhlhdf.h
  • update_vhlhdf.h
  • vhlhdf.h
  • write_hlhdf.h
  • write_vhlhdf.h

Removed or renamed functions

Some functions really do not have any meaning that we support since they easilly are performed by using the HDF5 apis instead. Other functions might only have been renamed to keep a consistent naming scheme or might be superfluent.

  • doWriteHdf5Xxxx functions has been removed, they should not be accessed manually. It is up to HLNodeList_write
  • createHlHdfFile signature has been removed
  • addNode has been renamed to HLNodeList_addNode
  • getNode has been renamed to HLNodeList_getNodeByName
  • updateNodeList has been renamed to HLNodeList_update
  • writeNodeList has been removed, use HLNodeList_write instead. Same behaviour can be achieved by writing
    HL_Compression compr;
    initHL_Compression(&compr, CT_ZLIB);
    compr.level = doCompress;
    writeHL_NodeList(nodelist, NULL, &compr);
    
  • Macro ALIGN has been renamed to HLHDF_ALIGN
  • closeDataset has been removed, use H5Dclose instead
  • closeGroup has been removed, use H5Gclose instead
  • addCompoundTypeAttribute has been renamed to addHL_CompoundTypeAttribute
  • copyCompoundTypeDescription has been renamed to copyHL_CompoundTypeDescription
  • setScalarValue has been renamed to HLNode_setScalarValue
  • setArrayValue has been renamed to HLNode_setArrayValue
  • scanNodeList has been removed
  • scanCompoundTypeDescription has been removed
  • commitDatatype has been renamed to HLNode_commitType (and deprecated)
  • findCompoundTypeDescription has been renamed to HLNodeList_findCompoundDescription
  • createGroup has been removed. Same behaviour can be achieved by using H5G apis.
  • setTypeSize has been removed, use H5Tset_size instead.
  • createStringType has been removed, use H5T apis instead, same behaviour can be achieved by writing
    type = H5Tcopy(H5T_C_S1);
    H5Tset_size(type,length);
    
  • closeHlHdfFile has been removed, use H5Fclose instead.

Upgrade script

We have added a very simple upgrade script that will help you with the renaming of the .c and .h files. It is called <HLHDF src>/scripts/upgrade_0_7plus.sh and there is also a perl script called <HLHDF src>/scripts/rename_functions.pl.

To use upgrade_0_7plus.sh script, go to the root directory of your source code and execute:

%> <HLHDF src>/scripts/upgrade_0_7plus.sh

This will locate all .h and .c files in this directory and downwards in the directory structure and rename the old HLHDF functions into the new naming convention.

If you want to play it safe, it is also possible to use the perl script instead and perform the name conversion manually.

%> perl <HLHDF src>/scripts/rename_functions.pl <the file name to be translated>

This command will perform the translation and print the translated file to stdout.

NOTE!!! We do not take any reponsibility for any damage that these scripts might cause since it is a very basic renaming code. Before running this script make sure that you have got a copy of the source code that you are planning to migrate.