Quantcast

CPP interface questions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CPP interface questions

OKramer@radiantblue.com
Hi,

I'm familiarizing myself with the HDF5 C++ interface. I'm having trouble understanding why H5Location::getObjType() takes a void* reference to an object when I would expect it to refer to "this". Same holds for get/setComment(), etc. Seems they should be static methods if we're passing in the object pointer. What am I missing?

Also, when I specify a name (char*) to a method like H5Location::reference(), is it understood that it is a relative path from the current group (i.e., "this", assuming it is a group)? What if the name starts with '/'?

I want to stay entirely in C++.

Oscar

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CPP interface questions

Binh-Minh Ribler

Hello Oscar,


"this" identifies the "dataset containing the object reference or the group containing that dataset."  Please refer to the C function manual page for more details: https://www.hdfgroup.org/HDF5/doc/RM/RM_H5R.html#Reference-GetObjType1


The HDF5 C++ API is a simple wrapper of the C API, thus, the argument name should follow the same syntax as the name in the C API.  Please refer to this page for information about names: https://www.hdfgroup.org/HDF5/doc/RM/RM_H5G.html


I hope this helps.  Thanks,

Binh-Minh



From: Hdf-forum <[hidden email]> on behalf of [hidden email] <[hidden email]>
Sent: Thursday, July 28, 2016 11:36 AM
To: [hidden email]
Subject: [Hdf-forum] CPP interface questions
 
Hi,

I'm familiarizing myself with the HDF5 C++ interface. I'm having trouble understanding why H5Location::getObjType() takes a void* reference to an object when I would expect it to refer to "this". Same holds for get/setComment(), etc. Seems they should be static methods if we're passing in the object pointer. What am I missing?

Also, when I specify a name (char*) to a method like H5Location::reference(), is it understood that it is a relative path from the current group (i.e., "this", assuming it is a group)? What if the name starts with '/'?

I want to stay entirely in C++.

Oscar

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Loading...