#include <iostream>
int main(int argc, char* argv[])
{
if (argc != 2)
{
std::cout << "Usage: " << argv[0] << " <odimh5file>" << std::endl;
return -1;
}
H5::H5File* file = NULL;
H5::Group* root = NULL;
H5::Group* group = NULL;
try
{
file = HDF5File::open(argv[1], H5F_ACC_TRUNC);
root = HDF5File::getRoot(file);
HDF5Group::ensureChild(root, "xxxa");
HDF5Group::ensureChild(root, "xxxb");
HDF5Group::ensureChild(root, "xxxc");
H5::Group* d = HDF5Group::ensureGetChild(root, "xxxd");
HDF5Group::ensureChild(root, "xxxe");
HDF5Group::ensureChild(root, "xxxf");
HDF5Group::ensureChild(root, "xxxg");
std::cout << "numattr: " << d->getNumAttrs();
HDF5Group::removeChild(root, "xxxe");
std::cout << "numattr: " << d->getNumAttrs();
}
catch(H5::Exception& e)
{
e.printError(stdout);
}
delete group;
delete root;
delete file;
getchar();
return 0;
}
Namespace related to ODIMH5 version 2.0.
Definition: odimh5v20.hpp:46
Interface classes between OdimH5 objects and HDF5 library.
Main header file of the library.