Hi,
how would one create a compound data type that consists out of two strings?
Loose equivalent in C:
struct Type
{
char *first, *second;
};
In HDF5, it would be a compound type made from two type ID's that are
either "hid_t H5Tvlen_create( hid_t base_type_id )" or H5T_C_S1, to
be inserted as a member "first" and "second" to a
hid_t TypeID = H5Tcreate( H5T_COMPOUND, size_t size );
H5Tinsert( TypeID, "first" , 0 , H5T_C_S1 );
H5Tinsert( TypeID, "second", size_t offset, H5T_C_S1 );
However, what would be the "size" of this compound data type and the
offset of the second member?
It would seem this presumably simple approach can't work (would be nice
to document that around H5Tcreate() or H5Tinsert() ) ?
Alternatively, it should be possible to create an array of strings, using
hsize_t dims[1] = { 2 };
H5Tarray_create( H5T_C_S1, 1, dims);
but this would be less verbose as the data type doesn't get named members.
Any hints/recommendation on what would work best?
Thanks,
Werner
···
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362