Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-18 09:16:03

0001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
0002  * Copyright by The HDF Group.                                               *
0003  * All rights reserved.                                                      *
0004  *                                                                           *
0005  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
0006  * terms governing use, modification, and redistribution, is contained in    *
0007  * the COPYING file, which can be found at the root of the source code       *
0008  * distribution tree, or in https://www.hdfgroup.org/licenses.               *
0009  * If you do not have access to either file, you may request a copy from     *
0010  * help@hdfgroup.org.                                                        *
0011  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
0012 
0013 /*
0014  * This file contains public declarations for the H5M module.
0015  *
0016  * NOTE:    This is an experimental API. Everything in the H5M package
0017  *          is subject to revision in a future release.
0018  */
0019 #ifndef H5Mpublic_H
0020 #define H5Mpublic_H
0021 
0022 #include "H5public.h"   /* Generic Functions                        */
0023 #include "H5Ipublic.h"  /* Identifiers                              */
0024 #include "H5VLpublic.h" /* Virtual Object Layer                     */
0025 
0026 /* Exposes VOL connector types, so it needs the connector header */
0027 #include "H5VLconnector.h"
0028 
0029 /*****************/
0030 /* Public Macros */
0031 /*****************/
0032 
0033 /* Macros defining operation IDs for map VOL callbacks (implemented using the
0034  * "optional" VOL callback) */
0035 #define H5VL_MAP_CREATE   1 /**< Callback operation ID for map create */
0036 #define H5VL_MAP_OPEN     2 /**< Callback operation ID for map open */
0037 #define H5VL_MAP_GET_VAL  3 /**< Callback operation ID for getting an associated value from a map */
0038 #define H5VL_MAP_EXISTS   4 /**< Callback operation ID for checking if a value exists in a map */
0039 #define H5VL_MAP_PUT      5 /**< Callback operation ID for putting a key-value pair to a map */
0040 #define H5VL_MAP_GET      6 /**< Callback operation ID for map get callback */
0041 #define H5VL_MAP_SPECIFIC 7 /**< Callback operation ID for map specific operation */
0042 #define H5VL_MAP_OPTIONAL 8 /**< Currently unused */
0043 #define H5VL_MAP_CLOSE    9 /**< Callback operation ID for terminating access to a map */
0044 
0045 /*******************/
0046 /* Public Typedefs */
0047 /*******************/
0048 
0049 /**
0050  * Types for map GET callback
0051  */
0052 typedef enum H5VL_map_get_t {
0053     H5VL_MAP_GET_MAPL,     /**< Callback operation ID for getting map access property list   */
0054     H5VL_MAP_GET_MCPL,     /**< Callback operation ID for getting map creation property list */
0055     H5VL_MAP_GET_KEY_TYPE, /**< Callback operation ID for getting the key datatype for a map */
0056     H5VL_MAP_GET_VAL_TYPE, /**< Callback operation ID for getting the value datatype for a map */
0057     H5VL_MAP_GET_COUNT /**< Callback operation ID for getting the number of key-value pairs stored in a map */
0058 } H5VL_map_get_t;
0059 
0060 /**
0061  * Types for map SPECIFIC callback
0062  */
0063 typedef enum H5VL_map_specific_t {
0064     H5VL_MAP_ITER,  /**< Callback operation ID for iterating over all key-value pairs stored in the map */
0065     H5VL_MAP_DELETE /**< Callback operation ID for deleting a key-value pair stored in the map */
0066 } H5VL_map_specific_t;
0067 
0068 //! <!-- [H5M_iterate_t_snip] -->
0069 /**
0070  * Callback for H5Miterate()
0071  */
0072 typedef herr_t (*H5M_iterate_t)(hid_t map_id, const void *key, void *op_data);
0073 //! <!-- [H5M_iterate_t_snip] -->
0074 
0075 /**
0076  * Parameters for map operations
0077  */
0078 typedef union H5VL_map_args_t {
0079 
0080     /** H5VL_MAP_CREATE */
0081     struct {
0082         H5VL_loc_params_t loc_params;  /**< Location parameters for object */
0083         const char       *name;        /**< Name of new map object */
0084         hid_t             lcpl_id;     /**< Link creation property list for map */
0085         hid_t             key_type_id; /**< Datatype for map keys */
0086         hid_t             val_type_id; /**< Datatype for map values */
0087         hid_t             mcpl_id;     /**< Map creation property list */
0088         hid_t             mapl_id;     /**< Map access property list */
0089         void             *map;         /**< Pointer to newly created map object (OUT) */
0090     } create;
0091 
0092     /** H5VL_MAP_OPEN */
0093     struct {
0094         H5VL_loc_params_t loc_params; /**< Location parameters for object */
0095         const char       *name;       /**< Name of new map object */
0096         hid_t             mapl_id;    /**< Map access property list */
0097         void             *map;        /**< Pointer to newly created map object (OUT) */
0098     } open;
0099 
0100     /** H5VL_MAP_GET_VAL */
0101     struct {
0102         hid_t       key_mem_type_id;   /**< Memory datatype for key */
0103         const void *key;               /**< Pointer to key */
0104         hid_t       value_mem_type_id; /**< Memory datatype for value */
0105         void       *value;             /**< Buffer for value (OUT) */
0106     } get_val;
0107 
0108     /** H5VL_MAP_EXISTS */
0109     struct {
0110         hid_t       key_mem_type_id; /**< Memory datatype for key */
0111         const void *key;             /**< Pointer to key */
0112         hbool_t     exists;          /**< Flag indicating whether key exists in map (OUT) */
0113     } exists;
0114 
0115     /** H5VL_MAP_PUT */
0116     struct {
0117         hid_t       key_mem_type_id;   /**< Memory datatype for key */
0118         const void *key;               /**< Pointer to key */
0119         hid_t       value_mem_type_id; /**< Memory datatype for value */
0120         const void *value;             /**< Pointer to value */
0121     } put;
0122 
0123     /** H5VL_MAP_GET */
0124     struct {
0125         H5VL_map_get_t get_type; /**< 'get' operation to perform */
0126 
0127         /** Parameters for each operation */
0128         union {
0129             /** H5VL_MAP_GET_MAPL */
0130             struct {
0131                 hid_t mapl_id; /**< Get map access property list ID (OUT) */
0132             } get_mapl;
0133 
0134             /** H5VL_MAP_GET_MCPL */
0135             struct {
0136                 hid_t mcpl_id; /**< Get map creation property list ID (OUT) */
0137             } get_mcpl;
0138 
0139             /** H5VL_MAP_GET_KEY_TYPE */
0140             struct {
0141                 hid_t type_id; /**< Get datatype ID for map's keys (OUT) */
0142             } get_key_type;
0143 
0144             /** H5VL_MAP_GET_VAL_TYPE */
0145             struct {
0146                 hid_t type_id; /**< Get datatype ID for map's values (OUT) */
0147             } get_val_type;
0148 
0149             /** H5VL_MAP_GET_COUNT */
0150             struct {
0151                 hsize_t count; /**< Get number of key-value pairs in the map (OUT) */
0152             } get_count;
0153         } args;
0154     } get;
0155 
0156     /** H5VL_MAP_SPECIFIC */
0157     struct {
0158         H5VL_map_specific_t specific_type;
0159         /**< 'specific' operation to perform */
0160 
0161         /** Parameters for each operation */
0162         union {
0163             /* H5VL_MAP_ITER specific operation */
0164             struct {
0165                 H5VL_loc_params_t loc_params;      /**< Location parameters for object */
0166                 hsize_t           idx;             /**< Start/end iteration index (IN/OUT) */
0167                 hid_t             key_mem_type_id; /**< Memory datatype for key */
0168                 H5M_iterate_t     op;              /**< Iteration callback routine */
0169                 void             *op_data;         /**< Pointer to callback context */
0170             } iterate;
0171 
0172             /* H5VL_MAP_DELETE specific operation */
0173             struct {
0174                 H5VL_loc_params_t loc_params;      /**< Location parameters for object */
0175                 hid_t             key_mem_type_id; /**< Memory datatype for key */
0176                 const void       *key;             /**< Pointer to key */
0177             } del;
0178         } args;
0179     } specific;
0180 
0181     /** H5VL_MAP_OPTIONAL */
0182     /* Unused */
0183 
0184     /** H5VL_MAP_CLOSE */
0185     /* No args */
0186 } H5VL_map_args_t;
0187 
0188 /********************/
0189 /* Public Variables */
0190 /********************/
0191 
0192 /*********************/
0193 /* Public Prototypes */
0194 /*********************/
0195 #ifdef __cplusplus
0196 extern "C" {
0197 #endif
0198 
0199 /* The map API is only built when requested since there's no support in
0200  * the native file format at this time. It's only supported in a few VOL
0201  * connectors.
0202  */
0203 #ifdef H5_HAVE_MAP_API
0204 
0205 /**
0206  * \ingroup H5M
0207  *
0208  * \brief Creates a map object
0209  *
0210  * \fgdta_loc_id
0211  * \param[in] name Map object name
0212  * \type_id{key_type_id}
0213  * \type_id{val_type_id}
0214  * \lcpl_id
0215  * \mcpl_id
0216  * \mapl_id
0217  * \return \hid_t{map object}
0218  *
0219  * \details H5Mcreate() creates a new map object for storing key-value
0220  *          pairs. The in-file datatype for keys is defined by \p key_type_id
0221  *          and the in-file datatype for values is defined by \p val_type_id. \p
0222  *          loc_id specifies the location to create the map object and \p
0223  *          name specifies the name of the link to the map object relative to
0224  *          \p loc_id.
0225  *
0226  * \since 1.12.0
0227  *
0228  */
0229 H5_DLL hid_t H5Mcreate(hid_t loc_id, const char *name, hid_t key_type_id, hid_t val_type_id, hid_t lcpl_id,
0230                        hid_t mcpl_id, hid_t mapl_id);
0231 /**
0232  * --------------------------------------------------------------------------
0233  * \ingroup ASYNC
0234  * \async_variant_of{H5Mcreate}
0235  */
0236 #ifndef H5_DOXYGEN
0237 H5_DLL hid_t H5Mcreate_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
0238                              const char *name, hid_t key_type_id, hid_t val_type_id, hid_t lcpl_id,
0239                              hid_t mcpl_id, hid_t mapl_id, hid_t es_id);
0240 #else
0241 H5_DLL hid_t  H5Mcreate_async(hid_t loc_id, const char *name, hid_t key_type_id, hid_t val_type_id,
0242                               hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id, hid_t es_id);
0243 #endif
0244 
0245 /**
0246  * \ingroup H5M
0247  *
0248  * \brief Creates a map object without linking it into a file
0249  *
0250  * \fgdta_loc_id
0251  * \type_id{key_type_id}
0252  * \type_id{val_type_id}
0253  * \mcpl_id
0254  * \mapl_id
0255  * \return \hid_t{map object}
0256  *          The resulting ID should be linked into the file with H5Olink or it
0257  *          will be deleted when closed.
0258  *
0259  * \details H5Mcreate_anon() creates a new map object for storing key-value
0260  *          pairs. The in-file datatype for keys is defined by \p key_type_id
0261  *          and the in-file datatype for values is defined by \p val_type_id. \p
0262  *          loc_id specifies the file to create the map object, but no link to
0263  *          the object is created.  Other options can be specified through the
0264  *          property lists \p mcpl_id and \p mapl_id.
0265  *
0266  *          The new map should be linked into the group hierarchy before being
0267  *          closed or it will be deleted. The map should be closed when the
0268  *          caller no longer requires it.
0269  *
0270  * \since 1.12.0
0271  *
0272  */
0273 H5_DLL hid_t H5Mcreate_anon(hid_t loc_id, hid_t key_type_id, hid_t val_type_id, hid_t mcpl_id, hid_t mapl_id);
0274 
0275 /**
0276  * \ingroup H5M
0277  *
0278  * \brief Opens a map object
0279  *
0280  * \fgdta_loc_id{loc_id}
0281  * \param[in] name Map object name relative to \p loc_id
0282  * \mapl_id
0283  * \return \hid_t{map object}
0284  *
0285  * \details H5Mopen() finds a map object specified by \p name under the location
0286  *          specified by \p loc_id. The map object should be close with
0287  *          H5Mclose() when the application is not longer interested in
0288  *          accessing it.
0289  *
0290  * \since 1.12.0
0291  *
0292  */
0293 H5_DLL hid_t H5Mopen(hid_t loc_id, const char *name, hid_t mapl_id);
0294 /**
0295  * --------------------------------------------------------------------------
0296  * \ingroup ASYNC
0297  * \async_variant_of{H5Mopen}
0298  */
0299 #ifndef H5_DOXYGEN
0300 H5_DLL hid_t H5Mopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
0301                            const char *name, hid_t mapl_id, hid_t es_id);
0302 #else
0303 H5_DLL hid_t  H5Mopen_async(hid_t loc_id, const char *name, hid_t mapl_id, hid_t es_id);
0304 #endif
0305 
0306 /**
0307  * \ingroup H5M
0308  *
0309  * \brief Terminates access to a map object
0310  *
0311  * \map_id
0312  * \return \herr_t
0313  *
0314  * \details H5Mclose() closes access to a map object specified by \p map_id and
0315  *          releases resources used by it.
0316  *
0317  *          It is illegal to subsequently use that same map identifier in calls
0318  *          to other map functions.
0319  *
0320  * \since 1.12.0
0321  *
0322  */
0323 H5_DLL herr_t H5Mclose(hid_t map_id);
0324 /**
0325  * --------------------------------------------------------------------------
0326  * \ingroup ASYNC
0327  * \async_variant_of{H5Mclose}
0328  */
0329 #ifndef H5_DOXYGEN
0330 H5_DLL herr_t H5Mclose_async(const char *app_file, const char *app_func, unsigned app_line, hid_t map_id,
0331                              hid_t es_id);
0332 #else
0333 H5_DLL herr_t H5Mclose_async(hid_t map_id, hid_t es_id);
0334 #endif
0335 
0336 /**
0337  * \ingroup H5M
0338  *
0339  * \brief Gets key datatype for a map object
0340  *
0341  * \map_id
0342  * \return \hid_t{datatype}
0343  *
0344  * \details H5Mget_key_type() retrieves key datatype as stored in the file for a
0345  *          map object specified by \p map_id and returns identifier for the
0346  *          datatype.
0347  *
0348  * \since 1.12.0
0349  *
0350  */
0351 H5_DLL hid_t H5Mget_key_type(hid_t map_id);
0352 
0353 /**
0354  * \ingroup H5M
0355  *
0356  * \brief Gets value datatype for a map object
0357  *
0358  * \map_id
0359  * \return \hid_t{datatype}
0360  *
0361  * \details H5Mget_val_type() retrieves value datatype as stored in the file for
0362  *          a map object specified by \p map_id and returns identifier for the
0363  *          datatype .
0364  *
0365  * \since 1.12.0
0366  *
0367  */
0368 H5_DLL hid_t H5Mget_val_type(hid_t map_id);
0369 
0370 /**
0371  * \ingroup H5M
0372  *
0373  * \brief Gets creation property list for a map object
0374  *
0375  * \map_id
0376  * \return \hid_t{map creation property list}
0377  *
0378  * \details H5Mget_create_plist() returns an identifier for a copy of the
0379  *          creation property list for a map object specified by \p map_id.
0380  *
0381  *          The creation property list identifier should be released with
0382  *          H5Pclose() to prevent resource leaks.
0383  *
0384  * \since 1.12.0
0385  *
0386  */
0387 H5_DLL hid_t H5Mget_create_plist(hid_t map_id);
0388 
0389 /**
0390  * \ingroup H5M
0391  *
0392  * \brief Gets access property list for a map object
0393  *
0394  * \map_id
0395  * \return \hid_t{map access property list}
0396  *
0397  * \details H5Mget_access_plist() returns an identifier for a copy of the access
0398  *          property list for a map object specified by \p map_id.
0399  *
0400  * \since 1.12.0
0401  *
0402  */
0403 H5_DLL hid_t H5Mget_access_plist(hid_t map_id);
0404 
0405 /**
0406  * \ingroup H5M
0407  *
0408  * \brief Retrieves the number of key-value pairs in a map object
0409  *
0410  * \map_id
0411  * \param[out] count The number of key-value pairs stored in the map object
0412  * \dxpl_id
0413  * \return \herr_t
0414  *
0415  * \details H5Mget_count() retrieves the number of key-value pairs stored in a
0416  *          map specified by map_id.
0417  *
0418  * \since 1.12.0
0419  *
0420  */
0421 H5_DLL herr_t H5Mget_count(hid_t map_id, hsize_t *count, hid_t dxpl_id);
0422 
0423 /**
0424  * \ingroup H5M
0425  *
0426  * \brief Adds a key-value pair to a map object
0427  *
0428  * \map_id
0429  * \type_id{key_mem_type_id}
0430  * \param[in] key Pointer to key buffer
0431  * \type_id{val_mem_type_id}
0432  * \param[in] value Pointer to value buffer
0433  * \dxpl_id
0434  * \return \herr_t
0435  *
0436  * \details H5Mput() adds a key-value pair to a map object specified by \p
0437  *          map_id, or updates the value for the specified key if one was set
0438  *          previously.
0439  *
0440  *          \p key_mem_type_id and \p val_mem_type_id specify the datatypes for
0441  *          the provided key and value buffers, and if different from those used
0442  *          to create the map object, the key and value will be internally
0443  *          converted to the datatypes for the map object.
0444  *
0445  *          Any further options can be specified through the property list
0446  *          \p dxpl_id.
0447  *
0448  * \since 1.12.0
0449  *
0450  */
0451 H5_DLL herr_t H5Mput(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id,
0452                      const void *value, hid_t dxpl_id);
0453 /**
0454  * --------------------------------------------------------------------------
0455  * \ingroup ASYNC
0456  * \async_variant_of{H5Mput}
0457  */
0458 #ifndef H5_DOXYGEN
0459 H5_DLL herr_t H5Mput_async(const char *app_file, const char *app_func, unsigned app_line, hid_t map_id,
0460                            hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, const void *value,
0461                            hid_t dxpl_id, hid_t es_id);
0462 #else
0463 H5_DLL herr_t H5Mput_async(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id,
0464                            const void *value, hid_t dxpl_id, hid_t es_id);
0465 #endif
0466 
0467 /**
0468  * \ingroup H5M
0469  *
0470  * \brief Retrieves a key-value pair from a map object
0471  *
0472  * \map_id
0473  * \type_id{key_mem_type_id}
0474  * \param[in] key Pointer to key buffer
0475  * \type_id{val_mem_type_id}
0476  * \param[out] value Pointer to value buffer
0477  * \dxpl_id
0478  * \return \herr_t
0479  *
0480  * \details H5Mget() retrieves from a map object specified by \p map_id, the
0481  *          value associated with the provided key \p key. \p key_mem_type_id
0482  *          and \p val_mem_type_id specify the datatypes for the provided key
0483  *          and value buffers. If if the datatype specified by \p
0484  *          key_mem_type_id is different from that used to create the map object
0485  *          the key will be internally converted to the datatype for the map
0486  *          object for the query, and if the datatype specified by \p
0487  *          val_mem_type_id is different from that used to create the map object
0488  *          the returned value will be converted to have a datatype as specified
0489  *          by \p val_mem_type_id before the function returns.
0490  *
0491  *          Any further options can be specified through the property list
0492  *          \p dxpl_id.
0493  *
0494  * \since 1.12.0
0495  *
0496  */
0497 H5_DLL herr_t H5Mget(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, void *value,
0498                      hid_t dxpl_id);
0499 /**
0500  * --------------------------------------------------------------------------
0501  * \ingroup ASYNC
0502  * \async_variant_of{H5Mget}
0503  */
0504 #ifndef H5_DOXYGEN
0505 H5_DLL herr_t H5Mget_async(const char *app_file, const char *app_func, unsigned app_line, hid_t map_id,
0506                            hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, void *value,
0507                            hid_t dxpl_id, hid_t es_id);
0508 #else
0509 H5_DLL herr_t H5Mget_async(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id,
0510                            void *value, hid_t dxpl_id, hid_t es_id);
0511 #endif
0512 
0513 /**
0514  * \ingroup H5M
0515  *
0516  * \brief Checks if provided key exists in a map object
0517  *
0518  * \map_id
0519  * \type_id{key_mem_type_id}
0520  * \param[in] key Pointer to key buffer
0521  * \param[out] exists Pointer to a buffer to return the existence status
0522  * \dxpl_id
0523  * \return \herr_t
0524  *
0525  * \details H5Mexists() checks if the provided key is stored in the map object
0526  *          specified by \p map_id. If \p key_mem_type_id is different from that
0527  *          used to create the map object the key will be internally converted
0528  *          to the datatype for the map object for the query.
0529  *
0530  *          Any further options can be specified through the property list
0531  *          \p dxpl_id.
0532  *
0533  * \since 1.12.0
0534  *
0535  */
0536 H5_DLL herr_t H5Mexists(hid_t map_id, hid_t key_mem_type_id, const void *key, hbool_t *exists, hid_t dxpl_id);
0537 
0538 /**
0539  * \ingroup H5M
0540  *
0541  * \brief Iterates over all key-value pairs in a map object
0542  *
0543  * \map_id
0544  * \param[in,out] idx iteration index
0545  * \type_id{key_mem_type_id}
0546  * \param[in] op User-defined iterator function
0547  * \op_data
0548  * \dxpl_id
0549  * \return \herr_t
0550  *
0551  * \details H5Miterate() iterates over all key-value pairs stored in the map
0552  *          object specified by \p map_id, making the callback specified by \p
0553  *          op for each. The \p idx parameter is an in/out parameter that may be
0554  *          used to restart a previously interrupted iteration. At the start of
0555  *          iteration \p idx should be set to 0, and to restart iteration at the
0556  *          same location on a subsequent call to H5Miterate(), \p idx should be
0557  *          the same value as returned by the previous call. Iterate callback is
0558  *          defined as:
0559  *          \snippet this H5M_iterate_t_snip
0560  *          The \p key parameter is the buffer for the key for this iteration,
0561  *          converted to the datatype specified by \p key_mem_type_id. The \p
0562  *          op_data parameter is a simple pass through of the value passed to
0563  *          H5Miterate(), which can be used to store application-defined data for
0564  *          iteration. A negative return value from this function will cause
0565  *          H5Miterate() to issue an error, while a positive return value will
0566  *          cause H5Miterate() to stop iterating and return this value without
0567  *          issuing an error. A return value of zero allows iteration to continue.
0568  *
0569  *          Any further options can be specified through the property list \p dxpl_id.
0570  *
0571  *  \warning Adding or removing key-value pairs to the map during iteration
0572  *           will lead to undefined behavior.
0573  *
0574  * \since 1.12.0
0575  *
0576  */
0577 H5_DLL herr_t H5Miterate(hid_t map_id, hsize_t *idx, hid_t key_mem_type_id, H5M_iterate_t op, void *op_data,
0578                          hid_t dxpl_id);
0579 
0580 /**
0581  * \ingroup H5M
0582  *
0583  * \brief Iterates over all key-value pairs in a map object
0584  *
0585  * \loc_id
0586  * \param[in] map_name Map object name relative to the location specified by \p loc_id
0587  * \param[in,out] idx Iteration index
0588  * \type_id{key_mem_type_id}
0589  * \param[in] op User-defined iterator function
0590  * \op_data
0591  * \dxpl_id
0592  * \lapl_id
0593  * \return \herr_t
0594  *
0595  * \details H5Miterate_by_name() iterates over all key-value pairs stored in the
0596  *          map object specified by \p map_id, making the callback specified by
0597  *          \p op for each. The \p idx parameter is an in/out parameter that may
0598  *          be used to restart a previously interrupted iteration. At the start
0599  *          of iteration \p idx should be set to 0, and to restart iteration at
0600  *          the same location on a subsequent call to H5Miterate(), \p idx
0601  *          should be the same value as returned by the previous call. Iterate
0602  *          callback is defined as:
0603  *          \snippet this H5M_iterate_t_snip
0604  *          The\p key parameter is the buffer for the key for this iteration,
0605  *          converted to the datatype specified by \p key_mem_type_id. The \p
0606  *          op_data parameter is a simple pass through of the value passed to
0607  *          H5Miterate(), which can be used to store application-defined data
0608  *          for iteration. A negative return value from this function will cause
0609  *          H5Miterate() to issue an error, while a positive return value will cause
0610  *          H5Miterate() to stop iterating and return this value without issuing an
0611  *          error. A return value of zero allows iteration to continue.
0612  *
0613  *          Any further options can be specified through the property list \p dxpl_id.
0614  *
0615  *  \warning Adding or removing key-value pairs to the map during iteration
0616  *           will lead to undefined behavior.
0617  *
0618  * \since 1.12.0
0619  *
0620  */
0621 H5_DLL herr_t H5Miterate_by_name(hid_t loc_id, const char *map_name, hsize_t *idx, hid_t key_mem_type_id,
0622                                  H5M_iterate_t op, void *op_data, hid_t dxpl_id, hid_t lapl_id);
0623 
0624 /**
0625  * \ingroup H5M
0626  *
0627  * \brief Deletes a key-value pair from a map object
0628  *
0629  * \map_id
0630  * \type_id{key_mem_type_id}
0631  * \param[in] key Pointer to key buffer
0632  * \dxpl_id
0633  * \return \herr_t
0634  *
0635  * \details H5Mdelete() deletes a key-value pair from the map object specified
0636  *          by \p map_id. \p key_mem_type_id specifies the datatype for the
0637  *          provided key buffer key, and if different from that used to create
0638  *          the map object, the key will be internally converted to the datatype
0639  *          for the map object.
0640  *
0641  *          Any further options can be specified through the property list \p dxpl_id.
0642  *
0643  * \since 1.12.0
0644  *
0645  */
0646 H5_DLL herr_t H5Mdelete(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t dxpl_id);
0647 
0648 /// \cond DEV
0649 /* API Wrappers for async routines */
0650 /* (Must be defined _after_ the function prototype) */
0651 /* (And must only defined when included in application code, not the library) */
0652 #ifndef H5M_MODULE
0653 #define H5Mcreate_async(...) H5Mcreate_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
0654 #define H5Mopen_async(...)   H5Mopen_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
0655 #define H5Mclose_async(...)  H5Mclose_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
0656 #define H5Mput_async(...)    H5Mput_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
0657 #define H5Mget_async(...)    H5Mget_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
0658 
0659 /* Define "wrapper" versions of function calls, to allow compile-time values to
0660  * be passed in by language wrapper or library layer on top of HDF5. */
0661 #define H5Mcreate_async_wrap H5_NO_EXPAND(H5Mcreate_async)
0662 #define H5Mopen_async_wrap   H5_NO_EXPAND(H5Mopen_async)
0663 #define H5Mclose_async_wrap  H5_NO_EXPAND(H5Mclose_async)
0664 #define H5Mput_async_wrap    H5_NO_EXPAND(H5Mput_async)
0665 #define H5Mget_async_wrap    H5_NO_EXPAND(H5Mget_async)
0666 #endif /* H5M_MODULE */
0667 /// \endcond
0668 
0669 /* Symbols defined for compatibility with previous versions of the HDF5 API.
0670  *
0671  * Use of these symbols is deprecated.
0672  */
0673 #ifndef H5_NO_DEPRECATED_SYMBOLS
0674 #endif /* H5_NO_DEPRECATED_SYMBOLS */
0675 
0676 #endif /*  H5_HAVE_MAP_API */
0677 
0678 #ifdef __cplusplus
0679 }
0680 #endif
0681 
0682 #endif /* H5Mpublic_H */