summaryrefslogtreecommitdiffstats
path: root/src/H5Pint.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-07-16 16:15:43 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-10-08 19:30:24 (GMT)
commitae490016b9659d4e31e0e242d0653daf02b7c83c (patch)
treee057dde8bb12749d9ae3ed8e4b7ddc3b63fd0ff2 /src/H5Pint.c
parent0f4e080309d09a5f0d6911efce064ee487a759be (diff)
downloadhdf5-ae490016b9659d4e31e0e242d0653daf02b7c83c.zip
hdf5-ae490016b9659d4e31e0e242d0653daf02b7c83c.tar.gz
hdf5-ae490016b9659d4e31e0e242d0653daf02b7c83c.tar.bz2
Add new H5R API that abstracts object, region and attribute reference types
Also support references to external files Add new H5T_REF type and type conversion routines Support conversion from H5T_REF_OBJ/DSET_REG to H5T_REF Add H5Treclaim() API to reclaim memory of vlen/reference types Deprecate H5Dvlen_reclaim() Fix H5T_vlen_reclaim() and H5T_reclaim() to use private callback Add H5T_ref_reclaim() Move previous H5R APIs to H5Rdeprec.c Clean up H5Ocopy Separate H5O_copy_expand_ref() to H5Ocopy_ref() Add support for copying new reference types Clean up deprecated routines to go through VOL and same code path Fix return codes in existing trefer.c test Rename trefer.c to trefer_deprec.c trefer.c is for new references Add performance test for trefer Add additional obj_copy_ref test Make use of tokens and blobs to store references Skip blob encoding for object references Start adding new reference examples
Diffstat (limited to 'src/H5Pint.c')
-rw-r--r--src/H5Pint.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 36367d7..2911eef 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -169,6 +169,8 @@ hid_t H5P_CLS_STRING_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_STRING_CREATE_g = NULL;
hid_t H5P_CLS_VOL_INITIALIZE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_VOL_INITIALIZE_g = NULL;
+hid_t H5P_CLS_REFERENCE_ACCESS_ID_g = H5I_INVALID_HID;
+H5P_genclass_t *H5P_CLS_REFERENCE_ACCESS_g = NULL;
/*
* Predefined property lists for each predefined class. These are initialized
@@ -192,6 +194,7 @@ hid_t H5P_LST_OBJECT_COPY_ID_g = H5I_INVALID_HID;
hid_t H5P_LST_LINK_CREATE_ID_g = H5I_INVALID_HID;
hid_t H5P_LST_LINK_ACCESS_ID_g = H5I_INVALID_HID;
hid_t H5P_LST_VOL_INITIALIZE_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_REFERENCE_ACCESS_ID_g = H5I_INVALID_HID;
/* Root property list class library initialization object */
const H5P_libclass_t H5P_CLS_ROOT[1] = {{
@@ -312,6 +315,25 @@ const H5P_libclass_t H5P_CLS_VINI[1] = {{
NULL /* Class close callback info */
}};
+/* Reference access property list class library initialization object */
+/* (move to proper source code file when used for real) */
+const H5P_libclass_t H5P_CLS_RACC[1] = {{
+ "reference access", /* Class name for debugging */
+ H5P_TYPE_REFERENCE_ACCESS, /* Class type */
+
+ &H5P_CLS_FILE_ACCESS_g, /* Parent class */
+ &H5P_CLS_REFERENCE_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_REFERENCE_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_REFERENCE_ACCESS_ID_g, /* Pointer to default property list ID */
+ NULL, /* Default property registration routine*/
+
+ NULL, /* Class creation callback */
+ NULL, /* Class creation callback info */
+ NULL, /* Class copy callback */
+ NULL, /* Class copy callback info */
+ NULL, /* Class close callback */
+ NULL /* Class close callback info */
+}};
/* Library property list classes defined in other code modules */
/* (And not present in src/H5Pprivate.h) */
@@ -364,7 +386,8 @@ static H5P_libclass_t const * const init_class[] = {
H5P_CLS_ACRT, /* Attribute creation */
H5P_CLS_AACC, /* Attribute access */
H5P_CLS_LCRT, /* Link creation */
- H5P_CLS_VINI /* VOL initialization */
+ H5P_CLS_VINI, /* VOL initialization */
+ H5P_CLS_RACC /* Reference access */
};
/* Declare a free list to manage the H5P_genclass_t struct */
@@ -440,7 +463,7 @@ H5P__init_package(void)
FUNC_ENTER_PACKAGE
/* Sanity check */
- HDcompile_assert(H5P_TYPE_MAP_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
+ HDcompile_assert(H5P_TYPE_REFERENCE_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
/*
* Initialize the Generic Property class & object groups.
@@ -564,6 +587,7 @@ H5P_term_package(void)
H5P_LST_LINK_CREATE_ID_g =
H5P_LST_LINK_ACCESS_ID_g =
H5P_LST_VOL_INITIALIZE_ID_g =
+ H5P_LST_REFERENCE_ACCESS_ID_g =
H5P_LST_FILE_MOUNT_ID_g = H5I_INVALID_HID;
} /* end if */
} /* end if */
@@ -594,6 +618,7 @@ H5P_term_package(void)
H5P_CLS_LINK_CREATE_g =
H5P_CLS_LINK_ACCESS_g =
H5P_CLS_VOL_INITIALIZE_g =
+ H5P_CLS_REFERENCE_ACCESS_g =
H5P_CLS_FILE_MOUNT_g = NULL;
H5P_CLS_ROOT_ID_g =
@@ -616,6 +641,7 @@ H5P_term_package(void)
H5P_CLS_LINK_CREATE_ID_g =
H5P_CLS_LINK_ACCESS_ID_g =
H5P_CLS_VOL_INITIALIZE_ID_g =
+ H5P_CLS_REFERENCE_ACCESS_ID_g =
H5P_CLS_FILE_MOUNT_ID_g = H5I_INVALID_HID;
} /* end if */
} /* end if */
@@ -5453,8 +5479,8 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDcompile_assert(H5P_TYPE_MAP_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
- HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_MAP_ACCESS);
+ HDcompile_assert(H5P_TYPE_REFERENCE_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
+ HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_REFERENCE_ACCESS);
/* Check arguments */
if(type == H5P_TYPE_USER)
@@ -5544,6 +5570,10 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
class_id = H5P_CLS_VOL_INITIALIZE_ID_g;
break;
+ case H5P_TYPE_REFERENCE_ACCESS:
+ class_id = H5P_CLS_REFERENCE_ACCESS_ID_g;
+ break;
+
case H5P_TYPE_USER: /* shut compiler warnings up */
case H5P_TYPE_ROOT:
case H5P_TYPE_MAX_TYPE: