summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataType.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-03-14 03:53:43 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-03-14 03:53:43 (GMT)
commita48c9c4024e7ede0021e1a9d8c1d4c197333e0d0 (patch)
tree4f69e727c624eafc5c1a812e24cc27b71175d69f /c++/src/H5DataType.cpp
parent56e5b4ed05fb3bad51c226ec5b567871a45e0bce (diff)
downloadhdf5-a48c9c4024e7ede0021e1a9d8c1d4c197333e0d0.zip
hdf5-a48c9c4024e7ede0021e1a9d8c1d4c197333e0d0.tar.gz
hdf5-a48c9c4024e7ede0021e1a9d8c1d4c197333e0d0.tar.bz2
Purpose: Add new C++ wrappers
Description: Added wrappers for H5Iis_valid, H5Ps/get_nlinks, H5Tget_create_plist, H5Oopen, H5Oclose and H5Pset_virtual // Checks if the given ID is valid. static bool isValid(hid_t an_id); // Sets the number of soft or user-defined links that can be // traversed before a failure occurs. void setNumLinks(size_t nlinks) const; // Gets the number of soft or user-defined link traversals allowed size_t getNumLinks() const; // Returns a copy of the creation property list of a datatype. PropList getCreatePlist() const; // Opens an object within a group or a file, i.e., root group. hid_t getObjId(const char* name,...); hid_t getObjId(const H5std_string& name,...); // Closes an object opened by getObjId(). void closeObjId(hid_t obj_id) const; // Maps elements of a virtual dataset to elements of the source dataset. void setVirtual(const DataSpace& vspace, const char *src_fname,...); void setVirtual(const DataSpace& vspace, const H5std_string src_fname,...); Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5DataType.cpp')
-rw-r--r--c++/src/H5DataType.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index ae48d16..1cfc259 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -744,6 +744,31 @@ bool DataType::isVariableStr() const
}
//--------------------------------------------------------------------------
+// Function: DataType::getCreatePlist
+///\brief Returns a copy of the property list, which is for datatype
+/// creation.
+///\return A property list object
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - March, 2017
+// Description
+// Currently, there is no datatype creation property list class
+// in the C++ API because there is no associated functionality.
+//--------------------------------------------------------------------------
+PropList DataType::getCreatePlist() const
+{
+ hid_t create_plist_id = H5Tget_create_plist(id);
+ if (create_plist_id < 0)
+ {
+ throw DataTypeIException(inMemFunc("getCreatePlist"),
+ "H5Tget_create_plist returns negative value");
+ }
+ // create and return the DSetCreatPropList object
+ PropList create_plist;
+ f_PropList_setId(&create_plist, create_plist_id);
+ return(create_plist);
+}
+
+//--------------------------------------------------------------------------
// Function: DataType::getId
///\brief Get the id of this datatype
///\return Datatype identifier