ddn.data.hdf5.group

HDF5 Group Wrapper

This module provides a D wrapper for HDF5 group operations with RAII semantics for automatic resource management.

License

BSD-3-Clause
struct Group

Types 1

structGroup

RAII wrapper for HDF5 group handles.

This struct manages an HDF5 group handle and automatically closes it when the struct goes out of scope. Copy is disabled to prevent double-close issues; use move() for transferring ownership.

Example:

// Create a group
auto grp = Group.create(file.handle(), "/mygroup");

// Open an existing group
auto grp2 = Group.open(file.handle(), "/existing");

Fields
private hid_t _id
Methods
Group create(hid_t locId, string name, hid_t lcpl = H5P_DEFAULT, hid_t gcpl = H5P_DEFAULT, hid_t gapl = H5P_DEFAULT)Creates a new group.
Group open(hid_t locId, string name, hid_t gapl = H5P_DEFAULT)Opens an existing group.
Group move(ref Group other)Moves ownership from another Group instance.
void close()Explicitly closes the group handle.
hid_t handle() const @nogc nothrow @safeReturns the underlying HDF5 group handle.
bool isValid() const @nogc nothrow @safeChecks if the group handle is valid.
hsize_t numObjects()Gets the number of objects (links) in this group.
H5G_info_t getInfo()Gets information about this group.
Group createGroup(string name, hid_t lcpl = H5P_DEFAULT, hid_t gcpl = H5P_DEFAULT, hid_t gapl = H5P_DEFAULT)Creates a subgroup within this group.
Group openGroup(string name, hid_t gapl = H5P_DEFAULT)Opens a subgroup within this group.
Destructors
~thisDestructor that automatically closes the group handle.