ComputationalRadiationPhysics / libSplash

libSplash - Simple Parallel file output Library for Accumulating Simulation data using Hdf5
GNU Lesser General Public License v3.0
15 stars 15 forks source link

Get/Check type of attribute #238

Open Flamefire opened 8 years ago

Flamefire commented 8 years ago

Is there currently any way to check the type of an attribute? I currently see only the interface readAttribute(int32_t id, const char *dataName, const char *attrName, void* data) which completely ignores the type. So reading a double when a float was expected leads to buffer overflows. Even worse for unexpected array attributes.

Especially for multidimensional values this is a problem. You cannot read a value, that may have multiple dimensions as you don't know how many values are in the HDF5 file.

ccing @slizzered @ax3l