A handle to an HDF5 group.
This class inherits from the general h5::object class. Each group stores the parent h5::file to which it belongs.
It provides various methods to simplify the creation of new and opening of existing groups, subgroups, datasets and softlinks within the current group.
Definition at line 44 of file group.hpp.
|
| group ()=default |
| Default constructor (only necessary for the Python interface).
|
|
| group (file f) |
| Constructor to open the root ("/") group in the given file.
|
|
dataset | create_dataset (std::string const &key, datatype ty, dataspace sp) const |
| Create a dataset with the given key, datatype and dataspace in this group.
|
|
dataset | create_dataset (std::string const &key, datatype ty, dataspace sp, hid_t pl) const |
| Create a dataset with the given key, datatype, dataspace and dataset creation property list in this group.
|
|
group | create_group (std::string const &key, bool delete_if_exists=true) const |
| Create a subgroup with the given key in the group.
|
|
void | create_softlink (std::string const &target_key, std::string const &key, bool delete_if_exists=true) const |
| Create a softlink with the given key to a target with a given target key in this group.
|
|
std::vector< std::string > | get_all_dataset_names () const |
| Get all the names of the datasets in the current group.
|
|
std::vector< std::string > | get_all_subgroup_dataset_names () const |
| Get all the names of the subgroups and datasets in the current group.
|
|
std::vector< std::string > | get_all_subgroup_names () const |
| Get all the names of the subgroups in the current group.
|
|
file | get_file () const |
| Get the parent file to which the group belongs.
|
|
bool | has_dataset (std::string const &key) const |
| Check if a dataset with the given key exists in the group and is accessible.
|
|
bool | has_key (std::string const &key) const |
| Check if a link with the given key exists in the group.
|
|
bool | has_subgroup (std::string const &key) const |
| Check if a subgroup with the given key exists in the group and is accessible.
|
|
std::string | name () const |
| Get the name of the group.
|
|
dataset | open_dataset (std::string const &key) const |
| Open a dataset with the given key in the group.
|
|
group | open_group (std::string const &key) const |
| Open a subgroup with the given key in the group.
|
|
void | unlink (std::string const &key, bool error_if_absent=false) const |
| Remove a link with the given key from the group.
|
|
| object (hid_t id=0) |
| Construct a new h5::object for a given HDF5 ID by taking ownership, i.e. without increasing the reference count.
|
|
| object (object &&x) noexcept |
| Move constructor steals the underlying HDF5 ID without increasing its reference count.
|
|
| object (object const &x) |
| Copy constructor copies the underlying HDF5 ID and increases its reference count.
|
|
| ~object () |
| Destructor decreases the reference count and sets the object's ID to zero.
|
|
void | close () |
| Release the HDF5 handle by decreasing the reference count and by setting the object's ID to zero.
|
|
int | get_ref_count () const |
| Get the current reference count.
|
|
bool | is_valid () const |
| Ensure that the wrapped HDF5 ID is valid (by calling H5Iis_valid ).
|
|
| operator hid_t () const |
| User-defined conversion to h5::hid_t.
|
|
object & | operator= (object &&x) noexcept |
| Move assignment operator steals the underlying HDF5 ID without increasing its reference count.
|
|
object & | operator= (object const &x) |
| Copy assignment operator copies the underlying HDF5 ID and increases its reference count.
|
|