summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DataType.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-12-19 06:34:18 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-12-19 06:34:18 (GMT)
commit798cdad29a49e0883446f7dad3c7992d53ea6ee3 (patch)
tree1de6ed6b6115be9cecd3753b63d3c69b54d03a80 /c++/src/H5DataType.h
parent700c6ae9851752d8ccf6fc18cdd5b44dcf9603a5 (diff)
downloadhdf5-798cdad29a49e0883446f7dad3c7992d53ea6ee3.zip
hdf5-798cdad29a49e0883446f7dad3c7992d53ea6ee3.tar.gz
hdf5-798cdad29a49e0883446f7dad3c7992d53ea6ee3.tar.bz2
Purpose: Improvement for HDFFV-10004
Description: When adding wrappers for H5Lexists, a new class, LinkAccPropList, was added to the C++ API, triggered complicated circular dependencies. Thus, some improvement was made to resolve the problems. - Replaced existing functions openXxxType with individual type constructors + Added individual XxxType constructors to replace the existing functions openXxxType because it's rather awkward to use these functions. + Moved openXxxType from H5Location back to CommonFG + Put back CommonFG as a baseclass of Group for openXxxType functions. + This replacement should improve usability and prevent the problem of circular dependencies. - Removed overloaded constructor that takes an Attribute when there is already one that takes H5Location because Attribute inherits from H5Location now. Platforms tested: Linux/32 2.6 (jam) Darwin (osx1010test) Linux/64 (platypus)
Diffstat (limited to 'c++/src/H5DataType.h')
-rw-r--r--c++/src/H5DataType.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 9ac6ecf..7036836 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -44,7 +44,7 @@ class H5_DLLCPP DataType : public H5Object {
// Creates a datatype by way of dereference.
DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
- DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
+// DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
// Closes this datatype.
virtual void close();
@@ -62,6 +62,7 @@ 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);
@@ -118,6 +119,13 @@ class H5_DLLCPP DataType : public H5Object {
///\brief Returns this class name.
virtual H5std_string fromClass () const { return("DataType"); }
+// From CommonFG then H5Location
+ // Constructors to open a generic named datatype at a given location.
+ DataType(const H5Location& loc, const char* name);
+ DataType(const H5Location& loc, const H5std_string& name);
+
+// End of From CommonFG then H5Location
+
// Creates a copy of an existing DataType using its id
DataType( const hid_t type_id );
@@ -136,6 +144,10 @@ class H5_DLLCPP DataType : public H5Object {
// 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: