ddn.data.hdf5.visitor

HDF5 Iteration and Visitor Support

This module provides D-idiomatic iteration helpers for HDF5 objects, attributes, and links with delegate-based callbacks.

License

BSD-3-Clause

Types 10

Index type for iteration ordering.

NAME = H5_index_t.NAMEIndex by name
CREATION_ORDER = H5_index_t.CRT_ORDERIndex by creation order

Iteration order.

INCREASING = H5_iter_order_t.INCIncreasing order
DECREASING = H5_iter_order_t.DECDecreasing order
NATIVE = H5_iter_order_t.NATIVENative order (fastest)

Object type enumeration.

UNKNOWN = H5O_type_t.UNKNOWNUnknown object type
GROUP = H5O_type_t.GROUPGroup
DATASET = H5O_type_t.DATASETDataset
NAMED_DATATYPE = H5O_type_t.NAMED_DATATYPENamed datatype

Link type enumeration.

HARD = H5L_type_t.HARDHard link
SOFT = H5L_type_t.SOFTSoft link
EXTERNAL = H5L_type_t.EXTERNALExternal link

Information about an attribute during iteration.

Fields
string nameName of the attribute
bool creationOrderValidWhether creation order is valid
long creationOrderCreation order index
int characterSetCharacter set used for attribute name
hsize_t dataSizeSize of raw data
structLinkInfo

Information about a link during iteration.

Fields
string nameName of the link
LinkType typeType of the link
bool creationOrderValidWhether creation order is valid
long creationOrderCreation order index
int characterSetCharacter set used for link name

Information about an object during visitation.

Fields
string nameName/path of the object
ObjectType typeType of the object
hsize_t numAttributesNumber of attributes
uint refCountReference count
long accessTimeAccess time
long modificationTimeModification time
long changeTimeChange time
long birthTimeBirth time
private structAttrIterContext

Context structure for attribute iteration callback wrapper.

Fields
bool delegate(AttributeInfo) dgUser delegate to call
Exception exceptionException caught during iteration (if any)
bool continueIterationWhether to continue iteration
private structLinkIterContext

Context structure for link iteration callback wrapper.

Fields
bool delegate(LinkInfo) dgUser delegate to call
Exception exceptionException caught during iteration (if any)
bool continueIterationWhether to continue iteration
private structObjectVisitContext

Context structure for object visitation callback wrapper.

Fields
bool delegate(ObjectInfo) dgUser delegate to call
Exception exceptionException caught during iteration (if any)
bool continueIterationWhether to continue iteration

Functions 7

private fnherr_t attrIterCallback(hid_t locationId, const char * attrName, const H5A_info_t * ainfo, void * opData)C callback wrapper for attribute iteration.
private fnherr_t linkIterCallback(hid_t groupId, const char * linkName, const H5L_info2_t * linfo, void * opData)C callback wrapper for link iteration.
private fnherr_t objectVisitCallback(hid_t objId, const char * objName, const H5O_info2_t * oinfo, void * opData)C callback wrapper for object visitation.
fnhsize_t iterateAttributes(hid_t locId, bool delegate(AttributeInfo) dg, IndexType indexType = IndexType.NAME, IterOrder order = IterOrder.NATIVE)Iterates over attributes attached to an object.
fnhsize_t iterateLinks(hid_t groupId, bool delegate(LinkInfo) dg, IndexType indexType = IndexType.NAME, IterOrder order = IterOrder.NATIVE)Iterates over links in a group.
fnhsize_t visitLinks(hid_t groupId, bool delegate(LinkInfo) dg, IndexType indexType = IndexType.NAME, IterOrder order = IterOrder.NATIVE)Recursively visits all links in a group and its subgroups.
fnhsize_t visitObjects(hid_t locId, bool delegate(ObjectInfo) dg, IndexType indexType = IndexType.NAME, IterOrder order = IterOrder.NATIVE)Recursively visits all objects in a file or group.