Correct practice with C++ API

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?
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?
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().

    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@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Ben,

   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

···

On Mar 10, 2009, at 1:41 PM, Benjamin Scherrey wrote:

   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@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.