-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
From the documentation seems that there should be two functions:
parent ::= fd_t | gr_t;
[open]
h5::gr_t gopen(parent, const std::string& path [, const h5::gapl_t& gapl]);
[create]
h5::gr_t gcreate(const L& parent, const std::string& path,
[, h5::lcpl_t lcpl] [, h5::gcpl_t gcpl] [, h5::gapl_t gapl]);
but I can't use them, I don't find them declared anywhere an the groups examples doesn't compile:
groups.cpp:15:21: error: no member named 'gcreate' in namespace 'h5'
h5::gr_t gr = h5::gcreate(fd, "my-group/sub/path");
~~~~^
groups.cpp:18:7: error: no member named 'gcreate' in namespace 'h5'
h5::gcreate(fd, "/mygroup", lcpl); // passing lcpl type explicitly
~~~~^
groups.cpp:23:8: error: no member named 'gcreate' in namespace 'h5'
h5::gcreate(fd, "/mygroup", h5::dont_create_path);
~~~~^
groups.cpp:24:34: error: no member named 'group' in namespace 'h5::error::io'
}catch ( const h5::error::io::group::create& e){
~~~~~~~~~~~~~~~^
groups.cpp:30:8: error: no member named 'gcreate' in namespace 'h5'
h5::gcreate(fd, "/mygroup", h5::dont_create_path);
~~~~^
groups.cpp:37:13: error: no member named 'gopen' in namespace 'h5'; did you mean 'fdopen'?
auto gr = h5::gopen(fd, "/mygroup");
^~~~~~~~~
fdopen
What's wrong?
At the moment I'm using a workaround in my code which is just using the C API:
h5::gr_t root{H5Gopen(fd,"/", H5P_DEFAULT)};
but I'm not sure how good is this:
- is the group lifespan handled by the h5cpp library?
- is the use of h5::fd_t in C API calls safe and portable?
Anyway I wish there are a different way to avoid to call the C API directly for common task.
Please let me know if I'm doing something wrong! Thank you!
Metadata
Metadata
Assignees
Labels
No labels