summaryrefslogtreecommitdiffstats
path: root/c++/src/H5LcreatProp.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-03-12 04:36:48 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-03-12 04:36:48 (GMT)
commit3494282d42bf6147b32a10162353920f9e8b5a6a (patch)
tree843581557a75580be9a5387f7aaf92f574c42a6e /c++/src/H5LcreatProp.h
parent43158f3bb352f374c31556a5d0dc463a09e0b32e (diff)
downloadhdf5-3494282d42bf6147b32a10162353920f9e8b5a6a.zip
hdf5-3494282d42bf6147b32a10162353920f9e8b5a6a.tar.gz
hdf5-3494282d42bf6147b32a10162353920f9e8b5a6a.tar.bz2
HDFFV-10149 continued
Description: - Moved the new wrappers committed on Mar 9: 43158f3bb352f374c31556a5d0dc463a09e0b32e to H5Location and renamed some of them for overloading. This is because the loc_id in the C APIs can be file, group, dataset, named datatype, and attribute. Previous implementation was wrong following some inaccurate C API reference manual. - Only the following wrappers are modified or added: + H5Lcreate_soft: changed name from newLink to link // Creates a soft link from link_name to target_name. void link(const char *target_name, const char *link_name,...) void link(const H5std_string& target_name,...) + H5Lcreate_hard: changed name from newLink to link // Creates a hard link from new_name to curr_name. void link(const char *curr_name, const Group& new_loc,...) void link(const H5std_string& curr_name, const Group& new_loc,...) // Creates a hard link from new_name to curr_name in same location. void link(const char *curr_name, const hid_t same_loc,...) void link(const H5std_string& curr_name, const hid_t same_loc,...) + H5Ldelete: modified existing functions to add 2nd argument // Removes the specified link from this location. void unlink(const char *link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) void unlink(const H5std_string& link_name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) - copyLink and moveLink were only moved from Group to H5Location, no change - Added class LinkCreatPropList - Added overloaded functions H5Location::createGroup to take a link creation property list Group createGroup(const char* name, const LinkCreatPropList& lcpl) Group createGroup(const H5std_string& name, const LinkCreatPropList& lcpl) - Added wrapper for H5Lget_info() to H5Location H5L_info_t getLinkInfo(const H5std_string& link_name,...) Platforms tested: Linux/64 (jelly) Linux/ppc64 (ostrich) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5LcreatProp.h')
-rw-r--r--c++/src/H5LcreatProp.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/c++/src/H5LcreatProp.h b/c++/src/H5LcreatProp.h
new file mode 100644
index 0000000..4ac2191
--- /dev/null
+++ b/c++/src/H5LcreatProp.h
@@ -0,0 +1,71 @@
+// C++ informative line for the emacs editor: -*- C++ -*-
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+// Class LinkCreatPropList represents the HDF5 file access property list and
+// inherits from DataType.
+
+#ifndef __H5LinkCreatPropList_H
+#define __H5LinkCreatPropList_H
+
+namespace H5 {
+
+/*! \class LinkCreatPropList
+ \brief Class LinkCreatPropList inherits from PropList and provides
+ wrappers for the HDF5 file access property list.
+*/
+// Inheritance: PropList -> IdComponent
+class H5_DLLCPP LinkCreatPropList : public PropList {
+ public:
+ ///\brief Default file access property list.
+ static const LinkCreatPropList& DEFAULT;
+
+ // Creates a file access property list.
+ LinkCreatPropList();
+
+ ///\brief Returns this class name.
+ virtual H5std_string fromClass () const { return("LinkCreatPropList"); }
+
+ // Copy constructor: creates a copy of a LinkCreatPropList object.
+ LinkCreatPropList(const LinkCreatPropList& original);
+
+ // Creates a copy of an existing file access property list
+ // using the property list id.
+ LinkCreatPropList (const hid_t plist_id);
+
+ // Sets the character encoding of the string.
+ void setCharEncoding(H5T_cset_t encoding) const;
+
+ // Gets the character encoding of the string.
+ H5T_cset_t getCharEncoding() const;
+
+ // Noop destructor
+ virtual ~LinkCreatPropList();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
+
+ private:
+ static LinkCreatPropList* DEFAULT_;
+
+ // Creates the global constant, should only be used by the library
+ static LinkCreatPropList* getConstant();
+
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
+}; // end of LinkCreatPropList
+} // namespace H5
+
+#endif // __H5LinkCreatPropList_H