diff options
Diffstat (limited to 'c++/src/H5DataType.h')
-rw-r--r-- | c++/src/H5DataType.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index 32a79fa..50d2fc1 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -50,6 +50,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; @@ -130,6 +137,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; @@ -140,6 +150,10 @@ 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); @@ -149,6 +163,11 @@ class H5_DLLCPP DataType : public H5Object { #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); |