ddn.data.hdf5.types

HDF5 Wrapper Types and Exceptions

This module provides wrapper-specific types, exceptions, and error handling utilities for the HDF5 D wrapper library.

License

BSD-3-Clause

Types 5

classHDF5Exception : Exception

Exception thrown when an HDF5 operation fails.

This exception captures the error context including the function name and optional error message from the HDF5 library.

Fields
herr_t errorCodeThe HDF5 error code, if available
string functionNameThe name of the HDF5 function that failed
Constructors
this(string msg, string file = __FILE__, size_t line = __LINE__)Constructs an HDF5Exception with the given message.
this(string msg, string funcName, herr_t errCode, string file = __FILE__, size_t line = __LINE__)Constructs an HDF5Exception with function context.

File access mode for opening HDF5 files.

readOnlyOpen file as read-only
readWriteOpen file for reading and writing

File creation mode for creating HDF5 files.

exclusiveFail if file already exists
truncateOverwrite existing file

Dataset allocation time.

earlyAllocate storage when dataset is created
incrementalAllocate incrementally as data is written
lateAllocate storage when data is first written
default_Use default allocation time

Hyperslab selection operation.

setReplace current selection
orOR with current selection
andAND with current selection
xorXOR with current selection
notBNOT-B AND A with current selection
notANOT-A AND B with current selection

Functions 5

fnbool isValidId(hid_t id) @nogc nothrow pure @safeChecks if an HDF5 ID is valid.
fnbool succeeded(herr_t status) @nogc nothrow pure @safeChecks if an HDF5 operation succeeded.
fnbool failed(herr_t status) @nogc nothrow pure @safeChecks if an HDF5 operation failed.
fnvoid enforceSuccess(herr_t status, lazy string msg, string funcName = "")Enforces that an HDF5 operation succeeded, throwing an exception on failure.
fnhid_t enforceValidId(hid_t id, lazy string msg, string funcName = "")Enforces that an HDF5 ID is valid, throwing an exception on failure.