mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r14202] Description:
Move H5Pregister our of old "compat v1.6" section and add it to the versioned symbols. Add simple regression test for H5Pregister1() Split H5P.c source file into H5P/H5Pint/H5Pdeprec files. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
This commit is contained in:
parent
8e4bcb5fee
commit
e5413fa795
2
MANIFEST
2
MANIFEST
@ -628,11 +628,13 @@
|
||||
./src/H5P.c
|
||||
./src/H5Pacpl.c
|
||||
./src/H5Pdcpl.c
|
||||
./src/H5Pdeprec.c
|
||||
./src/H5Pdxpl.c
|
||||
./src/H5Pfapl.c
|
||||
./src/H5Pfcpl.c
|
||||
./src/H5Pfmpl.c
|
||||
./src/H5Pgcpl.c
|
||||
./src/H5Pint.c
|
||||
./src/H5Plapl.c
|
||||
./src/H5Plcpl.c
|
||||
./src/H5Pocpl.c
|
||||
|
@ -2278,7 +2278,7 @@ nh5pregisterc_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, _fcd
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Name: h5pregister_c
|
||||
* Purpose: Call H5Pregister to registers a permanent property
|
||||
* Purpose: Call H5Pregister2 to registers a permanent property
|
||||
* Inputs: class - property list class identifier
|
||||
* name - name of the new property
|
||||
* name_len - length of the "name" buffer
|
||||
@ -2292,24 +2292,22 @@ nh5pregisterc_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, _fcd
|
||||
int_f
|
||||
nh5pregister_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, void UNUSED *value)
|
||||
{
|
||||
char* c_name = NULL;
|
||||
int_f ret_value = -1;
|
||||
hid_t c_class;
|
||||
char* c_name;
|
||||
size_t c_size;
|
||||
|
||||
c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
|
||||
if (c_name == NULL) goto DONE;
|
||||
c_size = (size_t)*size;
|
||||
c_class = (hid_t)*class;
|
||||
if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
|
||||
goto DONE;
|
||||
|
||||
/*
|
||||
* Call H5Pregister function.
|
||||
* Call H5Pregister2 function.
|
||||
*/
|
||||
if( H5Pregister(c_class, c_name, c_size, value, NULL,NULL,NULL,NULL,NULL,NULL,NULL) <0) goto DONE;
|
||||
if(H5Pregister2((hid_t)*class, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
|
||||
goto DONE;
|
||||
ret_value = 0;
|
||||
|
||||
DONE:
|
||||
if(c_name != NULL) HDfree(c_name);
|
||||
if(c_name != NULL)
|
||||
HDfree(c_name);
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
|
276
src/H5Pdeprec.c
Normal file
276
src/H5Pdeprec.c
Normal file
@ -0,0 +1,276 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* 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. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Created: H5Pdeprec.c
|
||||
* October 11 2007
|
||||
* Quincey Koziol <koziol@hdfgroup.org>
|
||||
*
|
||||
* Purpose: Deprecated functions from the H5P interface. These
|
||||
* functions are here for compatibility purposes and may be
|
||||
* removed in the future. Applications should switch to the
|
||||
* newer APIs.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* Module Setup */
|
||||
/****************/
|
||||
|
||||
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
|
||||
|
||||
/* Interface initialization */
|
||||
#define H5_INTERFACE_INIT_FUNC H5P_init_deprec_interface
|
||||
|
||||
|
||||
/***********/
|
||||
/* Headers */
|
||||
/***********/
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5Ppkg.h" /* Property lists */
|
||||
|
||||
|
||||
/****************/
|
||||
/* Local Macros */
|
||||
/****************/
|
||||
|
||||
|
||||
/******************/
|
||||
/* Local Typedefs */
|
||||
/******************/
|
||||
|
||||
|
||||
/********************/
|
||||
/* Package Typedefs */
|
||||
/********************/
|
||||
|
||||
|
||||
/********************/
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
/*********************/
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Library Private Variables */
|
||||
/*****************************/
|
||||
|
||||
|
||||
/*******************/
|
||||
/* Local Variables */
|
||||
/*******************/
|
||||
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5P_init_deprec_interface -- Initialize interface-specific information
|
||||
USAGE
|
||||
herr_t H5P_init_deprec_interface()
|
||||
RETURNS
|
||||
Non-negative on success/Negative on failure
|
||||
DESCRIPTION
|
||||
Initializes any interface-specific data or routines. (Just calls
|
||||
H5P_init() currently).
|
||||
|
||||
--------------------------------------------------------------------------*/
|
||||
static herr_t
|
||||
H5P_init_deprec_interface(void)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_init_deprec_interface)
|
||||
|
||||
FUNC_LEAVE_NOAPI(H5P_init())
|
||||
} /* H5P_init_deprec_interface() */
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5Pregister1
|
||||
PURPOSE
|
||||
Routine to register a new property in a property list class.
|
||||
USAGE
|
||||
herr_t H5Pregister1(class, name, size, default, prp_create, prp_set, prp_get, prp_close)
|
||||
hid_t class; IN: Property list class to close
|
||||
const char *name; IN: Name of property to register
|
||||
size_t size; IN: Size of property in bytes
|
||||
void *def_value; IN: Pointer to buffer containing default value
|
||||
for property in newly created property lists
|
||||
H5P_prp_create_func_t prp_create; IN: Function pointer to property
|
||||
creation callback
|
||||
H5P_prp_set_func_t prp_set; IN: Function pointer to property set callback
|
||||
H5P_prp_get_func_t prp_get; IN: Function pointer to property get callback
|
||||
H5P_prp_delete_func_t prp_delete; IN: Function pointer to property delete callback
|
||||
H5P_prp_copy_func_t prp_copy; IN: Function pointer to property copy callback
|
||||
H5P_prp_close_func_t prp_close; IN: Function pointer to property close
|
||||
callback
|
||||
RETURNS
|
||||
Returns non-negative on success, negative on failure.
|
||||
DESCRIPTION
|
||||
Registers a new property with a property list class. The property will
|
||||
exist in all property list objects of that class after this routine is
|
||||
finished. The name of the property must not already exist. The default
|
||||
property value must be provided and all new property lists created with this
|
||||
property will have the property value set to the default provided. Any of
|
||||
the callback routines may be set to NULL if they are not needed.
|
||||
|
||||
Zero-sized properties are allowed and do not store any data in the
|
||||
property list. These may be used as flags to indicate the presence or
|
||||
absence of a particular piece of information. The 'default' pointer for a
|
||||
zero-sized property may be set to NULL. The property 'create' & 'close'
|
||||
callbacks are called for zero-sized properties, but the 'set' and 'get'
|
||||
callbacks are never called.
|
||||
|
||||
The 'create' callback is called when a new property list with this
|
||||
property is being created. H5P_prp_create_func_t is defined as:
|
||||
typedef herr_t (*H5P_prp_create_func_t)(hid_t prop_id, const char *name,
|
||||
size_t size, void *initial_value);
|
||||
where the parameters to the callback function are:
|
||||
hid_t prop_id; IN: The ID of the property list being created.
|
||||
const char *name; IN: The name of the property being modified.
|
||||
size_t size; IN: The size of the property value
|
||||
void *initial_value; IN/OUT: The initial value for the property being created.
|
||||
(The 'default' value passed to H5Pregister1)
|
||||
The 'create' routine may modify the value to be set and those changes will
|
||||
be stored as the initial value of the property. If the 'create' routine
|
||||
returns a negative value, the new property value is not copied into the
|
||||
property and the property list creation routine returns an error value.
|
||||
|
||||
The 'set' callback is called before a new value is copied into the
|
||||
property. H5P_prp_set_func_t is defined as:
|
||||
typedef herr_t (*H5P_prp_set_func_t)(hid_t prop_id, const char *name,
|
||||
size_t size, void *value);
|
||||
where the parameters to the callback function are:
|
||||
hid_t prop_id; IN: The ID of the property list being modified.
|
||||
const char *name; IN: The name of the property being modified.
|
||||
size_t size; IN: The size of the property value
|
||||
void *new_value; IN/OUT: The value being set for the property.
|
||||
The 'set' routine may modify the value to be set and those changes will be
|
||||
stored as the value of the property. If the 'set' routine returns a
|
||||
negative value, the new property value is not copied into the property and
|
||||
the property list set routine returns an error value.
|
||||
|
||||
The 'get' callback is called before a value is retrieved from the
|
||||
property. H5P_prp_get_func_t is defined as:
|
||||
typedef herr_t (*H5P_prp_get_func_t)(hid_t prop_id, const char *name,
|
||||
size_t size, void *value);
|
||||
where the parameters to the callback function are:
|
||||
hid_t prop_id; IN: The ID of the property list being queried.
|
||||
const char *name; IN: The name of the property being queried.
|
||||
size_t size; IN: The size of the property value
|
||||
void *value; IN/OUT: The value being retrieved for the property.
|
||||
The 'get' routine may modify the value to be retrieved and those changes
|
||||
will be returned to the calling function. If the 'get' routine returns a
|
||||
negative value, the property value is returned and the property list get
|
||||
routine returns an error value.
|
||||
|
||||
The 'delete' callback is called when a property is deleted from a
|
||||
property list. H5P_prp_del_func_t is defined as:
|
||||
typedef herr_t (*H5P_prp_del_func_t)(hid_t prop_id, const char *name,
|
||||
size_t size, void *value);
|
||||
where the parameters to the callback function are:
|
||||
hid_t prop_id; IN: The ID of the property list the property is deleted from.
|
||||
const char *name; IN: The name of the property being deleted.
|
||||
size_t size; IN: The size of the property value
|
||||
void *value; IN/OUT: The value of the property being deleted.
|
||||
The 'delete' routine may modify the value passed in, but the value is not
|
||||
used by the library when the 'delete' routine returns. If the
|
||||
'delete' routine returns a negative value, the property list deletion
|
||||
routine returns an error value but the property is still deleted.
|
||||
|
||||
The 'copy' callback is called when a property list with this
|
||||
property is copied. H5P_prp_copy_func_t is defined as:
|
||||
typedef herr_t (*H5P_prp_copy_func_t)(const char *name, size_t size,
|
||||
void *value);
|
||||
where the parameters to the callback function are:
|
||||
const char *name; IN: The name of the property being copied.
|
||||
size_t size; IN: The size of the property value
|
||||
void *value; IN: The value of the property being copied.
|
||||
The 'copy' routine may modify the value to be copied and those changes will be
|
||||
stored as the value of the property. If the 'copy' routine returns a
|
||||
negative value, the new property value is not copied into the property and
|
||||
the property list copy routine returns an error value.
|
||||
|
||||
The 'close' callback is called when a property list with this
|
||||
property is being destroyed. H5P_prp_close_func_t is defined as:
|
||||
typedef herr_t (*H5P_prp_close_func_t)(const char *name, size_t size,
|
||||
void *value);
|
||||
where the parameters to the callback function are:
|
||||
const char *name; IN: The name of the property being closed.
|
||||
size_t size; IN: The size of the property value
|
||||
void *value; IN: The value of the property being closed.
|
||||
The 'close' routine may modify the value passed in, but the value is not
|
||||
used by the library when the 'close' routine returns. If the
|
||||
'close' routine returns a negative value, the property list close
|
||||
routine returns an error value but the property list is still closed.
|
||||
|
||||
GLOBAL VARIABLES
|
||||
COMMENTS, BUGS, ASSUMPTIONS
|
||||
The 'set' callback function may be useful to range check the value being
|
||||
set for the property or may perform some tranformation/translation of the
|
||||
value set. The 'get' callback would then [probably] reverse the
|
||||
transformation, etc. A single 'get' or 'set' callback could handle
|
||||
multiple properties by performing different actions based on the property
|
||||
name or other properties in the property list.
|
||||
|
||||
I would like to say "the property list is not closed" when a 'close'
|
||||
routine fails, but I don't think that's possible due to other properties in
|
||||
the list being successfully closed & removed from the property list. I
|
||||
suppose that it would be possible to just remove the properties which have
|
||||
successful 'close' callbacks, but I'm not happy with the ramifications
|
||||
of a mangled, un-closable property list hanging around... Any comments? -QAK
|
||||
|
||||
EXAMPLES
|
||||
REVISION LOG
|
||||
--------------------------------------------------------------------------*/
|
||||
herr_t
|
||||
H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value,
|
||||
H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
|
||||
H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete,
|
||||
H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close)
|
||||
{
|
||||
H5P_genclass_t *pclass; /* Property list class to modify */
|
||||
herr_t ret_value; /* return value */
|
||||
|
||||
FUNC_ENTER_API(H5Pregister1, FAIL);
|
||||
H5TRACE10("e","iszxxxxxxx",cls_id,name,size,def_value,prp_create,prp_set,
|
||||
prp_get,prp_delete,prp_copy,prp_close);
|
||||
|
||||
/* Check arguments. */
|
||||
if(NULL == (pclass = H5I_object_verify(cls_id, H5I_GENPROP_CLS)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class");
|
||||
if(!name || !*name)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid class name");
|
||||
if(size > 0 && def_value == NULL)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default");
|
||||
|
||||
/* Create the new property list class */
|
||||
if((ret_value = H5P_register(pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_delete, prp_copy, NULL, prp_close)) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in class");
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value);
|
||||
} /* H5Pregister1() */
|
||||
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
4448
src/H5Pint.c
Normal file
4448
src/H5Pint.c
Normal file
File diff suppressed because it is too large
Load Diff
20
src/H5Ppkg.h
20
src/H5Ppkg.h
@ -154,11 +154,29 @@ H5_DLL H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class,
|
||||
H5P_cls_create_func_t cls_create, void *create_data,
|
||||
H5P_cls_copy_func_t cls_copy, void *copy_data,
|
||||
H5P_cls_close_func_t cls_close, void *close_data);
|
||||
H5_DLL H5P_genclass_t *H5P_copy_pclass(H5P_genclass_t *pclass);
|
||||
H5_DLL herr_t H5P_add_prop(H5SL_t *props, H5P_genprop_t *prop);
|
||||
H5_DLL herr_t H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod);
|
||||
H5_DLL htri_t H5P_exist_pclass(H5P_genclass_t *pclass, const char *name);
|
||||
H5_DLL herr_t H5P_get_size_plist(H5P_genplist_t *plist, const char *name,
|
||||
size_t *size);
|
||||
H5_DLL herr_t H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name,
|
||||
size_t *size);
|
||||
H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
|
||||
H5_DLL herr_t H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops);
|
||||
H5_DLL int H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
|
||||
H5_DLL int H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2);
|
||||
H5_DLL int H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func,
|
||||
void *iter_data);
|
||||
H5_DLL int H5P_iterate_pclass(hid_t pclass_id, int *idx, H5P_iterate_t iter_func,
|
||||
void *iter_data);
|
||||
H5_DLL herr_t H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name);
|
||||
H5_DLL herr_t H5P_copy_prop_pclass(H5P_genclass_t *dst_pclass, H5P_genclass_t *src_pclass,
|
||||
const char *name);
|
||||
H5_DLL herr_t H5P_unregister(H5P_genclass_t *pclass, const char *name);
|
||||
H5_DLL char *H5P_get_class_path(H5P_genclass_t *pclass);
|
||||
H5_DLL H5P_genclass_t *H5P_open_class_path(const char *path);
|
||||
H5_DLL int H5P_tbbt_strcmp(const void *k1, const void *k2, int cmparg);
|
||||
H5_DLL H5P_genclass_t *H5P_get_class_parent(const H5P_genclass_t *pclass);
|
||||
H5_DLL herr_t H5P_close_class(void *_pclass);
|
||||
|
||||
/* Testing functions */
|
||||
|
@ -68,12 +68,13 @@ H5_DLL herr_t H5P_insert(H5P_genplist_t *plist, const char *name, size_t size,
|
||||
H5_DLL herr_t H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name);
|
||||
H5_DLL htri_t H5P_exist_plist(H5P_genplist_t *plist, const char *name);
|
||||
H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass);
|
||||
H5_DLL herr_t H5P_get_nprops_pclass(H5P_genclass_t *pclass, size_t *nprops, hbool_t recurse);
|
||||
H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops,
|
||||
hbool_t recurse);
|
||||
H5_DLL herr_t H5P_register(H5P_genclass_t *pclass, const char *name, size_t size,
|
||||
const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
|
||||
H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete,
|
||||
H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp,
|
||||
H5P_prp_close_func_t prp_close);
|
||||
const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
|
||||
H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete,
|
||||
H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp,
|
||||
H5P_prp_close_func_t prp_close);
|
||||
H5_DLL hid_t H5P_get_driver(H5P_genplist_t *plist);
|
||||
H5_DLL void * H5P_get_driver_info(H5P_genplist_t *plist);
|
||||
H5_DLL herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id,
|
||||
|
@ -169,31 +169,23 @@ H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_g;
|
||||
|
||||
/* Generic property list routines */
|
||||
H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name,
|
||||
H5P_cls_create_func_t cls_create, void *create_data,
|
||||
H5P_cls_copy_func_t cls_copy, void *copy_data,
|
||||
H5P_cls_close_func_t cls_close, void *close_data);
|
||||
H5P_cls_create_func_t cls_create, void *create_data,
|
||||
H5P_cls_copy_func_t cls_copy, void *copy_data,
|
||||
H5P_cls_close_func_t cls_close, void *close_data);
|
||||
H5_DLL char *H5Pget_class_name(hid_t pclass_id);
|
||||
H5_DLL hid_t H5Pcreate(hid_t cls_id);
|
||||
H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size,
|
||||
void *def_value, H5P_prp_create_func_t prp_create,
|
||||
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
|
||||
H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t prp_copy,
|
||||
H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close);
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
H5_DLL herr_t H5Pregister(hid_t cls_id, const char *name, size_t size,
|
||||
void *def_value, H5P_prp_create_func_t prp_create,
|
||||
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
|
||||
H5P_prp_delete_func_t prp_del,
|
||||
H5P_prp_copy_func_t prp_copy,
|
||||
H5P_prp_close_func_t prp_close);
|
||||
H5_DLL herr_t H5Pinsert(hid_t plist_id, const char *name, size_t size,
|
||||
void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
|
||||
H5P_prp_delete_func_t prp_delete,
|
||||
H5P_prp_copy_func_t prp_copy,
|
||||
H5P_prp_close_func_t prp_close);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
H5_DLL herr_t H5Pregister(hid_t cls_id, const char *name, size_t size,
|
||||
void *def_value, H5P_prp_create_func_t prp_create,
|
||||
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
|
||||
H5P_prp_delete_func_t prp_del,
|
||||
H5P_prp_copy_func_t prp_copy,
|
||||
H5P_prp_compare_func_t prp_cmp,
|
||||
H5P_prp_close_func_t prp_close);
|
||||
H5_DLL herr_t H5Pinsert(hid_t plist_id, const char *name, size_t size,
|
||||
void *value, H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
|
||||
H5P_prp_delete_func_t prp_delete,
|
||||
@ -413,6 +405,30 @@ H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size);
|
||||
H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned crt_intmd);
|
||||
H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *crt_intmd /*out*/);
|
||||
|
||||
/* Symbols defined for compatibility with previous versions of the HDF5 API.
|
||||
*
|
||||
* Use of these symbols is deprecated.
|
||||
*/
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
|
||||
/* Macros */
|
||||
|
||||
/* We renamed the "root" of the property list class hierarchy */
|
||||
#define H5P_NO_CLASS H5P_ROOT
|
||||
|
||||
|
||||
/* Typedefs */
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size,
|
||||
void *def_value, H5P_prp_create_func_t prp_create,
|
||||
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
|
||||
H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t prp_copy,
|
||||
H5P_prp_close_func_t prp_close);
|
||||
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -59,6 +59,7 @@ FUNCTION: H5Eset_auto; ; v10, v18
|
||||
FUNCTION: H5Ewalk; H5E_walk, H5E_error; v10, v18
|
||||
FUNCTION: H5Gcreate; ; v10, v18
|
||||
FUNCTION: H5Gopen; ; v10, v18
|
||||
FUNCTION: H5Pregister; ; v14, v18
|
||||
FUNCTION: H5Rget_obj_type; ; v16, v18
|
||||
FUNCTION: H5Tcommit; ; v10, v18
|
||||
FUNCTION: H5Topen; ; v10, v18
|
||||
|
@ -94,6 +94,10 @@
|
||||
#define H5Gopen_vers 1
|
||||
#endif /* !defined(H5Gopen_vers) */
|
||||
|
||||
#if !defined(H5Pregister_vers)
|
||||
#define H5Pregister_vers 1
|
||||
#endif /* !defined(H5Pregister_vers) */
|
||||
|
||||
#if !defined(H5Rget_obj_type_vers)
|
||||
#define H5Rget_obj_type_vers 1
|
||||
#endif /* !defined(H5Rget_obj_type_vers) */
|
||||
@ -287,6 +291,17 @@
|
||||
#error "H5Gopen_vers set to invalid value"
|
||||
#endif /* H5Gopen_vers */
|
||||
|
||||
#if !defined(H5Pregister_vers) || H5Pregister_vers == 2
|
||||
#ifndef H5Pregister_vers
|
||||
#define H5Pregister_vers 2
|
||||
#endif /* H5Pregister_vers */
|
||||
#define H5Pregister H5Pregister2
|
||||
#elif H5Pregister_vers == 1
|
||||
#define H5Pregister H5Pregister1
|
||||
#else /* H5Pregister_vers */
|
||||
#error "H5Pregister_vers set to invalid value"
|
||||
#endif /* H5Pregister_vers */
|
||||
|
||||
#if !defined(H5Rget_obj_type_vers) || H5Rget_obj_type_vers == 2
|
||||
#ifndef H5Rget_obj_type_vers
|
||||
#define H5Rget_obj_type_vers 2
|
||||
|
@ -72,8 +72,9 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
|
||||
H5Oname.c H5Onull.c H5Opline.c H5Orefcount.c \
|
||||
H5Osdspace.c H5Oshared.c H5Ostab.c \
|
||||
H5Oshmesg.c H5Otest.c H5Ounknown.c \
|
||||
H5P.c H5Pacpl.c H5Pdcpl.c H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
|
||||
H5Pgcpl.c \
|
||||
H5P.c H5Pacpl.c H5Pdcpl.c \
|
||||
H5Pdeprec.c H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
|
||||
H5Pgcpl.c H5Pint.c \
|
||||
H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \
|
||||
H5R.c H5Rdeprec.c \
|
||||
H5RC.c \
|
||||
|
@ -105,8 +105,8 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \
|
||||
H5Olayout.lo H5Olinfo.lo H5Olink.lo H5Omessage.lo H5Omtime.lo \
|
||||
H5Oname.lo H5Onull.lo H5Opline.lo H5Orefcount.lo H5Osdspace.lo \
|
||||
H5Oshared.lo H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo \
|
||||
H5P.lo H5Pacpl.lo H5Pdcpl.lo H5Pdxpl.lo H5Pfapl.lo H5Pfcpl.lo \
|
||||
H5Pfmpl.lo H5Pgcpl.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo \
|
||||
H5P.lo H5Pacpl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo H5Pfapl.lo H5Pfcpl.lo \
|
||||
H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo \
|
||||
H5Pocpypl.lo H5Pstrcpl.lo H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo \
|
||||
H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \
|
||||
H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \
|
||||
@ -428,8 +428,8 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
|
||||
H5Oname.c H5Onull.c H5Opline.c H5Orefcount.c \
|
||||
H5Osdspace.c H5Oshared.c H5Ostab.c \
|
||||
H5Oshmesg.c H5Otest.c H5Ounknown.c \
|
||||
H5P.c H5Pacpl.c H5Pdcpl.c H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
|
||||
H5Pgcpl.c \
|
||||
H5P.c H5Pacpl.c H5Pdcpl.c H5Pdeprec.c H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \
|
||||
H5Pgcpl.c H5Pint.c \
|
||||
H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \
|
||||
H5R.c H5Rdeprec.c H5RC.c \
|
||||
H5RS.c \
|
||||
@ -713,11 +713,13 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5P.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pacpl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdcpl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdeprec.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pdxpl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pfapl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pfcpl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pfmpl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pgcpl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pint.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Plapl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Plcpl.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pocpl.Plo@am__quote@
|
||||
|
536
test/tgenprop.c
536
test/tgenprop.c
@ -80,7 +80,7 @@ test_genprop_basic_class(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Creation Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Check class name */
|
||||
@ -111,7 +111,7 @@ test_genprop_basic_class(void)
|
||||
CHECK_I(ret, "H5Pclose_class");
|
||||
|
||||
/* Create another new generic class, derived from file creation class */
|
||||
cid1 = H5Pcreate_class(H5P_FILE_CREATE,CLASS2_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_FILE_CREATE,CLASS2_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Check class name */
|
||||
@ -168,128 +168,108 @@ test_genprop_basic_class_prop(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Properties Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT, CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 0, "H5Pget_nprops");
|
||||
|
||||
/* Check the existance of the first property (should fail) */
|
||||
ret = H5Pexist(cid1,PROP1_NAME);
|
||||
ret = H5Pexist(cid1, PROP1_NAME);
|
||||
VERIFY(ret, 0, "H5Pexist");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Try to insert the first property again (should fail) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
VERIFY(ret, FAIL, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
VERIFY(ret, FAIL, "H5Pregister2");
|
||||
|
||||
/* Check the existance of the first property */
|
||||
ret = H5Pexist(cid1,PROP1_NAME);
|
||||
ret = H5Pexist(cid1, PROP1_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check the size of the first property */
|
||||
ret = H5Pget_size(cid1,PROP1_NAME,&size);
|
||||
ret = H5Pget_size(cid1, PROP1_NAME, &size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP1_SIZE, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 1, "H5Pget_nprops");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Try to insert the second property again (should fail) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
VERIFY(ret, FAIL, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
VERIFY(ret, FAIL, "H5Pregister2");
|
||||
|
||||
/* Check the existance of the second property */
|
||||
ret = H5Pexist(cid1,PROP2_NAME);
|
||||
ret = H5Pexist(cid1, PROP2_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check the size of the second property */
|
||||
ret = H5Pget_size(cid1,PROP2_NAME,&size);
|
||||
ret = H5Pget_size(cid1, PROP2_NAME, &size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP2_SIZE, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 2, "H5Pget_nprops");
|
||||
|
||||
/* Insert third property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Check the existance of the third property */
|
||||
ret = H5Pexist(cid1,PROP3_NAME);
|
||||
ret = H5Pexist(cid1, PROP3_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check the size of the third property */
|
||||
ret = H5Pget_size(cid1,PROP3_NAME,&size);
|
||||
ret = H5Pget_size(cid1, PROP3_NAME, &size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP3_SIZE, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 3, "H5Pget_nprops");
|
||||
|
||||
/* Unregister first property */
|
||||
ret = H5Punregister(cid1,PROP1_NAME);
|
||||
ret = H5Punregister(cid1, PROP1_NAME);
|
||||
CHECK_I(ret, "H5Punregister");
|
||||
|
||||
/* Try to check the size of the first property (should fail) */
|
||||
ret = H5Pget_size(cid1,PROP1_NAME,&size);
|
||||
ret = H5Pget_size(cid1, PROP1_NAME, &size);
|
||||
VERIFY(ret, FAIL, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 2, "H5Pget_nprops");
|
||||
|
||||
/* Unregister second property */
|
||||
ret = H5Punregister(cid1,PROP2_NAME);
|
||||
ret = H5Punregister(cid1, PROP2_NAME);
|
||||
CHECK_I(ret, "H5Punregister");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 1, "H5Pget_nprops");
|
||||
|
||||
/* Unregister third property */
|
||||
ret = H5Punregister(cid1,PROP3_NAME);
|
||||
ret = H5Punregister(cid1, PROP3_NAME);
|
||||
CHECK_I(ret, "H5Punregister");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 0, "H5Pget_nprops");
|
||||
|
||||
@ -344,40 +324,24 @@ test_genprop_class_iter(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Property Iteration Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT, CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert third property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert third property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
@ -456,40 +420,24 @@ test_genprop_class_callback(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Class Callback Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,test_genprop_cls_cb1,&crt_cb_struct,NULL,NULL,test_genprop_cls_cb1,&cls_cb_struct);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,test_genprop_cls_cb1,&crt_cb_struct,NULL, NULL,test_genprop_cls_cb1,&cls_cb_struct);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert third property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert fourth property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
@ -571,26 +519,18 @@ test_genprop_basic_list(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Creation Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Add several properties (w/default values) */
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
@ -627,24 +567,24 @@ test_genprop_basic_list(void)
|
||||
VERIFY(nprops, 2, "H5Pget_nprops");
|
||||
|
||||
/* Check existence of properties */
|
||||
ret = H5Pexist(lid1,PROP1_NAME);
|
||||
ret = H5Pexist(lid1, PROP1_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
ret = H5Pexist(lid1,PROP2_NAME);
|
||||
ret = H5Pexist(lid1, PROP2_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check the sizes of the properties */
|
||||
ret = H5Pget_size(lid1,PROP1_NAME,&size);
|
||||
ret = H5Pget_size(lid1, PROP1_NAME,&size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP1_SIZE, "H5Pget_size");
|
||||
ret = H5Pget_size(lid1,PROP2_NAME,&size);
|
||||
ret = H5Pget_size(lid1, PROP2_NAME,&size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP2_SIZE, "H5Pget_size");
|
||||
|
||||
/* Check values of properties (set with default values) */
|
||||
ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
|
||||
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
|
||||
ret = H5Pget(lid1,PROP2_NAME,&prop2_value);
|
||||
ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
|
||||
@ -685,26 +625,18 @@ test_genprop_basic_list_prop(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Property Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Add several properties (several w/default values) */
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Create a property list from the class */
|
||||
lid1 = H5Pcreate(cid1);
|
||||
@ -719,17 +651,17 @@ test_genprop_basic_list_prop(void)
|
||||
|
||||
/* Insert first temporary property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pinsert");
|
||||
|
||||
/* Insert second temporary property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pinsert");
|
||||
|
||||
@ -739,20 +671,20 @@ test_genprop_basic_list_prop(void)
|
||||
VERIFY(nprops, 4, "H5Pget_nprops");
|
||||
|
||||
/* Check existence of all properties */
|
||||
ret = H5Pexist(lid1,PROP1_NAME);
|
||||
ret = H5Pexist(lid1, PROP1_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
ret = H5Pexist(lid1,PROP2_NAME);
|
||||
ret = H5Pexist(lid1, PROP2_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
ret = H5Pexist(lid1,PROP3_NAME);
|
||||
ret = H5Pexist(lid1, PROP3_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
ret = H5Pexist(lid1,PROP4_NAME);
|
||||
ret = H5Pexist(lid1, PROP4_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check values of permanent properties (set with default values) */
|
||||
ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
|
||||
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
|
||||
ret = H5Pget(lid1,PROP2_NAME,&prop2_value);
|
||||
ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
|
||||
@ -761,11 +693,11 @@ test_genprop_basic_list_prop(void)
|
||||
|
||||
|
||||
/* Check values of temporary properties (set with regular values) */
|
||||
ret = H5Pget(lid1,PROP3_NAME,&prop3_value);
|
||||
ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
if(HDmemcmp(&prop3_value,PROP3_DEF_VALUE,PROP3_SIZE)!=0)
|
||||
if(HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE)!=0)
|
||||
TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__);
|
||||
ret = H5Pget(lid1,PROP4_NAME,&prop4_value);
|
||||
ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
|
||||
@ -773,7 +705,7 @@ test_genprop_basic_list_prop(void)
|
||||
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
|
||||
|
||||
/* Delete permanent property */
|
||||
ret = H5Premove(lid1,PROP2_NAME);
|
||||
ret = H5Premove(lid1, PROP2_NAME);
|
||||
CHECK_I(ret, "H5Premove");
|
||||
|
||||
/* Check number of properties */
|
||||
@ -782,7 +714,7 @@ test_genprop_basic_list_prop(void)
|
||||
VERIFY(nprops, 3, "H5Pget_nprops");
|
||||
|
||||
/* Delete temporary property */
|
||||
ret = H5Premove(lid1,PROP3_NAME);
|
||||
ret = H5Premove(lid1, PROP3_NAME);
|
||||
CHECK_I(ret, "H5Premove");
|
||||
|
||||
/* Check number of properties */
|
||||
@ -791,18 +723,18 @@ test_genprop_basic_list_prop(void)
|
||||
VERIFY(nprops, 2, "H5Pget_nprops");
|
||||
|
||||
/* Check existence of remaining properties */
|
||||
ret = H5Pexist(lid1,PROP1_NAME);
|
||||
ret = H5Pexist(lid1, PROP1_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
ret = H5Pexist(lid1,PROP4_NAME);
|
||||
ret = H5Pexist(lid1, PROP4_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check values of permanent properties (set with default values) */
|
||||
ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
|
||||
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
|
||||
|
||||
/* Check values of temporary properties (set with regular values) */
|
||||
ret = H5Pget(lid1,PROP4_NAME,&prop4_value);
|
||||
ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
|
||||
@ -867,26 +799,18 @@ test_genprop_list_iter(void)
|
||||
MESSAGE(5, ("Testing Generic Property List Iteration Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Add several properties (several w/default values) */
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Create a property list from the class */
|
||||
lid1 = H5Pcreate(cid1);
|
||||
@ -901,17 +825,17 @@ test_genprop_list_iter(void)
|
||||
|
||||
/* Insert first temporary property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pinsert");
|
||||
|
||||
/* Insert second temporary property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
ret = H5Pinsert(lid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pinsert");
|
||||
|
||||
@ -1141,40 +1065,24 @@ test_genprop_list_callback(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Property Callback Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,test_genprop_cls_cb2,&cop_cb_struct,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL,test_genprop_cls_cb2,&cop_cb_struct,NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Insert first property into class (with callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,test_genprop_prop_crt_cb1,test_genprop_prop_set_cb1,test_genprop_prop_get_cb1,NULL,test_genprop_prop_cop_cb1,test_genprop_prop_cls_cb1);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,test_genprop_prop_crt_cb1,test_genprop_prop_set_cb1,test_genprop_prop_get_cb1,NULL,test_genprop_prop_cop_cb1,test_genprop_prop_cmp_cb1,test_genprop_prop_cls_cb1);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE,test_genprop_prop_crt_cb1,test_genprop_prop_set_cb1,test_genprop_prop_get_cb1,NULL,test_genprop_prop_cop_cb1,test_genprop_prop_cmp_cb1,test_genprop_prop_cls_cb1);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert second property into class (with only delete callback) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,test_genprop_prop_del_cb2,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,test_genprop_prop_del_cb2,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL,test_genprop_prop_del_cb2,NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert third property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert fourth property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1,&nprops);
|
||||
@ -1195,16 +1103,16 @@ test_genprop_list_callback(void)
|
||||
|
||||
/* Verify creation callback information for properties tracked */
|
||||
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
|
||||
if(HDstrcmp(prop1_cb_info.crt_name,PROP1_NAME)!=0)
|
||||
if(HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME)!=0)
|
||||
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
|
||||
if(HDmemcmp(prop1_cb_info.crt_value,PROP1_DEF_VALUE,PROP1_SIZE)!=0)
|
||||
if(HDmemcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE)!=0)
|
||||
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
|
||||
|
||||
/* Check values of permanent properties (set with default values) */
|
||||
ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
|
||||
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
|
||||
ret = H5Pget(lid1,PROP2_NAME,&prop2_value);
|
||||
ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
|
||||
@ -1212,11 +1120,11 @@ test_genprop_list_callback(void)
|
||||
"H5Pget", *PROP2_DEF_VALUE, prop2_value, (int)__LINE__, __FILE__);
|
||||
|
||||
/* Check values of temporary properties (set with regular values) */
|
||||
ret = H5Pget(lid1,PROP3_NAME,&prop3_value);
|
||||
ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
if(HDmemcmp(&prop3_value,PROP3_DEF_VALUE,PROP3_SIZE)!=0)
|
||||
if(HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE)!=0)
|
||||
TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__);
|
||||
ret = H5Pget(lid1,PROP4_NAME,&prop4_value);
|
||||
ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
/* Verify the floating-poing value in this way to avoid compiler warning. */
|
||||
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
|
||||
@ -1226,46 +1134,46 @@ test_genprop_list_callback(void)
|
||||
/* Verify get callback information for properties tracked */
|
||||
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
|
||||
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
|
||||
if(HDstrcmp(prop1_cb_info.get_name,PROP1_NAME)!=0)
|
||||
if(HDstrcmp(prop1_cb_info.get_name, PROP1_NAME)!=0)
|
||||
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
|
||||
if(HDmemcmp(prop1_cb_info.get_value,PROP1_DEF_VALUE,PROP1_SIZE)!=0)
|
||||
if(HDmemcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE)!=0)
|
||||
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
|
||||
|
||||
/* Set value of property #1 to different value */
|
||||
ret = H5Pset(lid1,PROP1_NAME,&prop1_new_value);
|
||||
ret = H5Pset(lid1, PROP1_NAME,&prop1_new_value);
|
||||
CHECK_I(ret, "H5Pset");
|
||||
|
||||
/* Verify set callback information for properties tracked */
|
||||
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
|
||||
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
|
||||
if(HDstrcmp(prop1_cb_info.set_name,PROP1_NAME)!=0)
|
||||
if(HDstrcmp(prop1_cb_info.set_name, PROP1_NAME)!=0)
|
||||
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
|
||||
if(HDmemcmp(prop1_cb_info.set_value,&prop1_new_value,PROP1_SIZE)!=0)
|
||||
if(HDmemcmp(prop1_cb_info.set_value,&prop1_new_value, PROP1_SIZE)!=0)
|
||||
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
|
||||
|
||||
/* Check new value of tracked properties */
|
||||
ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
|
||||
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
VERIFY(prop1_value, prop1_new_value, "H5Pget");
|
||||
|
||||
/* Verify get callback information again for properties tracked */
|
||||
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
|
||||
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
|
||||
if(HDstrcmp(prop1_cb_info.get_name,PROP1_NAME)!=0)
|
||||
if(HDstrcmp(prop1_cb_info.get_name, PROP1_NAME)!=0)
|
||||
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
|
||||
if(HDmemcmp(prop1_cb_info.get_value,&prop1_new_value,PROP1_SIZE)!=0)
|
||||
if(HDmemcmp(prop1_cb_info.get_value,&prop1_new_value, PROP1_SIZE)!=0)
|
||||
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
|
||||
|
||||
/* Delete property #2 */
|
||||
ret = H5Premove(lid1,PROP2_NAME);
|
||||
ret = H5Premove(lid1, PROP2_NAME);
|
||||
CHECK_I(ret, "H5Premove");
|
||||
|
||||
/* Verify delete callback information for properties tracked */
|
||||
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
|
||||
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
|
||||
if(HDstrcmp(prop2_cb_info.del_name,PROP2_NAME)!=0)
|
||||
if(HDstrcmp(prop2_cb_info.del_name, PROP2_NAME)!=0)
|
||||
TestErrPrintf("Property #2 name doesn't match!, line=%d\n",__LINE__);
|
||||
if(HDmemcmp(prop2_cb_info.del_value,PROP2_DEF_VALUE,PROP2_SIZE)!=0)
|
||||
if(HDmemcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE)!=0)
|
||||
TestErrPrintf("Property #2 value doesn't match!, line=%d\n",__LINE__);
|
||||
|
||||
/* Copy first list */
|
||||
@ -1274,9 +1182,9 @@ test_genprop_list_callback(void)
|
||||
|
||||
/* Verify copy callback information for properties tracked */
|
||||
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
|
||||
if(HDstrcmp(prop1_cb_info.cop_name,PROP1_NAME)!=0)
|
||||
if(HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME)!=0)
|
||||
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
|
||||
if(HDmemcmp(prop1_cb_info.cop_value,&prop1_new_value,PROP1_SIZE)!=0)
|
||||
if(HDmemcmp(prop1_cb_info.cop_value,&prop1_new_value, PROP1_SIZE)!=0)
|
||||
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
|
||||
|
||||
/* Verify that the class creation callback occurred */
|
||||
@ -1298,9 +1206,9 @@ test_genprop_list_callback(void)
|
||||
|
||||
/* Verify close callback information for properties tracked */
|
||||
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
|
||||
if(HDstrcmp(prop1_cb_info.cls_name,PROP1_NAME)!=0)
|
||||
if(HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME)!=0)
|
||||
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
|
||||
if(HDmemcmp(prop1_cb_info.cls_value,&prop1_new_value,PROP1_SIZE)!=0)
|
||||
if(HDmemcmp(prop1_cb_info.cls_value,&prop1_new_value, PROP1_SIZE)!=0)
|
||||
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
|
||||
|
||||
/* Close second list */
|
||||
@ -1367,11 +1275,11 @@ test_genprop_list_addprop(void)
|
||||
CHECK_I(ret, "H5Pinsert");
|
||||
|
||||
/* Check existence of added property */
|
||||
ret = H5Pexist(pid,PROP1_NAME);
|
||||
ret = H5Pexist(pid, PROP1_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check values of property (set with default value) */
|
||||
ret = H5Pget(pid,PROP1_NAME,&prop1_value);
|
||||
ret = H5Pget(pid, PROP1_NAME,&prop1_value);
|
||||
CHECK_I(ret, "H5Pget");
|
||||
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
|
||||
|
||||
@ -1434,7 +1342,7 @@ test_genprop_class_addprop(void)
|
||||
CHECK(sid, FAIL, "H5Screate");
|
||||
|
||||
/* Create a new class, dervied from the dataset creation property list class */
|
||||
cid = H5Pcreate_class(H5P_DATASET_CREATE,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid = H5Pcreate_class(H5P_DATASET_CREATE,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid, "H5Pcreate_class");
|
||||
|
||||
/* Check existence of an original property */
|
||||
@ -1442,12 +1350,8 @@ test_genprop_class_addprop(void)
|
||||
VERIFY(ret, 0, "H5Pexist");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Create a derived dataset creation property list */
|
||||
pid = H5Pcreate(cid);
|
||||
@ -1519,24 +1423,16 @@ test_genprop_equal(void)
|
||||
MESSAGE(5, ("Testing Basic Generic Property List Equal Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Create a property list from the class */
|
||||
lid1 = H5Pcreate(cid1);
|
||||
@ -1575,16 +1471,12 @@ test_genprop_path(void)
|
||||
MESSAGE(5, ("Testing Generic Property List Class Path Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Get full path for first class */
|
||||
path=H5P_get_class_path_test(cid1);
|
||||
@ -1594,16 +1486,12 @@ test_genprop_path(void)
|
||||
HDfree(path);
|
||||
|
||||
/* Create another new generic class, derived from first class */
|
||||
cid2 = H5Pcreate_class(cid1,CLASS2_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid2 = H5Pcreate_class(cid1,CLASS2_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid2, "H5Pcreate_class");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid2,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid2,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid2, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Get full path for second class */
|
||||
path=H5P_get_class_path_test(cid2);
|
||||
@ -1654,16 +1542,12 @@ test_genprop_refcount(void)
|
||||
MESSAGE(5, ("Testing Generic Property List Reference Count Functionality\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
#ifdef H5_WANT_H5_V1_6_COMPAT
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#else /* H5_WANT_H5_V1_6_COMPAT */
|
||||
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
#endif /* H5_WANT_H5_V1_6_COMPAT */
|
||||
CHECK_I(ret, "H5Pregister");
|
||||
ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister2");
|
||||
|
||||
/* Create a new generic list, derived from the root of the class hierarchy */
|
||||
lid1 = H5Pcreate(cid1);
|
||||
@ -1712,6 +1596,136 @@ test_genprop_refcount(void)
|
||||
|
||||
} /* ent test_genprop_refcount() */
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
/****************************************************************
|
||||
**
|
||||
** test_genprop_deprec(): Test basic generic property list code.
|
||||
** Tests deprecated API routines.
|
||||
**
|
||||
****************************************************************/
|
||||
static void
|
||||
test_genprop_deprec(void)
|
||||
{
|
||||
hid_t cid1; /* Generic Property class ID */
|
||||
size_t size; /* Size of property */
|
||||
size_t nprops; /* Number of properties in class */
|
||||
herr_t ret; /* Generic return value */
|
||||
|
||||
/* Output message about test being performed */
|
||||
MESSAGE(5, ("Testing Deprecated Generic Property List Functions\n"));
|
||||
|
||||
/* Create a new generic class, derived from the root of the class hierarchy */
|
||||
cid1 = H5Pcreate_class(H5P_ROOT, CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(cid1, "H5Pcreate_class");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 0, "H5Pget_nprops");
|
||||
|
||||
/* Check the existance of the first property (should fail) */
|
||||
ret = H5Pexist(cid1, PROP1_NAME);
|
||||
VERIFY(ret, 0, "H5Pexist");
|
||||
|
||||
/* Insert first property into class (with no callbacks) */
|
||||
ret = H5Pregister1(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister1");
|
||||
|
||||
/* Try to insert the first property again (should fail) */
|
||||
ret = H5Pregister1(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
VERIFY(ret, FAIL, "H5Pregister1");
|
||||
|
||||
/* Check the existance of the first property */
|
||||
ret = H5Pexist(cid1, PROP1_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check the size of the first property */
|
||||
ret = H5Pget_size(cid1, PROP1_NAME, &size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP1_SIZE, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 1, "H5Pget_nprops");
|
||||
|
||||
/* Insert second property into class (with no callbacks) */
|
||||
ret = H5Pregister1(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister1");
|
||||
|
||||
/* Try to insert the second property again (should fail) */
|
||||
ret = H5Pregister1(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
VERIFY(ret, FAIL, "H5Pregister1");
|
||||
|
||||
/* Check the existance of the second property */
|
||||
ret = H5Pexist(cid1, PROP2_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check the size of the second property */
|
||||
ret = H5Pget_size(cid1, PROP2_NAME, &size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP2_SIZE, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 2, "H5Pget_nprops");
|
||||
|
||||
/* Insert third property into class (with no callbacks) */
|
||||
ret = H5Pregister1(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
CHECK_I(ret, "H5Pregister1");
|
||||
|
||||
/* Check the existance of the third property */
|
||||
ret = H5Pexist(cid1, PROP3_NAME);
|
||||
VERIFY(ret, 1, "H5Pexist");
|
||||
|
||||
/* Check the size of the third property */
|
||||
ret = H5Pget_size(cid1, PROP3_NAME, &size);
|
||||
CHECK_I(ret, "H5Pget_size");
|
||||
VERIFY(size, PROP3_SIZE, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 3, "H5Pget_nprops");
|
||||
|
||||
/* Unregister first property */
|
||||
ret = H5Punregister(cid1, PROP1_NAME);
|
||||
CHECK_I(ret, "H5Punregister");
|
||||
|
||||
/* Try to check the size of the first property (should fail) */
|
||||
ret = H5Pget_size(cid1, PROP1_NAME, &size);
|
||||
VERIFY(ret, FAIL, "H5Pget_size");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 2, "H5Pget_nprops");
|
||||
|
||||
/* Unregister second property */
|
||||
ret = H5Punregister(cid1, PROP2_NAME);
|
||||
CHECK_I(ret, "H5Punregister");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 1, "H5Pget_nprops");
|
||||
|
||||
/* Unregister third property */
|
||||
ret = H5Punregister(cid1, PROP3_NAME);
|
||||
CHECK_I(ret, "H5Punregister");
|
||||
|
||||
/* Check the number of properties in class */
|
||||
ret = H5Pget_nprops(cid1, &nprops);
|
||||
CHECK_I(ret, "H5Pget_nprops");
|
||||
VERIFY(nprops, 0, "H5Pget_nprops");
|
||||
|
||||
/* Close class */
|
||||
ret = H5Pclose_class(cid1);
|
||||
CHECK_I(ret, "H5Pclose_class");
|
||||
} /* end test_genprop_deprec() */
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
/****************************************************************
|
||||
**
|
||||
** test_genprop(): Main generic property testing routine.
|
||||
@ -1741,6 +1755,10 @@ test_genprop(void)
|
||||
test_genprop_path(); /* Tests for class path verification */
|
||||
test_genprop_refcount(); /* Tests for class reference counting */
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
test_genprop_deprec(); /* Tests for deprecated routines */
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
} /* test_genprop() */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user