IO Module
Contents
IO Module
The IO module of HIPP provides
High-level, pure-OOP wrappers for the HDF5 library.
Extentions to simplify common I/O tasks.
Intermediate-level components that are mapped to the actual HDF5 library calls.
High-level HDF5 Objects
The basic high-level HDF5 objects are Dataspace, Proplist, Attr,
Datatype, Dataset, Group, and File.
Among them, Datatype, Dataset, Group, and File
are “named objects” that can be stored in files and connected by links.
Addionally, a File object can be used where a Group object
is needed (the “root” group is implicitly used by the library).
To reflect the logic relations of those objects, HIPP adopts the following inheritance graphs of them:
Fig. 10 The inheritance of HIPP HDF5 objects. Obj and NamedObj are
two abstract object types that do not have actual related HDF5 resources.
The inheritance has strong impact on how the APIs of those objects are used. For example:
Fileinherits all methods fromGroup. Hence, you can create links, extract meta-info of them, visit/iterate links and sub objects, create/open datasets, from aFileinstance. These operations are applied to the root group of the file instace.Datatype,Dataset,Group, andFileinherit all methods fromNamedObj. Therefore, they can create/open attributes and iterate over them, by using the API defined inNamedObj.All of these types are sub class of
Obj. Hence, the memory management API defined inObj, such as Obj::raw(), Obj::free(), and Obj::has_referenced() can be used on instance of any HDF5 type.
However, some different methods that have the name do appear (static bind) both in the sub class and the parent class. For example:
Each class defines its own version of
obj_raw()which returns a referene to intermediate-level HDF5 object counterpart. Therefore,file.obj_raw()returns _File&, whilefile.NamedObj::obj_raw()returns _NamedObj&.GroupandNamedObjboth has its own version ofget_info(), which returns the group meta-info and object-meta info, respectively. Hence,group.get_info()returns the group meta-info of the instance, whilegroup.NamedObj::get_info()returns its meta-info as a named object. To simplify the usage, we do provide a method Group::get_object_info() which has the same effect of the later call.
List of High-level Components
Class |
Corresponding HDF5 Standard C API |
Details |
|---|---|---|
H5F |
File manipulation. |
|
H5G, H5L |
Data group operations. |
|
H5D |
Dataset operations. |
|
H5T |
Type system. |
|
H5S |
Dataspace operations. |
|
H5P |
Property list. |
|
H5A |
Attributes. |
|
H5O |
Base class of all HDF5 objects. |
|
Base class of all named HDF5 objects. |
||
Convert C++ object to H5 datatype and dataspace. |
||
Scalar versions of |
||
String versions of |