summaryrefslogtreecommitdiffstats
path: root/c++/src/H5CompType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5CompType.cpp')
-rw-r--r--c++/src/H5CompType.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 784d171..887151e 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -88,6 +88,42 @@ CompType::CompType( const DataSet& dataset ) : DataType()
}
//--------------------------------------------------------------------------
+// Function: CompType overloaded constructor
+///\brief Creates an CompType instance by opening an HDF5 compound
+/// given its name, provided as a C character string.
+///\param dtype_name - IN: Compound type name
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - Dec 2016
+// Description
+// In 1.10.1, this constructor was introduced and will replace the
+// existing function CommonFG::openCompType(const char*) to
+// improve usability.
+// -BMR, Dec 2016
+//--------------------------------------------------------------------------
+CompType::CompType(const H5Location& loc, const char *dtype_name) : DataType()
+{
+ id = p_opentype(loc, dtype_name);
+}
+
+//--------------------------------------------------------------------------
+// Function: CompType overloaded constructor
+///\brief Creates an CompType instance by opening an HDF5 compound
+/// datatype given its name, provided as an \c H5std_string.
+///\param dtype_name - IN: Compound type name
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - Dec 2016
+// Description
+// In 1.10.1, this constructor was introduced and will replace the
+// existing function CommonFG::openCompType(const H5Location&)
+// to improve usability.
+// -BMR, Dec 2016
+//--------------------------------------------------------------------------
+CompType::CompType(const H5Location& loc, const H5std_string& dtype_name) : DataType()
+{
+ id = p_opentype(loc, dtype_name.c_str());
+}
+
+//--------------------------------------------------------------------------
// Function: CompType::getNmembers
///\brief Returns the number of members in this compound datatype.
///\return Number of members