summaryrefslogtreecommitdiffstats
path: root/hl/c++/src/H5PacketTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hl/c++/src/H5PacketTable.cpp')
-rw-r--r--hl/c++/src/H5PacketTable.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp
index fabe490..6a16807 100644
--- a/hl/c++/src/H5PacketTable.cpp
+++ b/hl/c++/src/H5PacketTable.cpp
@@ -86,6 +86,21 @@
return H5PTset_index(table_id, index);
}
+ /* SetIndex
+ * Sets the index to point to the packet specified by index.
+ * Returns 0 on success, negative on failure (if index is out of bounds)
+ */
+ int PacketTable::GetIndex(int &error)
+ {
+ hsize_t index;
+
+ error = H5PTget_index(table_id, &index);
+ if(error < 0)
+ return 0;
+ else
+ return index;
+ }
+
/* GetPacketCount
* Returns the number of packets in the packet table. Error
* is set to 0 on success. On failure, returns 0 and