diff options
Diffstat (limited to 'c++/src/H5ArrayType.cpp')
-rw-r--r-- | c++/src/H5ArrayType.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index 0bdd09c..46ac021 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -73,6 +73,42 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) } //-------------------------------------------------------------------------- +// Function: ArrayType overloaded constructor +///\brief Creates an ArrayType instance by opening an HDF5 array datatype +/// given its name, provided as a C character string. +///\param dtype_name - IN: Array 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::openArrayType(const char*) to +// improve usability. +// -BMR, Dec 2016 +//-------------------------------------------------------------------------- +ArrayType::ArrayType(const H5Location& loc, const char *dtype_name) : DataType() +{ + id = p_opentype(loc, dtype_name); +} + +//-------------------------------------------------------------------------- +// Function: ArrayType overloaded constructor +///\brief Creates an ArrayType instance by opening an HDF5 array datatype +/// given its name, provided as an \c H5std_string. +///\param dtype_name - IN: Array 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::openArrayType(const H5std_string&) +// to improve usability. +// -BMR, Dec 2016 +//-------------------------------------------------------------------------- +ArrayType::ArrayType(const H5Location& loc, const H5std_string& dtype_name) : DataType() +{ + id = p_opentype(loc, dtype_name.c_str()); +} + +//-------------------------------------------------------------------------- // Function: ArrayType::operator= ///\brief Assignment operator ///\param rhs - IN: Reference to the existing array datatype |