summaryrefslogtreecommitdiffstats
path: root/c++/src/H5FloatType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5FloatType.cpp')
-rw-r--r--c++/src/H5FloatType.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index 6bb3fd6..aba826e 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -20,7 +20,9 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LcreatProp.h"
#include "H5LaccProp.h"
+#include "H5DaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
@@ -65,13 +67,13 @@ FloatType::FloatType(const hid_t existing_id) : AtomType( existing_id ) {}
//--------------------------------------------------------------------------
// Function: FloatType copy constructor
-///\brief Copy constructor: makes a copy of the original FloatType object.
+///\brief Copy constructor: same HDF5 object as \a original
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType(const FloatType& original) : AtomType( original ){}
//--------------------------------------------------------------------------
-// Function: EnumType overloaded constructor
+// Function: FloatType overloaded constructor
///\brief Gets the floating-point datatype of the specified dataset
///\param dataset - IN: Dataset that this floating-point datatype
/// associates with
@@ -128,6 +130,28 @@ FloatType::FloatType(const H5Location& loc, const H5std_string& dtype_name) : At
}
//--------------------------------------------------------------------------
+// Function: FloatType::decode
+///\brief Returns an FloatType object via DataType* by decoding the
+/// binary object description of this type.
+///
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - Aug 2017
+//--------------------------------------------------------------------------
+DataType* FloatType::decode() const
+{
+ hid_t encoded_flttype_id = H5I_INVALID_HID;
+ try {
+ encoded_flttype_id = p_decode();
+ }
+ catch (DataTypeIException &err) {
+ throw;
+ }
+ FloatType *encoded_flttype = new FloatType;
+ encoded_flttype->p_setId(encoded_flttype_id);
+ return(encoded_flttype);
+}
+
+//--------------------------------------------------------------------------
// Function: FloatType::getFields
///\brief Retrieves floating point datatype bit field information.
///\param spos - OUT: Retrieved floating-point sign bit