Delphi interface for hdf5.dll 1.8.12

Hail HDF forum citizen!

I have just created Delphi module which implements (a rather complete) bindings to HDF library release 1.8.12. It's in attachment.

The source code is auto-generated from the header files in src directory. It means:
1) The conversion process is error-proof.
2) The bindings module can be recreated at any moment, e.g. when new HDF library is available.

The following information is translated from HDF headers:
1) All exported procedures except one with varargs (varargs is not supported in Delphi 5).
2) All exported variables.
3) Most #defines.
4) Most type definitions, including procedural types and enums.
5) Source comments.

The following is missing at this time:
1) Struct type definitions.

I was targeting at Delphi 5 on w32, but hopefully my module is also usable on FreePascal, with minor modifications.

If there is interest, I'm ready to share the generating script. But beware: it's UGLY :wink:

Please CC paramon@acdlabs.ru if answering this message.

Best wishes,
Andrey Paramonov

hdf5dll.pas (249 KB)

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

A new version of auto-generated bindings is available. It's in attachment.

The bug fixes and improvements:
1) Correct declaration for static array types, e.g. Phdset_reg_ref_t.
2) More precise parsing of typed constant declaration, e.g.
H5T_VARIABLE = size_t(-1)
3) Warnings about varargs procedures.

I also attach the converter script hdf5pas.py. Yes it's big time ugly; but probably someone finds it useful, and there is nothing refactoring can't treat :wink:

I hope that HDF library developers reading this forum are a bit more aware now about the problems one faces when converting HDF bindings to a programming language. Fully parsing C headers is a huge task; it really helps if public bindings include only simplest constructs like procedure of constant declarations. By the way, I think HDF header are really not that bad in this regard!

Please CC paramon@acdlabs.ru if answering this message.

Thank you for your effort, HDF team!
Andrey Paramonov

hdf5dll.pas (246 KB)

hdf5pas.py (24.2 KB)

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

A new version of auto-generated bindings is available. It's in attachment.

The improvements:
1) More precise declaration of H5_DLLVAR constants (H5P_ROOT, H5P_OBJECT_CREATE, ...).

I also attach the updater converter script hdf5pas.py.

Thank you for your effort, HDF team!
Andrey Paramonov

hdf5dll.pas (244 KB)

hdf5pas.py (24.1 KB)

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Hi
I would like to read four datasets (four by four ) same time from same hdf5 file. Can someone direct me to useful info?
Thank you
Nyama

···

________________________________

Hi
My C++/C program read hundreds of compressed compound arrays from a hdf5 file sequentially and stores them in some vectors. I would like to improve its time performance. I wish I can read 3 or 4 of them in parallel, and then again next 3 or 4, etc.. I am totally new to multithreading or OpenMP or any parallel programming. My question is: - Is it possible to implement on hdf5/C/C++/Linux what I want? - If so, can you direct me to some info or tutorial for beginners?

Thank you
With respect Nyama

A new version of auto-generated bindings is available. It's in attachment.

Changes:
1) Updated for HDF5 1.8.13.

I also attach the updater converter script hdf5pas.py.

Thank you for your effort, HDF team!
Andrey Paramonov

hdf5dll.pas (246 KB)

hdf5pas.py (24.2 KB)

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

An new version of auto-generated HDF5 bindings for Delphi is available.
It is attached along with generator script.

Changes:
1) Updated for HDF5 1.8.14.

Best wishes,
Andrey Paramonov

hdf5dll.pas (246 KB)

hdf5pas.py (24.2 KB)

···

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.