[hdf-forum] Correct practice with C++ API
Quincey Koziol
koziol at hdfgroup.org
Wed Mar 11 15:06:33 EDT 2009
Hi Ben,
On Mar 10, 2009, at 1:41 PM, Benjamin Scherrey wrote:
> I've made a little progress since before. Have a few specific
> questions and would appreciate any pointers or best practices on how
> to accomplish these things with the C++ api:
>
> 1. I still can't seem to read bool values back for some reason. What
> is the correct NATIVE_XXX type to use or should I be mapping to
> something other than C++ boolean?
Currently, the HDF5 library doesn't support the native C & C++
booleans types, but rather the "hbool_t" type we define in our header
files. At some point, we will alias hbool_t to the native boolean
types, but that requires some more work.
> 2. How does one control the quantity of results coming back from
> DataSet::read()? All the behaviour I see points to it returning the
> entire dataset. Some of my records have a million+ instances so that's
> a lot of stuff to be manipulating in memory at once. How do I start at
> a certain offset and read in a select quantity of items via the
> DataSet (or some other) class?
You want to define a selection on the file & disk dataspaces. See
H5Sselect_hyperslab() and H5S_select_elements() for example.
> 3. I'm not yet writing to HDF5 via C++ but, once I do, I imagine I
> will have the same question regarding DataSet::write().
Ditto.
Quincey
> I'm attaching an updated version of yesterdays code so you can see
> what I'm trying to do. Appreciate any advice on my approach here.
>
> thanx,
>
> -- Ben Scherrey
>
> ----------------------------------------------------------------------
> This mailing list is for HDF software users discussion.
> To subscribe to this list, send a message to hdf-forum-subscribe at hdfgroup.org
> .
> To unsubscribe, send a message to hdf-forum-unsubscribe at hdfgroup.org.
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2502 bytes
Desc: not available
URL: <http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/attachments/20090311/d74f46c4/attachment.bin>
More information about the Hdf-forum
mailing list