summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-01-05 05:37:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-01-05 05:37:02 (GMT)
commit49fa0e8dbabe5019b1491845a963d8cfe41b59c1 (patch)
treedd0d1985c359959dd862b79296b8ee3898739561
parentafd7e5b476d65960d0e309f35fa2df3235731564 (diff)
parent5a55331bedbfd6a87ccc4684abfbd172ebb5e55d (diff)
downloadhdf5-49fa0e8dbabe5019b1491845a963d8cfe41b59c1.zip
hdf5-49fa0e8dbabe5019b1491845a963d8cfe41b59c1.tar.gz
hdf5-49fa0e8dbabe5019b1491845a963d8cfe41b59c1.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into develop_merge_cache_image_04
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--c++/src/H5AbstractDs.cpp1
-rw-r--r--c++/src/H5ArrayType.cpp1
-rw-r--r--c++/src/H5AtomType.cpp1
-rw-r--r--c++/src/H5Attribute.cpp1
-rw-r--r--c++/src/H5Classes.h1
-rw-r--r--c++/src/H5CommonFG.cpp1
-rw-r--r--c++/src/H5CompType.cpp1
-rw-r--r--c++/src/H5Cpp.h1
-rw-r--r--c++/src/H5DataSet.cpp1
-rw-r--r--c++/src/H5DataType.cpp1
-rw-r--r--c++/src/H5DcreatProp.cpp1
-rw-r--r--c++/src/H5EnumType.cpp1
-rw-r--r--c++/src/H5Exception.cpp3
-rw-r--r--c++/src/H5Exception.h3
-rw-r--r--c++/src/H5File.cpp1
-rw-r--r--c++/src/H5FloatType.cpp1
-rw-r--r--c++/src/H5Group.cpp1
-rw-r--r--c++/src/H5IntType.cpp1
-rw-r--r--c++/src/H5LaccProp.cpp114
-rw-r--r--c++/src/H5LaccProp.h67
-rw-r--r--c++/src/H5Library.cpp14
-rw-r--r--c++/src/H5Location.cpp8
-rw-r--r--c++/src/H5Location.h12
-rw-r--r--c++/src/H5Object.cpp34
-rw-r--r--c++/src/H5Object.h21
-rw-r--r--c++/src/H5PredType.cpp1
-rw-r--r--c++/src/H5StrType.cpp1
-rw-r--r--c++/src/H5VarLenType.cpp1
-rw-r--r--c++/src/Makefile.am27
-rw-r--r--c++/test/tfile.cpp8
-rw-r--r--c++/test/tlinks.cpp8
-rw-r--r--c++/test/tobject.cpp122
-rw-r--r--c++/test/ttypes.cpp21
-rw-r--r--c++/test/tvlstr.cpp16
35 files changed, 416 insertions, 83 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 2db0a9f..445d57b 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -32,6 +32,7 @@ set (CPP_SOURCES
${HDF5_CPP_SRC_SOURCE_DIR}/H5Group.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5IdComponent.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.cpp
+ ${HDF5_CPP_SRC_SOURCE_DIR}/H5LaccProp.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.cpp
@@ -68,6 +69,7 @@ set (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5IdComponent.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Include.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5IntType.h
+ ${HDF5_CPP_SRC_SOURCE_DIR}/H5LaccProp.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Library.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Location.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Object.h
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 49de4bb..9e76b55 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -24,6 +24,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataSpace.h"
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 46ac021..ecce591 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -21,6 +21,7 @@
#include "H5PropList.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp
index fa47e0c..22b163a 100644
--- a/c++/src/H5AtomType.cpp
+++ b/c++/src/H5AtomType.cpp
@@ -21,6 +21,7 @@
#include "H5PropList.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index c71c035..dfd2b28 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -29,6 +29,7 @@
#include "H5FcreatProp.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
diff --git a/c++/src/H5Classes.h b/c++/src/H5Classes.h
index bed0cae..03faa1a 100644
--- a/c++/src/H5Classes.h
+++ b/c++/src/H5Classes.h
@@ -25,6 +25,7 @@ namespace H5 {
class PropList;
class FileCreatPropList;
class FileAccPropList;
+ class LinkAccPropList;
class DSetCreatPropList;
class DSetMemXferPropList;
class DTypePropList;
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 018d3a2..5f7971f 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -24,6 +24,7 @@
#include "H5DxferProp.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5Alltypes.h"
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 0562e75..babda34 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -22,6 +22,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5Alltypes.h"
diff --git a/c++/src/H5Cpp.h b/c++/src/H5Cpp.h
index 90f0a2a..b86e0f3 100644
--- a/c++/src/H5Cpp.h
+++ b/c++/src/H5Cpp.h
@@ -27,6 +27,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index d3bf017..7c5b994 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -30,6 +30,7 @@
#include "H5OcreatProp.h"
#include "H5DxferProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 3955ebf..372b2c9 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -30,6 +30,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index b307bde..8ab38dc 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -21,6 +21,7 @@
#include "H5PropList.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index a9f0b41..5e1f0bd 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -24,6 +24,7 @@
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
#include "H5DataSpace.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index 9c383a2..335bb20 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -424,7 +424,7 @@ DataTypeIException::DataTypeIException(const H5std_string& func, const H5std_str
//--------------------------------------------------------------------------
DataTypeIException::~DataTypeIException() throw() {}
- /* //--------------------------------------------------------------------------
+//--------------------------------------------------------------------------
// Subclass: ObjHeaderIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -446,7 +446,6 @@ ObjHeaderIException::ObjHeaderIException(const H5std_string& func, const H5std_s
///\brief Noop destructor.
//--------------------------------------------------------------------------
ObjHeaderIException::~ObjHeaderIException() throw() {}
- */
//--------------------------------------------------------------------------
// Subclass: PropListIException
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 81068f5..7112995 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -120,13 +120,12 @@ class H5_DLLCPP DataTypeIException : public Exception {
virtual ~DataTypeIException() throw();
};
- /* class H5_DLLCPP ObjHeaderIException : public Exception {
+class H5_DLLCPP ObjHeaderIException : public Exception {
public:
ObjHeaderIException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
ObjHeaderIException();
virtual ~ObjHeaderIException() throw();
};
- */
class H5_DLLCPP PropListIException : public Exception {
public:
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 79f5471..fcf4e1c 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -29,6 +29,7 @@
#include "H5OcreatProp.h"
#include "H5DxferProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5CommonFG.h"
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index abc382d..73e8072 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -22,6 +22,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 4325a68..c976b00 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -29,6 +29,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5AbstractDs.h"
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index a60bcf3..38e2a7d 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -22,6 +22,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5LaccProp.cpp b/c++/src/H5LaccProp.cpp
new file mode 100644
index 0000000..e225b36
--- /dev/null
+++ b/c++/src/H5LaccProp.cpp
@@ -0,0 +1,114 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include <string>
+
+#include "H5Include.h"
+#include "H5Exception.h"
+#include "H5IdComponent.h"
+#include "H5PropList.h"
+#include "H5LaccProp.h"
+
+namespace H5 {
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+// This DOXYGEN_SHOULD_SKIP_THIS block is a work-around approach to control
+// the order of creation and deletion of the global constants. See Design Notes
+// in "H5PredType.cpp" for information.
+
+// Initialize a pointer for the constant
+LinkAccPropList* LinkAccPropList::DEFAULT_ = 0;
+
+//--------------------------------------------------------------------------
+// Function: LinkAccPropList::getConstant
+// Creates a LinkAccPropList object representing the HDF5 constant
+// H5P_LINK_ACCESS, pointed to by LinkAccPropList::DEFAULT_
+// exception H5::PropListIException
+// Description
+// If LinkAccPropList::DEFAULT_ already points to an allocated
+// object, throw a PropListIException. This scenario should not
+// happen.
+// Programmer Binh-Minh Ribler - 2015
+//--------------------------------------------------------------------------
+LinkAccPropList* LinkAccPropList::getConstant()
+{
+ // Tell the C library not to clean up, H5Library::termH5cpp will call
+ // H5close - more dependency if use H5Library::dontAtExit()
+ if (!IdComponent::H5dontAtexit_called)
+ {
+ (void) H5dont_atexit();
+ IdComponent::H5dontAtexit_called = true;
+ }
+
+ // If the constant pointer is not allocated, allocate it. Otherwise,
+ // throw because it shouldn't be.
+ if (DEFAULT_ == 0)
+ DEFAULT_ = new LinkAccPropList(H5P_LINK_ACCESS);
+ else
+ throw PropListIException("LinkAccPropList::getConstant", "LinkAccPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return(DEFAULT_);
+}
+
+//--------------------------------------------------------------------------
+// Function: LinkAccPropList::deleteConstants
+// Purpose: Deletes the constant object that LinkAccPropList::DEFAULT_
+// points to.
+// exception H5::PropListIException
+// Programmer Binh-Minh Ribler - 2015
+//--------------------------------------------------------------------------
+void LinkAccPropList::deleteConstants()
+{
+ if (DEFAULT_ != 0)
+ delete DEFAULT_;
+}
+
+//--------------------------------------------------------------------------
+// Purpose: Constant for default property
+//--------------------------------------------------------------------------
+const LinkAccPropList& LinkAccPropList::DEFAULT = *getConstant();
+
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
+//--------------------------------------------------------------------------
+// Function: Default Constructor
+///\brief Creates a file access property list
+// Programmer: Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+LinkAccPropList::LinkAccPropList() : PropList( H5P_LINK_ACCESS ) {}
+
+//--------------------------------------------------------------------------
+// Function: LinkAccPropList copy constructor
+///\brief Copy Constructor: makes a copy of the original
+///\param original - IN: LinkAccPropList instance to copy
+// Programmer: Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+LinkAccPropList::LinkAccPropList(const LinkAccPropList& original) : PropList(original) {}
+
+//--------------------------------------------------------------------------
+// Function: LinkAccPropList overloaded constructor
+///\brief Creates a file access property list using the id of an
+/// existing one.
+// Programmer: Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id) {}
+
+//--------------------------------------------------------------------------
+// Function: LinkAccPropList destructor
+///\brief Noop destructor
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+LinkAccPropList::~LinkAccPropList() {}
+
+} // end namespace
diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h
new file mode 100644
index 0000000..2a84ffb
--- /dev/null
+++ b/c++/src/H5LaccProp.h
@@ -0,0 +1,67 @@
+// 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 files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+// Class LinkAccPropList represents the HDF5 file access property list and
+// inherits from DataType.
+
+#ifndef __H5LinkAccPropList_H
+#define __H5LinkAccPropList_H
+
+namespace H5 {
+
+/*! \class LinkAccPropList
+ \brief Class LinkAccPropList inherits from PropList and provides
+ wrappers for the HDF5 file access property list.
+
+ Inheritance: PropList -> IdComponent
+*/
+class H5_DLLCPP LinkAccPropList : public PropList {
+ public:
+ ///\brief Default file access property list.
+ static const LinkAccPropList& DEFAULT;
+
+ // Creates a file access property list.
+ LinkAccPropList();
+
+ ///\brief Returns this class name.
+ virtual H5std_string fromClass () const { return("LinkAccPropList"); }
+
+ // Copy constructor: creates a copy of a LinkAccPropList object.
+ LinkAccPropList( const LinkAccPropList& original );
+
+ // Creates a copy of an existing file access property list
+ // using the property list id.
+ LinkAccPropList (const hid_t plist_id);
+
+ // Noop destructor
+ virtual ~LinkAccPropList();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+ // Deletes the global constant, should only be used by the library
+ static void deleteConstants();
+
+ private:
+ static LinkAccPropList* DEFAULT_;
+
+ // Creates the global constant, should only be used by the library
+ static LinkAccPropList* getConstant();
+
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
+};
+}
+#endif // __H5LinkAccPropList_H
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index 30be367..0ee6b4d 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -26,6 +26,7 @@
#include "H5OcreatProp.h"
#include "H5DxferProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
@@ -185,28 +186,27 @@ void H5Library::initH5cpp()
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating PropList::deleteConstants failed");
- /* ret_value = std::atexit(LinkAccPropList::deleteConstants);
+ ret_value = std::atexit(LinkAccPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating LinkAccPropList::deleteConstants failed");
- */
- ret_value = std::atexit(FileAccPropList::deleteConstants);
+ ret_value = std::atexit(FileAccPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating FileAccPropList::deleteConstants failed");
- ret_value = std::atexit(FileCreatPropList::deleteConstants);
+ ret_value = std::atexit(FileCreatPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating FileCreatPropList::deleteConstants failed");
- ret_value = std::atexit(DSetMemXferPropList::deleteConstants);
+ ret_value = std::atexit(DSetMemXferPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating DSetMemXferPropList::deleteConstants failed");
- ret_value = std::atexit(DSetCreatPropList::deleteConstants);
+ ret_value = std::atexit(DSetCreatPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating DSetCreatPropList::deleteConstants failed");
- ret_value = std::atexit(ObjCreatPropList::deleteConstants);
+ ret_value = std::atexit(ObjCreatPropList::deleteConstants);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registrating ObjCreatPropList::deleteConstants failed");
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 91de0f5..a3e6738 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -26,6 +26,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
@@ -76,7 +77,7 @@ H5Location::H5Location() : IdComponent() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
- /* //--------------------------------------------------------------------------
+//--------------------------------------------------------------------------
// Function: H5Location::exists
///\brief Checks if a link of a given name exists in a location
///\param name - IN: Searched name
@@ -96,11 +97,9 @@ bool H5Location::exists(const char* name, const LinkAccPropList& lapl) const
{
throwException("exists", "H5Lexists failed");
}
- return false; // warning: control reaches end of non-void function
}
- */
- /* //--------------------------------------------------------------------------
+//--------------------------------------------------------------------------
// Function: H5Location::exists
///\brief Checks if a link of a given name exists in a location
///\param name - IN: Searched name
@@ -113,7 +112,6 @@ bool H5Location::exists(const H5std_string& name, const LinkAccPropList& lapl) c
{
return(exists(name.c_str(), lapl));
}
- */
//--------------------------------------------------------------------------
// Function: H5Location::flush
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index 795e7a7..6a449dc 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -33,15 +33,13 @@ namespace H5 {
*/
// Class forwarding
class H5_DLLCPP ArrayType;
- /* class H5_DLLCPP LinkAccPropList; // remove when done
- */
+class H5_DLLCPP LinkAccPropList;
class H5_DLLCPP VarLenType;
class H5_DLLCPP H5Location : public IdComponent {
public:
- /* // Checks if a link of a given name exists in a location
+ // Checks if a link of a given name exists in a location
bool exists(const char* name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
bool exists(const H5std_string& name, const LinkAccPropList& lapl = LinkAccPropList::DEFAULT) const;
- */
// Flushes all buffers associated with this location to disk.
void flush( H5F_scope_t scope ) const;
@@ -213,9 +211,9 @@ class H5_DLLCPP H5Location : public IdComponent {
// Retrieves the type of object that an object reference points to.
H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
- // Sets the identifier of this object to a new value. - this one
- // doesn't increment reference count
- //virtual void p_setId(const hid_t new_id);
+ // Sets the identifier of this object to a new value. - this one
+ // doesn't increment reference count
+ //virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index d656ccf..48d81f8 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -25,6 +25,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
@@ -257,6 +258,39 @@ int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_da
}
//--------------------------------------------------------------------------
+// Function: H5Object::objVersion
+///\brief Returns the header version of this HDF5 object.
+///\return Object version, which can have the following values:
+/// \li \c H5O_VERSION_1
+/// \li \c H5O_VERSION_2
+///\exception H5::ObjHeaderIException
+/// Exception will be thrown when:
+/// - an error returned by the C API
+/// - version number is not one of the valid values above
+// Programmer Binh-Minh Ribler - December, 2016
+//--------------------------------------------------------------------------
+unsigned H5Object::objVersion() const
+{
+ H5O_info_t objinfo;
+ unsigned version = 0;
+
+ // Use C API to get information of the object
+ herr_t ret_value = H5Oget_info(getId(), &objinfo);
+
+ // Throw exception if C API returns failure
+ if (ret_value < 0)
+ throw Exception(inMemFunc("objVersion"), "H5Oget_info failed");
+ // Return a valid version or throw an exception for invalid value
+ else
+ {
+ version = objinfo.hdr.version;
+ if (version != H5O_VERSION_1 && version != H5O_VERSION_2)
+ throw ObjHeaderIException("objVersion", "Invalid version for object");
+ }
+ return(version);
+}
+
+//--------------------------------------------------------------------------
// Function: H5Object::getNumAttrs
///\brief Returns the number of attributes attached to this HDF5 object.
///\return Number of attributes
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 72a9f50..5ea8937 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -77,6 +77,9 @@ class H5_DLLCPP H5Object : public H5Location {
// Iterate user's function over the attributes of this object.
int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
+ // Returns the object header version of an object
+ unsigned objVersion() const;
+
// Determines the number of attributes belong to this object.
int getNumAttrs() const;
@@ -106,12 +109,12 @@ class H5_DLLCPP H5Object : public H5Location {
// Default constructor
H5Object();
- // *** Deprecation warning ***
- // The following two constructors are no longer appropriate after the
- // data member "id" had been moved to the sub-classes.
- // The copy constructor is a noop and is removed in 1.8.15 and the
- // other will be removed from 1.10 release, and then from 1.8 if its
- // removal does not raise any problems in two 1.10 releases.
+ // *** Deprecation warning ***
+ // The following two constructors are no longer appropriate after the
+ // data member "id" had been moved to the sub-classes.
+ // The copy constructor is a noop and is removed in 1.8.15 and the
+ // other will be removed from 1.10 release, and then from 1.8 if its
+ // removal does not raise any problems in two 1.10 releases.
// Creates a copy of an existing object giving the object id
H5Object( const hid_t object_id );
@@ -119,9 +122,9 @@ class H5_DLLCPP H5Object : public H5Location {
// Copy constructor: makes copy of an H5Object object.
// H5Object(const H5Object& original);
- // Sets the identifier of this object to a new value. - this one
- // doesn't increment reference count
- virtual void p_setId(const hid_t new_id) = 0;
+ // Sets the identifier of this object to a new value. - this one
+ // doesn't increment reference count
+ virtual void p_setId(const hid_t new_id) = 0;
// Noop destructor.
virtual ~H5Object();
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index 0711020..e2eed18 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -21,6 +21,7 @@
#include "H5PropList.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index ca0ad56..50c9e45 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -22,6 +22,7 @@
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5DxferProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index e14e1ce..5ecc39b 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -21,6 +21,7 @@
#include "H5PropList.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
+#include "H5LaccProp.h"
#include "H5Location.h"
#include "H5Object.h"
#include "H5DataType.h"
diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am
index 6cd4768..6274f7b 100644
--- a/c++/src/Makefile.am
+++ b/c++/src/Makefile.am
@@ -33,25 +33,28 @@ libhdf5_cpp_la_LDFLAGS= -version-info $(LT_CXX_VERS_INTERFACE):$(LT_CXX_VERS_REV
bin_SCRIPTS=h5c++
# Source files for the library
-libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp H5Library.cpp \
- H5Attribute.cpp H5Location.cpp H5Object.cpp H5PropList.cpp \
- H5FaccProp.cpp H5FcreatProp.cpp H5DcreatProp.cpp H5DxferProp.cpp \
- H5OcreatProp.cpp H5DataType.cpp H5DataSpace.cpp H5AbstractDs.cpp \
- H5AtomType.cpp H5PredType.cpp H5EnumType.cpp H5IntType.cpp \
- H5FloatType.cpp H5StrType.cpp H5ArrayType.cpp H5VarLenType.cpp \
- H5CompType.cpp H5DataSet.cpp H5CommonFG.cpp H5Group.cpp H5File.cpp
+libhdf5_cpp_la_SOURCES=H5Exception.cpp H5IdComponent.cpp \
+ H5DataSpace.cpp H5PropList.cpp H5Library.cpp \
+ H5FaccProp.cpp H5FcreatProp.cpp H5LaccProp.cpp \
+ H5DxferProp.cpp H5DcreatProp.cpp H5Location.cpp \
+ H5AbstractDs.cpp H5Attribute.cpp H5Object.cpp \
+ H5OcreatProp.cpp H5DataType.cpp H5AtomType.cpp \
+ H5PredType.cpp H5EnumType.cpp H5IntType.cpp \
+ H5FloatType.cpp H5StrType.cpp H5ArrayType.cpp \
+ H5VarLenType.cpp H5CompType.cpp H5DataSet.cpp \
+ H5CommonFG.cpp H5Group.cpp H5File.cpp
# HDF5 C++ library depends on HDF5 Library.
libhdf5_cpp_la_LIBADD=$(LIBHDF5)
# Public headers
include_HEADERS=H5Cpp.h H5AbstractDs.h H5AtomType.h H5Attribute.h H5Classes.h \
- H5CommonFG.h H5CompType.h H5DataSet.h H5DataSpace.h H5DataType.h \
- H5OcreatProp.h H5DcreatProp.h H5DxferProp.h H5EnumType.h \
+ H5CommonFG.h H5CompType.h H5DataSet.h H5DataSpace.h H5DataType.h \
+ H5OcreatProp.h H5DcreatProp.h H5DxferProp.h H5EnumType.h \
H5Exception.h H5FaccProp.h H5FcreatProp.h H5File.h H5FloatType.h \
- H5Group.h H5IdComponent.h H5Include.h H5IntType.h H5Library.h \
- H5Location.h H5Object.h H5PredType.h H5PropList.h H5StrType.h \
- H5CppDoc.h H5ArrayType.h H5VarLenType.h
+ H5Group.h H5IdComponent.h H5Include.h H5IntType.h H5LaccProp.h \
+ H5Library.h H5Location.h H5Object.h H5PredType.h H5PropList.h \
+ H5StrType.h H5CppDoc.h H5ArrayType.h H5VarLenType.h
# h5c++ and libhdf5.settings are generated during configure. Remove only when
# distclean.
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index 47b9a85..c7ed933 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -674,8 +674,8 @@ static void test_libver_bounds_real(
*/
Group group = file.createGroup(GROUP1);
- obj_version = file.childObjVersion(GROUP1);
- verify_val(obj_version, oh_vers_mod, "H5File::childObjVersion", __LINE__, __FILE__);
+ obj_version = group.objVersion();
+ verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__);
group.close(); // close "/G1"
@@ -685,8 +685,8 @@ static void test_libver_bounds_real(
*/
group = file.createGroup(SUBGROUP3);
- obj_version = group.childObjVersion(SUBGROUP3);
- verify_val(obj_version, oh_vers_mod, "H5File::childObjVersion", __LINE__, __FILE__);
+ obj_version = group.objVersion();
+ verify_val(obj_version, oh_vers_mod, "Group::objVersion", __LINE__, __FILE__);
group.close(); // close "/G1/G3"
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index 1f7d14e..3acf4e1 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -419,10 +419,10 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format)
H5File file(filename, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl);
// Verify link existence
- if(H5Lexists(file.getId(), "dset1", H5P_DEFAULT) != TRUE)
- throw InvalidActionException("H5Lexists", "dset1 doesn't exist");
- if(H5Lexists(file.getId(), "grp1/soft", H5P_DEFAULT) != TRUE)
- throw InvalidActionException("H5Lexists", "grp1/soft doesn't exist");
+ if(file.exists("dset1", LinkAccPropList::DEFAULT) != TRUE)
+ throw InvalidActionException("H5File::exists", "dset1 doesn't exist");
+ if(file.exists("grp1/soft", LinkAccPropList::DEFAULT) != TRUE)
+ throw InvalidActionException("H5File::exists", "grp1/soft doesn't exist");
// Verify link values
H5std_string softlink_val = file.getLinkval("grp1/soft");
diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp
index e142f02..325b2b0 100644
--- a/c++/test/tobject.cpp
+++ b/c++/test/tobject.cpp
@@ -41,16 +41,26 @@ const H5std_string GROUP1_2_PATH("/Top Group/Sub-Group 1.2");
const H5std_string DSET_DEFAULT_NAME("default");
const H5std_string DSET_IN_FILE("Dataset in File");
const H5std_string DSET_IN_FILE_PATH("/Dataset in File");
-const H5std_string DSET_IN_GRP1("Dataset in Group 1");
-const H5std_string DSET_IN_GRP1_PATH("/Top Group/Dataset in Group 1");
-const H5std_string DSET_IN_GRP1_2("Dataset in Group 1.2");
-const H5std_string DSET_IN_GRP1_2_PATH("/Top Group/Sub-Group 1.2/Dataset in Group 1.2");
+const H5std_string DSET_IN_GRP1("Dataset_in_Group_1");
+const H5std_string DSET_IN_GRP1_PATH("/Top Group/Dataset_in_Group_1");
+const H5std_string DSET_IN_GRP1_2("Dataset_in_Group_1.2");
+const H5std_string DSET_IN_GRP1_2_PATH("/Top Group/Sub-Group 1.2/Dataset_in_Group_1.2");
/*-------------------------------------------------------------------------
* Function: test_get_objname
*
* Purpose: Tests getting object name of groups and datasets.
*
+ * Description:
+ * File structure:
+ * GROUP1
+ * GROUP1_1
+ * GROUP1_2
+ * DSET_IN_GRP1_2
+ * DSET_IN_GRP1
+ * DSET_IN_FILE
+ *
+ *
* Return: Success: 0
* Failure: -1
*
@@ -145,6 +155,82 @@ static void test_get_objname()
} // test_get_objname
/*-------------------------------------------------------------------------
+ * Function: test_existance
+ *
+ * Purpose: Tests getting object name of groups and datasets.
+ *
+ * Description:
+ * File structure:
+ * GROUP1
+ * GROUP1_1
+ * GROUP1_2
+ * DSET_IN_GRP1_2
+ * DSET_IN_GRP1
+ * DSET_IN_FILE
+ *
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Binh-Minh Ribler
+ * Friday, March 4, 2014
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void test_existance()
+{
+ SUBTEST("H5File::exists and Group::exists");
+
+ try {
+ // Open file
+ H5File file(FILE_OBJECTS, H5F_ACC_RDONLY);
+
+ // Check if GROUP1 exists in the file
+ bool exists = file.exists(GROUP1);
+
+ // Open GROUP1
+ Group grp1 = file.openGroup(GROUP1);
+
+ // Check if GROUP1_1 and GROUP1_2 exist in GROUP1
+ exists = grp1.exists(GROUP1_1);
+ verify_val(exists, TRUE, "Group::exists GROUP1_1", __LINE__, __FILE__);
+ exists = grp1.exists(GROUP1_2);
+ verify_val(exists, TRUE, "Group::exists GROUP1_2", __LINE__, __FILE__);
+
+ // Check if DSET_IN_GRP1 exists in GROUP1
+ exists = grp1.exists(DSET_IN_GRP1);
+ verify_val(exists, TRUE, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);
+
+ // Open GROUP1_2
+ Group grp1_2 = grp1.openGroup(GROUP1_2);
+
+ // Check if DSET_IN_GRP1_2 exists in GROUP1_2
+ exists = grp1_2.exists(DSET_IN_GRP1_2);
+ verify_val(exists, TRUE, "Group::exists DSET_IN_GRP1_2", __LINE__, __FILE__);
+
+ // Check if a dataset exists given dataset as location with full path name
+ DataSet dset1 = file.openDataSet(DSET_IN_FILE);
+ exists = dset1.exists("/Top Group/Dataset_in_Group_1");
+ verify_val(exists, TRUE, "Group::exists given dataset with full path name", __LINE__, __FILE__);
+
+ exists = grp1_2.exists(DSET_IN_GRP1);
+ verify_val(exists, FALSE, "Group::exists DSET_IN_GRP1", __LINE__, __FILE__);
+
+ // Everything will be closed as they go out of scope
+
+ PASSED();
+ } // try block
+
+ // catch all other exceptions
+ catch (Exception& E)
+ {
+ issue_fail_msg("test_existance", __LINE__, __FILE__);
+ }
+} // test_existance
+
+/*-------------------------------------------------------------------------
* Function: test_get_objname_ontypes
*
* Purpose: Test getting object name from various committed types.
@@ -176,21 +262,20 @@ static void test_get_objname_ontypes()
// Close the type then open it again to test getting its name
inttype.close();
- inttype = file.openIntType("INT type of STD_B8LE");
+ inttype = file.openIntType("INT type of STD_B8LE"); // deprecated
// Get and verify its name
H5std_string inttype_name = inttype.getObjName();
verify_val(inttype_name, "/INT type of STD_B8LE", "DataType::getObjName", __LINE__, __FILE__);
- // Close the type then open it again to test getting its name with
- // the constructor
+ // Close the type then open it again to test getting its name, but
+ // with the constructor this time
inttype.close();
- IntType newtype(file, "INT type of STD_B8LE");
+ IntType std_b8le(file, "INT type of STD_B8LE");
// Get and verify its name
- H5std_string type_name = newtype.getObjName();
- verify_val(type_name, "/INT type of STD_B8LE", "DataType::getObjName tests constructor", __LINE__, __FILE__);
- newtype.close();
+ H5std_string std_b8le_name = std_b8le.getObjName();
+ verify_val(std_b8le_name, "/INT type of STD_B8LE", "DataType::getObjName", __LINE__, __FILE__);
// Make copy of a predefined type and save it
DataType dtype(PredType::STD_B8LE);
@@ -202,22 +287,22 @@ static void test_get_objname_ontypes()
// Re-open the file and the data type to test getting its name
file.openFile(FILE_OBJECTS, H5F_ACC_RDWR);
- dtype = file.openDataType("STD_B8LE");
+ dtype = file.openDataType("STD_B8LE"); // deprecated
// Get and verify its name
- type_name = dtype.getObjName();
+ H5std_string type_name = dtype.getObjName();
verify_val(type_name, "/STD_B8LE", "DataType::getObjName", __LINE__, __FILE__);
- // Repeat the test with openDataType's replacement
+ // Close the type and open it again with the constructor then test
+ // getting its name
+ dtype.close();
DataType dtype2(file, "STD_B8LE");
-
- // Get and verify its name
type_name = dtype2.getObjName();
verify_val(type_name, "/STD_B8LE", "DataType::getObjName", __LINE__, __FILE__);
// Test getting type's name from copied type
DataType copied_type;
- copied_type.copy(dtype);
+ copied_type.copy(dtype2);
copied_type.commit(file, "copy of STD_B8LE");
type_name = copied_type.getObjName();
verify_val(type_name, "/copy of STD_B8LE", "DataType::getObjName", __LINE__, __FILE__);
@@ -232,7 +317,7 @@ static void test_get_objname_ontypes()
verify_val(type_name, "/typetests/IntType NATIVE_INT", "DataType::getObjName", __LINE__, __FILE__);
// Close everything or they can be closed when objects go out of scope
- dtype.close();
+ dtype2.close();
copied_type.close();
new_int_type.close();
grp.close();
@@ -333,6 +418,7 @@ void test_object()
MESSAGE(5, ("Testing Object Functions\n"));
test_get_objname(); // Test get object name from groups/datasets
+ test_existance(); // Test check for object existance
test_get_objname_ontypes(); // Test get object name from types
test_get_objtype(); // Test get object type
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 1ef7bdd..6605c03 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -257,28 +257,35 @@ static void test_query()
tid2.close();
// Open the datatypes for query
+
+ // Deprecated functions
tid1 = file.openCompType(CompT_NAME);
+ tid1.close();
tid2 = file.openEnumType(EnumT_NAME);
+ tid2.close();
+
+ CompType comptype(file, CompT_NAME);
+ EnumType enumtype(file, EnumT_NAME);
// Query member number and member index by name, for compound type
- nmembs = tid1.getNmembers();
+ nmembs = comptype.getNmembers();
verify_val(nmembs, 4, "CompType::getNmembers()", __LINE__, __FILE__);
- index = tid1.getMemberIndex("c");
+ index = comptype.getMemberIndex("c");
verify_val(index, 2, "CompType::getMemberIndex()", __LINE__, __FILE__);
// Query member number and member index by name, for enumeration type
- nmembs = tid2.getNmembers();
+ nmembs = enumtype.getNmembers();
verify_val(nmembs, 5, "EnumType::getNmembers()", __LINE__, __FILE__);
- index = tid2.getMemberIndex("ORANGE");
+ index = enumtype.getMemberIndex("ORANGE");
verify_val(index, 3, "EnumType::getMemberIndex()", __LINE__, __FILE__);
// Close datatypes and file
- tid1.close();
- tid2.close();
+ comptype.close();
+ enumtype.close();
file.close();
// Try truncating the file to make sure reference counting is good.
- // If any references to ids of tid1 and tid2 are left unterminated,
+ // If any references to ids of the accessed types are left unterminated,
// the truncating will fail, because the file will not be closed in
// the file.close() above.
H5File file1(FILENAME[2], H5F_ACC_TRUNC);
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index d39d092..43dcc0b 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -479,10 +479,14 @@ static void test_vlstring_type()
vlst.close();
// Try opening datatype again.
- vlst = file1->openStrType(VLSTR_TYPE);
+ vlst = file1->openStrType(VLSTR_TYPE); // deprecated
- // Close datatype and file.
+ // Close again and reopen with constructor.
vlst.close();
+ StrType vlst1(*file1, VLSTR_TYPE);
+
+ // Close datatype and file.
+ vlst1.close();
file1->close();
delete file1;
@@ -490,16 +494,16 @@ static void test_vlstring_type()
file1 = new H5File(FILENAME, H5F_ACC_RDWR);
// Open the variable-length string datatype just created
- vlst = file1->openStrType(VLSTR_TYPE);
+ StrType vlst2(*file1, VLSTR_TYPE);
// Verify character set and padding
- cset = vlst.getCset();
+ cset = vlst2.getCset();
verify_val(cset, H5T_CSET_ASCII, "StrType::getCset", __LINE__, __FILE__);
- pad = vlst.getStrpad();
+ pad = vlst2.getStrpad();
verify_val(pad, H5T_STR_NULLPAD, "StrType::getStrpad", __LINE__, __FILE__);
// Close datatype and file
- vlst.close();
+ vlst2.close();
file1->close();
PASSED();