diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2019-02-16 13:47:46 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2019-02-16 13:47:46 (GMT) |
commit | a9283319a942032022384a1c3560a3f92ded36bf (patch) | |
tree | 4e5653e25b3c90284488a2b0d38323a2e1ddd942 /c++/src/H5Object.h | |
parent | e1046db0e68f8188df4edc20ddc364a50500ad77 (diff) | |
parent | 6c212353c45ef84b5c977c6019e4d72263534aea (diff) | |
download | hdf5-a9283319a942032022384a1c3560a3f92ded36bf.zip hdf5-a9283319a942032022384a1c3560a3f92ded36bf.tar.gz hdf5-a9283319a942032022384a1c3560a3f92ded36bf.tar.bz2 |
Merge pull request #1547 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr_cpp5:develop to develop
C++ wrapper for H5Ovisit2
* commit '6c212353c45ef84b5c977c6019e4d72263534aea':
Code improvement
Removed an extra "using" statement
Adding documentation
Added C++ wrapper for H5Ovisit2
Adding a C++ wrapper
Diffstat (limited to 'c++/src/H5Object.h')
-rw-r--r-- | c++/src/H5Object.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index 10b3865..4a4e909 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -40,16 +40,30 @@ namespace H5 { // Inheritance: H5Location -> IdComponent // Define the operator function pointer for H5Aiterate(). -typedef void (*attr_operator_t)(H5Object& loc/*in*/, - const H5std_string attr_name/*in*/, - void *operator_data/*in,out*/); +typedef void (*attr_operator_t)(H5Object& loc, + const H5std_string attr_name, + void *operator_data); + +// Define the operator function pointer for H5Ovisit2(). +typedef int (*visit_operator_t)(H5Object& obj, + const H5std_string attr_name, + const H5O_info_t *oinfo, + void *operator_data); // User data for attribute iteration class UserData4Aiterate { public: attr_operator_t op; void* opData; - H5Object* location; + H5Object* location; // Consider changing to H5Location +}; + +// User data for visit iteration +class UserData4Visit { + public: + visit_operator_t op; + void* opData; + H5Object* obj; }; class H5_DLLCPP H5Object : public H5Location { @@ -71,6 +85,9 @@ class H5_DLLCPP H5Object : public H5Location { // Iterate user's function over the attributes of this object. int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL); + // Recursively visit elements reachable from this object. + void visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_t user_op, void *op_data, unsigned int fields); + // Returns the object header version of an object unsigned objVersion() const; @@ -98,6 +115,7 @@ class H5_DLLCPP H5Object : public H5Location { ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const; H5std_string getObjName() const; + #ifndef DOXYGEN_SHOULD_SKIP_THIS protected: |