summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Object.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2019-02-14 21:35:04 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2019-02-14 21:35:04 (GMT)
commit4a4ec03dfdbc98835d601f1ce0005e68a8a076e4 (patch)
treecc4ad5b922180a2aa17f21e9b9df4b510437622c /c++/src/H5Object.h
parent10cdff5ca45786832bf5e6c3e3408bc725464fd6 (diff)
downloadhdf5-4a4ec03dfdbc98835d601f1ce0005e68a8a076e4.zip
hdf5-4a4ec03dfdbc98835d601f1ce0005e68a8a076e4.tar.gz
hdf5-4a4ec03dfdbc98835d601f1ce0005e68a8a076e4.tar.bz2
Adding a C++ wrapper
Description: - Added a wrapper for H5Ovisit2 to class H5Object // 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); - Fixed various typos in documentation Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1011test)
Diffstat (limited to 'c++/src/H5Object.h')
-rw-r--r--c++/src/H5Object.h26
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: