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)
This commit is contained in:
Binh-Minh Ribler
2016-12-19 00:34:18 -06:00
parent 700c6ae985
commit 798cdad29a
38 changed files with 944 additions and 416 deletions
+15 -1
View File
@@ -34,6 +34,7 @@ using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
const H5std_string FILENAME("tarray.h5");
const H5std_string ARRAYTYPE_NAME("/Array type 1");
const int SPACE1_RANK = 1;
const hsize_t SPACE1_DIM1 = 4;
const int ARRAY1_RANK = 1;
@@ -130,9 +131,22 @@ static void test_array_compound_array()
// Write dataset to disk
dataset.write(wdata, arrtype);
// Test opening ArrayType with opening constructor (Dec 2016)
// Commit the arrtype to give it a name
arrtype.commit(file1, ARRAYTYPE_NAME);
// Close it, then re-open with the opening constructor
arrtype.close();
ArrayType named_type(file1, ARRAYTYPE_NAME);
// Get and verify the type's name
H5std_string type_name = named_type.getObjName();
verify_val(type_name, ARRAYTYPE_NAME, "DataType::getObjName tests constructor", __LINE__, __FILE__);
named_type.close();
// Close all
dataset.close();
arrtype.close();
space.close();
file1.close();