23#ifndef LIBH5_GROUP_HPP
24#define LIBH5_GROUP_HPP
60 group(
object obj,
file _parent_file) :
object{obj}, parent_file{std::move(_parent_file)} {}
64 [[nodiscard]] std::string
name()
const;
75 [[nodiscard]]
bool has_key(std::string
const &key)
const;
83 [[nodiscard]]
bool has_subgroup(std::string
const &key)
const;
91 [[nodiscard]]
bool has_dataset(std::string
const &key)
const;
102 void unlink(std::string
const &key,
bool error_if_absent =
false)
const;
139 void create_softlink(std::string
const &target_key, std::string
const &key,
bool delete_if_exists =
true)
const;
A handle to an HDF5 file.
A handle to an HDF5 group.
bool has_dataset(std::string const &key) const
Check if a dataset with the given key exists in the group and is accessible.
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 g...
dataset open_dataset(std::string const &key) const
Open a dataset with the given key in the group.
std::string name() const
Get the name of 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.
group create_group(std::string const &key, bool delete_if_exists=true) const
Create a subgroup 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 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_subgroup_dataset_names() const
Get all the names of the subgroups and datasets in the current group.
bool has_key(std::string const &key) const
Check if a link with the given key exists in the group.
std::vector< std::string > get_all_dataset_names() const
Get all the names of the datasets in the current group.
file get_file() const
Get the parent file to which the group belongs.
void unlink(std::string const &key, bool error_if_absent=false) const
Remove a link with the given key from the group.
std::vector< std::string > get_all_subgroup_names() const
Get all the names of the subgroups in the current group.
group()=default
Default constructor (only necessary for the Python interface).
A generic handle for HDF5 objects.
Provides a handle to an HDF5 file.
int64_t hid_t
ID type used in HDF5.