Using the C++ API, I'm writing datasets in a group to an HDF5 file.  When
I read the file I've written, I look at each of the objects in the group,
and compare the reported type of the dataset with one of the datatypes
defined in
H5::PredType.  For example:

H5::Group group = H5File->openGroup(GroupName);
for(unsigned int I = 0; I < group.getNumObjs(); i++)
  {
  H5std_string name = group.getObjnameByIdx(I);
  std::string path = GroupName;
  path += "/";
  path += name;
  H5::DataSet curDS = H5File->openDataSet(path);
  H5::DataType curType = curDS.getDataType();

  if(curType == H5::PredType::NATIVE_HBOOL)
    {
    // handle bool
    }
  else if(curType == H5::PredType::NATIVE_CHAR)
    {
    // handle char
    }
  }

The problem is the char DataSet I wrote reports a type that's equal to
H5::PredType::NATIVE_HBOOL.

When I trace into the library, it appears they both have an underlying
INTEGER type, and are judged by H5Tequal to be the same, which seems wrong.

--
Kent Williams [email protected]






________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
________________________________

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to