Hi everyone,
I have the following problem and haven't found any good solution to it yet.
Within a class function, i want to open an HDF5 file, iterate over all elements and process the content of the datasets. The function H5Ovisit is perfect for it, except that
the function, which is called for each object, has to be global. I would like to have that the iterator function is a member function of the class, so that with each call it has access to the class member functions and variables. However all attempts to call H5Ovisit like H5Ovisit(...,...,...,this->iterate,...) or via a global function pointer and the assignment of this function pointer with the member function right before the call of H5Ovisit has failed.
I would love to solution similar to the SAX-parser for XML files, where you can inherit the iterative function into the derived class and then overwrite the definition.
Any help would be highly appreciated,
Sven Reiche
Paul Scherrer Institut,
5232 Villigen PSI
Switzerland
···
----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.