summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataType.h
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2017-12-01 18:41:26 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2017-12-01 18:41:26 (GMT)
commitb8c6b68c35fa2be23ef488a1d81097ff3ed55000 (patch)
treec3429ee577e454526c8704d66a84f0c45b7959a1 /c++/src/H5DataType.h
parent23a702e7bad93fc4f14eab07678c75d276e2d0ad (diff)
parent60f76980aab92f0e0730170b99a2363acd3c97fa (diff)
downloadhdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.zip
hdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.tar.gz
hdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.tar.bz2
Merge pull request #811 in HDFFV/hdf5 from hdf5_1_8_20 to 1.8/masterhdf5-1_8_20
* commit '60f76980aab92f0e0730170b99a2363acd3c97fa': (108 commits) Update version numbers and remove empty sections in RELEASE.txt. Restore line 1154: C2Cppfunction_map.mht to HTML_EXTRA_FILES. Update version for 1.8.20 release. Fixed documentation warnings HDFFV-10329 Correct LINK INTERFACE and VS20013 compile Switch default build mode from development to production. Increment version string to pre2. Add RELEASE.txt note for HDFFV-10274. (cherry picked from commit f7a7d0a00613cba997212fa8032091629a678797) Initialize hid_t variables in test_Attr_bug9. (cherry picked from commit 97bc393449f3fe02c5992872ab2842e12f611ef0) Fix HDFFV-10274. When deleting all (or almost all) of the messages in an object header chunk, where the total amount deleted was greater than 64K, an error would occur due to an off by one error in the code that handled that case. Fixed this and added a test case. (cherry picked from commit 1b2c2ca9a6a7d7e1fcd5c3302e203f2e2dabf0af) Fix linking of libs Changed file path to relative. iAdd NAG to supported compilers in RELEASE.txt. Add description to RELEASE.txt for HDFFV-10323 Correct issue number Set version to 1.8.20-pre1 Update supported and tested platforms in RELEASE.txt. HDFFV-10321 Merge from 1.8 Incremented lib file .so numbers: revision for all except c++ for code change; current incremented, revision and age set to 0 for c++ due to symbols added and removed. updated issues related to Fortran Incremented lib file .so numbers: revision for all except c++ for dcode change; current incremented, revision and age set to 0 for c++ due to symbols added and removed. ...
Diffstat (limited to 'c++/src/H5DataType.h')
-rw-r--r--c++/src/H5DataType.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 8970a8d..29cc990 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -36,6 +36,10 @@ class H5_DLLCPP DataType : public H5Object {
// Creates a copy of a predefined type
DataType(const PredType& pred_type);
+ // Opens a generic named datatype at a given location.
+ DataType(const H5Location& loc, const char* name);
+ DataType(const H5Location& loc, const H5std_string& name);
+
// Creates a datatype by way of dereference.
DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
@@ -49,6 +53,13 @@ class H5_DLLCPP DataType : public H5Object {
// Copies the datatype of dset to this datatype object.
void copy(const DataSet& dset);
+ // Returns a DataType instance by decoding the binary object
+ // description of this datatype.
+ virtual DataType* decode() const;
+
+ // Creates a binary object description of this datatype.
+ void encode();
+
// Returns the datatype class identifier.
H5T_class_t getClass() const;
@@ -56,10 +67,6 @@ class H5_DLLCPP DataType : public H5Object {
// a named datatype which can be accessed from the location.
void commit(const H5Location& loc, const char* name);
void commit(const H5Location& loc, const H5std_string& name);
- // These two overloaded functions are kept for backward compatibility
- // only; they missed the const - removed from 1.8.18 and 1.10.1
- //void commit(H5Location& loc, const char* name);
- //void commit(H5Location& loc, const H5std_string& name);
// Determines whether this datatype is a named datatype or
// a transient datatype.
@@ -121,6 +128,9 @@ class H5_DLLCPP DataType : public H5Object {
// Default constructor
DataType();
+ // Determines whether this datatype has a binary object description.
+ bool hasBinaryDesc() const;
+
// Gets the datatype id.
virtual hid_t getId() const;
@@ -131,15 +141,29 @@ class H5_DLLCPP DataType : public H5Object {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
hid_t id; // HDF5 datatype id
+ // Returns an id of a type by decoding the binary object
+ // description of this datatype.
+ hid_t p_decode() const;
+
// Sets the datatype id.
virtual void p_setId(const hid_t new_id);
+
+ // Opens a datatype and returns the id.
+ hid_t p_opentype(const H5Location& loc, const char* dtype_name) const;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
+ // Buffer for binary object description of this datatype, allocated
+ // in DataType::encode and used in DataType::decode
+ unsigned char *encoded_buf;
+ size_t buf_size;
+
// Friend function to set DataType id. For library use only.
friend void f_DataType_setId(DataType* dtype, hid_t new_id);
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
void p_commit(hid_t loc_id, const char* name);
+#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of DataType
} // namespace H5