summaryrefslogtreecommitdiffstats
path: root/hl/c++/src
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-26 04:15:52 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-26 04:15:52 (GMT)
commit75b926c96aa0716e0936d6fa5dfad1142fe14331 (patch)
tree996eab51c6d95f13f3a2e1ceda0c5684c24b8d62 /hl/c++/src
parentcedc64c69564c18a3a6fdcb405efc98bc5cea7e5 (diff)
downloadhdf5-75b926c96aa0716e0936d6fa5dfad1142fe14331.zip
hdf5-75b926c96aa0716e0936d6fa5dfad1142fe14331.tar.gz
hdf5-75b926c96aa0716e0936d6fa5dfad1142fe14331.tar.bz2
[svn-r29803] Purpose: Code improvement
Description: The constructor FL_PacketTable added in 1.10.0 did not have good prototype; it didn't allow the property list to be default. Marked it deprecated and added this one: FL_PacketTable(hid_t fileID, const char* name, hid_t dtypeID, hsize_t chunkSize = 0, hid_t plistID = H5P_DEFAULT) Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'hl/c++/src')
-rw-r--r--hl/c++/src/H5PacketTable.cpp17
-rw-r--r--hl/c++/src/H5PacketTable.h10
2 files changed, 21 insertions, 6 deletions
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp
index b033790..c4d7bbf 100644
--- a/hl/c++/src/H5PacketTable.cpp
+++ b/hl/c++/src/H5PacketTable.cpp
@@ -172,9 +172,22 @@
* the property list to specify compression, the name of the packet table,
* the ID of the datatype, and the size of a memory chunk used in chunking.
*/
- FL_PacketTable::FL_PacketTable(hid_t fileID, hid_t plist_id, const char* name, hid_t dtypeID, hsize_t chunkSize)
+ FL_PacketTable::FL_PacketTable(hid_t fileID, const char* name, hid_t dtypeID, hsize_t chunkSize, hid_t plistID)
{
- table_id = H5PTcreate(fileID, name, dtypeID, chunkSize, plist_id);
+ table_id = H5PTcreate(fileID, name, dtypeID, chunkSize, plistID);
+ }
+
+ /* Constructor - deprecated
+ * Creates a packet table to store either fixed- or variable-length packets.
+ * Takes the ID of the file the packet table will be created in, the ID of
+ * the property list to specify compression, the name of the packet table,
+ * the ID of the datatype, and the size of a memory chunk used in chunking.
+ * Note: The above constructor has a better prototype, which allows default
+ * values to be used. This constructor was only released in 1.10.0.
+ */
+ FL_PacketTable::FL_PacketTable(hid_t fileID, hid_t plistID, const char* name, hid_t dtypeID, hsize_t chunkSize)
+ {
+ table_id = H5PTcreate(fileID, name, dtypeID, chunkSize, plistID);
}
/* Constructor
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index bdd669d..be0b130 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -139,17 +139,19 @@ public:
* the property list to specify compression, the name of the packet table,
* the ID of the datatype, and the size of a memory chunk used in chunking.
*/
- FL_PacketTable(hid_t fileID, hid_t plist_id, const char* name, hid_t dtypeID, hsize_t chunkSize);
+ FL_PacketTable(hid_t fileID, const char* name, hid_t dtypeID, hsize_t chunkSize = 0, hid_t plistID = H5P_DEFAULT);
- /* Constructor
+ /* Constructors - deprecated
* Creates a packet table in which to store fixed length packets.
* Takes the ID of the file the packet table will be created in, the name of
* the packet table, the ID of the datatype of the set, the size
* of a memory chunk used in chunking, and the desired compression level
* (0-9, or -1 for no compression).
- * Note: this overload will be deprecated in favor of the constructor above.
+ * Note: these overloaded constructors will be deprecated in favor of the
+ * constructor above.
*/
- FL_PacketTable(hid_t fileID, char* name, hid_t dtypeID, hsize_t chunkSize, int compression = -1);
+ FL_PacketTable(hid_t fileID, hid_t plist_id, const char* name, hid_t dtypeID, hsize_t chunkSize);
+ FL_PacketTable(hid_t fileID, char* name, hid_t dtypeID, hsize_t chunkSize, int compression = 0);
/* "Open" Constructor
* Opens an existing fixed-length packet table.