ddn.data.hdf5.utils
HDF5 Wrapper Utilities
This module provides utility functions for the HDF5 D wrapper library, including string conversions, ID validation, and scope guards.
License
BSD-3-Clause
struct ScopeGuard
Types 1
structScopeGuard(alias fn)
RAII scope guard for HDF5 resources.
This struct provides automatic cleanup of HDF5 resources when the scope is exited, similar to D's scope(exit).
Example:
auto guard = scopeGuard(() => H5Fclose(fileId));
// ... use fileId ...
// H5Fclose is automatically called when guard goes out of scopeFields
private bool _dismissedMethods
Destructors
Functions 9
fn
const(char) * toStringz(string s) @trusted pure nothrow @nogcConverts a D string to a null-terminated C string.fn
string fromStringz(const(char) * cstr) @trusted pure nothrowConverts a null-terminated C string to a D string.fn
string fromStringzN(const(char) * cstr, size_t maxLen) @trusted pure nothrowConverts a null-terminated C string to a D string with known maximum length.fn
hid_t validateId(hid_t id, string objectType = "object")Validates an HDF5 ID and throws an exception if invalid.fn
void validateIds(hid_t[] ids, string objectType = "object")Validates multiple HDF5 IDs and throws an exception if any is invalid.fn
herr_t safeCall(herr_t operation, lazy string errorMsg)Safely executes an HDF5 operation and handles errors.fn
hid_t safeCallId(hid_t operation, lazy string errorMsg)Safely executes an HDF5 operation that returns an ID.