summaryrefslogtreecommitdiffstats
path: root/c++/src/H5CompType.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2014-03-27 05:09:59 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2014-03-27 05:09:59 (GMT)
commit764128aaf245f915e85929858b2808591b606bdf (patch)
treebfc9220aa154127366a454dadf01f4394581a4b6 /c++/src/H5CompType.cpp
parentd9020f2e35342605b26b6260e05cc4a2cef2327b (diff)
downloadhdf5-764128aaf245f915e85929858b2808591b606bdf.zip
hdf5-764128aaf245f915e85929858b2808591b606bdf.tar.gz
hdf5-764128aaf245f915e85929858b2808591b606bdf.tar.bz2
[svn-r24913] Purpose: Fix HDFFV-8642
Description: Added CompType::setSize(size_t size) to set size for compound data type as H5Tset_size had been changed. Merged from trunk-24912 Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
Diffstat (limited to 'c++/src/H5CompType.cpp')
-rw-r--r--c++/src/H5CompType.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index df73d9b..1846846 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -451,6 +451,25 @@ void CompType::pack() const
}
//--------------------------------------------------------------------------
+// Function: CompType::setSize
+///\brief Sets the total size for this compound datatype.
+///\param size - IN: Size to set
+///\exception H5::DataTypeIException
+// Note
+// H5Tset_size works on atom datatypes and compound datatypes only
+// Programmer Binh-Minh Ribler - 2014
+//--------------------------------------------------------------------------
+void CompType::setSize(size_t size) const
+{
+ // Call C routine H5Tset_size to set the total size
+ herr_t ret_value = H5Tset_size(id, size);
+ if (ret_value < 0)
+ {
+ throw DataTypeIException("CompType::setSize", "H5Tset_size failed");
+ }
+}
+
+//--------------------------------------------------------------------------
// Function: CompType destructor
///\brief Properly terminates access to this compound datatype.
// Programmer Binh-Minh Ribler - 2000