![]() |
|
|||
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 function prototypes for each exported function in 0015 * the H5I module. 0016 */ 0017 #ifndef H5Ipublic_H 0018 #define H5Ipublic_H 0019 0020 #include "H5public.h" /* Generic Functions */ 0021 0022 /** 0023 * Library type values. 0024 * \internal Library type values. Start with `1' instead of `0' because it 0025 * makes the tracing output look better when hid_t values are large 0026 * numbers. Change the TYPE_BITS in H5I.c if the MAXID gets larger 0027 * than 32 (an assertion will fail otherwise). 0028 * 0029 * When adding types here, add a section to the 'misc19' test in 0030 * test/tmisc.c to verify that the H5I{inc|dec|get}_ref() routines 0031 * work correctly with it. \endinternal 0032 */ 0033 //! <!-- [H5I_type_t_snip] --> 0034 typedef enum H5I_type_t { 0035 H5I_UNINIT = (-2), /**< uninitialized type */ 0036 H5I_BADID = (-1), /**< invalid Type */ 0037 H5I_FILE = 1, /**< type ID for File objects */ 0038 H5I_GROUP, /**< type ID for Group objects */ 0039 H5I_DATATYPE, /**< type ID for Datatype objects */ 0040 H5I_DATASPACE, /**< type ID for Dataspace objects */ 0041 H5I_DATASET, /**< type ID for Dataset objects */ 0042 H5I_MAP, /**< type ID for Map objects */ 0043 H5I_ATTR, /**< type ID for Attribute objects */ 0044 H5I_VFL, /**< type ID for virtual file layer */ 0045 H5I_VOL, /**< type ID for virtual object layer */ 0046 H5I_GENPROP_CLS, /**< type ID for generic property list classes */ 0047 H5I_GENPROP_LST, /**< type ID for generic property lists */ 0048 H5I_ERROR_CLASS, /**< type ID for error classes */ 0049 H5I_ERROR_MSG, /**< type ID for error messages */ 0050 H5I_ERROR_STACK, /**< type ID for error stacks */ 0051 H5I_SPACE_SEL_ITER, /**< type ID for dataspace selection iterator */ 0052 H5I_EVENTSET, /**< type ID for event sets */ 0053 H5I_NTYPES /**< number of library types, MUST BE LAST! */ 0054 } H5I_type_t; 0055 //! <!-- [H5I_type_t_snip] --> 0056 0057 /** 0058 * Type of IDs to return to users 0059 */ 0060 typedef int64_t hid_t; 0061 0062 #define PRIdHID PRId64 0063 #define PRIxHID PRIx64 0064 #define PRIXHID PRIX64 0065 #define PRIoHID PRIo64 0066 0067 /** 0068 * The size of identifiers 0069 */ 0070 #define H5_SIZEOF_HID_T H5_SIZEOF_INT64_T 0071 0072 /** 0073 * An invalid object ID. This is also negative for error return. 0074 */ 0075 #define H5I_INVALID_HID (-1) 0076 0077 /** 0078 * A function for freeing objects. This function will be called with a pointer 0079 * to the object and a pointer to a pointer to the asynchronous request object. 0080 * The function should free the object and return non-negative to indicate that 0081 * the object can be removed from the ID type. If the function returns negative 0082 * (failure) then the object will remain in the ID type. For asynchronous 0083 * operations and handling the request parameter, see the HDF5 user guide and 0084 * VOL connector author guide. 0085 */ 0086 typedef herr_t (*H5I_free_t)(void *obj, void **request); 0087 0088 /** 0089 * The type of a function to compare objects & keys 0090 */ 0091 //! <!-- [H5I_search_func_t_snip] --> 0092 typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key); 0093 //! <!-- [H5I_search_func_t_snip] --> 0094 0095 /** 0096 * The type of H5Iiterate() callback functions 0097 */ 0098 //! <!-- [H5I_iterate_func_t_snip] --> 0099 typedef herr_t (*H5I_iterate_func_t)(hid_t id, void *udata); 0100 //! <!-- [H5I_iterate_func_t_snip] --> 0101 0102 #ifdef __cplusplus 0103 extern "C" { 0104 #endif 0105 0106 /* Public API functions */ 0107 0108 /** 0109 * \ingroup H5IUD 0110 * 0111 * \brief Registers an object under a type and returns an ID for it 0112 * 0113 * \param[in] type The identifier of the type of the new ID 0114 * \param[in] object Pointer to object for which a new ID is created 0115 * 0116 * \return \hid_t{object} 0117 * 0118 * \details H5Iregister() creates and returns a new ID for an object. 0119 * 0120 * \details The \p type parameter is the identifier for the ID type to which 0121 * this new ID will belong. This identifier must have been created by 0122 * a call to H5Iregister_type(). 0123 * 0124 * \details The \p object parameter is a pointer to the memory which the new ID 0125 * will be a reference to. This pointer will be stored by the library 0126 * and returned via a call to H5Iobject_verify(). 0127 * 0128 * \since 1.8.0 0129 * 0130 */ 0131 H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object); 0132 /** 0133 * \ingroup H5IUD 0134 * 0135 * \brief Returns the object referenced by an ID 0136 * 0137 * \param[in] id ID to be dereferenced 0138 * \param[in] type The identifier type 0139 0140 * 0141 * \return Pointer to the object referenced by \p id on success, NULL on failure. 0142 * 0143 * \details H5Iobject_verify() returns a pointer to the memory referenced by id 0144 * after verifying that \p id is of type \p type. This function is 0145 * analogous to dereferencing a pointer in C with type checking. 0146 * 0147 * \note H5Iobject_verify() does not change the ID it is called on in any way 0148 * (as opposed to H5Iremove_verify(), which removes the ID from its 0149 * type's hash table). 0150 * 0151 * \see H5Iregister() 0152 * 0153 * \since 1.8.0 0154 * 0155 */ 0156 H5_DLL void *H5Iobject_verify(hid_t id, H5I_type_t type); 0157 /** 0158 * \ingroup H5IUD 0159 * 0160 * \brief Removes an ID from its type 0161 * 0162 * \param[in] id The ID to be removed from its type 0163 * \param[in] type The identifier type 0164 0165 * 0166 * \return Returns a pointer to the memory referred to by \p id on success, 0167 * NULL on failure. 0168 * 0169 * \details H5Iremove_verify() first ensures that \p id belongs to \p type. 0170 * If so, it removes \p id from its type and returns the pointer 0171 * to the memory it referred to. This pointer is the same pointer that 0172 * was placed in storage by H5Iregister(). If id does not belong to 0173 * \p type, then NULL is returned. 0174 * 0175 * The \p id parameter is the ID which is to be removed from its type. 0176 * 0177 * The \p type parameter is the identifier for the ID type which \p id 0178 * is supposed to belong to. This identifier must have been created by 0179 * a call to H5Iregister_type(). 0180 * 0181 * \note This function does NOT deallocate the memory that \p id refers to. 0182 * The pointer returned by H5Iregister() must be deallocated by the user 0183 * to avoid memory leaks. 0184 * 0185 * \since 1.8.0 0186 * 0187 */ 0188 H5_DLL void *H5Iremove_verify(hid_t id, H5I_type_t type); 0189 /** 0190 * \ingroup H5I 0191 * 0192 * \brief Retrieves the type of an object 0193 * 0194 * \obj_id{id} 0195 * 0196 * \return Returns the object type if successful; otherwise #H5I_BADID. 0197 * 0198 * \details H5Iget_type() retrieves the type of the object identified by 0199 * \p id. If no valid type can be determined or the identifier submitted is 0200 * invalid, the function returns #H5I_BADID. 0201 * 0202 * This function is of particular use in determining the type of 0203 * object closing function (H5Dclose(), H5Gclose(), etc.) to call 0204 * after a call to H5Rdereference(). 0205 * 0206 * \note Note that this function returns only the type of object that \p id 0207 * would identify if it were valid; it does not determine whether \p id 0208 * is valid identifier. Validity can be determined with a call to 0209 * H5Iis_valid(). 0210 * 0211 * \since 1.0.0 0212 * 0213 */ 0214 H5_DLL H5I_type_t H5Iget_type(hid_t id); 0215 /** 0216 * \ingroup H5I 0217 * 0218 * \brief Retrieves an identifier for the file containing the specified object 0219 * 0220 * \obj_id{id} 0221 * 0222 * \return \hid_t{file} 0223 * 0224 * \details H5Iget_file_id() returns the identifier of the file associated with 0225 * the object referenced by \p id. 0226 * 0227 * \note Note that the HDF5 library permits an application to close a file 0228 * while objects within the file remain open. If the file containing the 0229 * object \p id is still open, H5Iget_file_id() will retrieve the 0230 * existing file identifier. If there is no existing file identifier for 0231 * the file, i.e., the file has been closed, H5Iget_file_id() will reopen 0232 * the file and return a new file identifier. In either case, the file 0233 * identifier must eventually be released using H5Fclose(). 0234 * 0235 * \since 1.6.3 0236 * 0237 */ 0238 H5_DLL hid_t H5Iget_file_id(hid_t id); 0239 /** 0240 * \ingroup H5I 0241 * 0242 * \brief Retrieves a name of an object based on the object identifier 0243 * 0244 * \obj_id{id} 0245 * \param[out] name A buffer for the name associated with the identifier 0246 * \param[in] size The size, in bytes, of the \p name buffer. Must be the 0247 * size of the object name in bytes plus 1 for a NULL 0248 * terminator 0249 * 0250 * \return ssize_t 0251 * 0252 * \details H5Iget_name() retrieves a name for the object identified by \p id. 0253 * 0254 * \details Up to size characters of the name are returned in \p name; 0255 * additional characters, if any, are not returned to the user 0256 * application. 0257 * 0258 * \details_namelen{object,H5Iget_name} 0259 * 0260 * If the object identified by \p id is an attribute, as determined 0261 * via H5Iget_type(), H5Iget_name() retrieves the name of the object 0262 * to which that attribute is attached. To retrieve the name of the 0263 * attribute itself, use H5Aget_name(). 0264 * 0265 * If there is no name associated with the object identifier or if the 0266 * name is NULL, H5Iget_name() returns 0 (zero). 0267 * 0268 * \note Note that an object in an HDF5 file may have multiple paths if there 0269 * are multiple links pointing to it. This function may return any one of 0270 * these paths. When possible, H5Iget_name() returns the path with which 0271 * the object was opened. 0272 * 0273 * \since 1.6.0 0274 * 0275 */ 0276 H5_DLL ssize_t H5Iget_name(hid_t id, char *name /*out*/, size_t size); 0277 /** 0278 * \ingroup H5I 0279 * 0280 * \brief Increments the reference count for an object 0281 * 0282 * \obj_id{id} 0283 * 0284 * \return Returns a non-negative reference count of the object ID after 0285 * incrementing it if successful; otherwise a negative value is 0286 * returned. 0287 * 0288 * \details H5Iinc_ref() increments the reference count of the object 0289 * identified by \p id. 0290 * 0291 * The reference count for an object ID is attached to the information 0292 * about an object in memory and has no relation to the number of 0293 * links to an object on disk. 0294 * 0295 * The reference count for a newly created object will be 1. Reference 0296 * counts for objects may be explicitly modified with this function or 0297 * with H5Idec_ref(). When an object ID's reference count reaches 0298 * zero, the object will be closed. Calling an object ID's \c close 0299 * function decrements the reference count for the ID which normally 0300 * closes the object, but if the reference count for the ID has been 0301 * incremented with this function, the object will only be closed when 0302 * the reference count reaches zero with further calls to H5Idec_ref() 0303 * or the object ID's \c close function. 0304 * 0305 * If the object ID was created by a collective parallel call (such as 0306 * H5Dcreate(), H5Gopen(), etc.), the reference count should be 0307 * modified by all the processes which have copies of the ID. 0308 * Generally this means that group, dataset, attribute, file and named 0309 * datatype IDs should be modified by all the processes and that all 0310 * other types of IDs are safe to modify by individual processes. 0311 * 0312 * This function is of particular value when an application is 0313 * maintaining multiple copies of an object ID. The object ID can be 0314 * incremented when a copy is made. Each copy of the ID can then be 0315 * safely closed or decremented and the HDF5 object will be closed 0316 * when the reference count for that that object drops to zero. 0317 * 0318 * \since 1.6.3 0319 * 0320 */ 0321 H5_DLL int H5Iinc_ref(hid_t id); 0322 /** 0323 * \ingroup H5I 0324 * 0325 * \brief Decrements the reference count for an object 0326 * 0327 * \obj_id{id} 0328 * 0329 * \return Returns a non-negative reference count of the object ID after 0330 * decrementing it, if successful; otherwise a negative value is 0331 * returned. 0332 * 0333 * \details H5Idec_ref() decrements the reference count of the object 0334 * identified by \p id. 0335 * 0336 * The reference count for an object ID is attached to the information 0337 * about an object in memory and has no relation to the number of 0338 * links to an object on disk. 0339 * 0340 * The reference count for a newly created object will be 1. Reference 0341 * counts for objects may be explicitly modified with this function or 0342 * with H5Iinc_ref(). When an object identifier's reference count 0343 * reaches zero, the object will be closed. Calling an object 0344 * identifier's \c close function decrements the reference count for 0345 * the identifier, which normally closes the object, but if the 0346 * reference count for the identifier has been incremented with 0347 * H5Iinc_ref(), the object will only be closed when the reference 0348 * count reaches zero with further calls to this function or the 0349 * object identifier's \c close function. 0350 * 0351 * If the object ID was created by a collective parallel call (such as 0352 * H5Dcreate(), H5Gopen(), etc.), the reference count should be 0353 * modified by all the processes which have copies of the ID. 0354 * Generally, this means that group, dataset, attribute, file and named 0355 * datatype IDs should be modified by all the processes and that all 0356 * other types of IDs are safe to modify by individual processes. 0357 * 0358 * This function is of particular value when an application 0359 * maintains multiple copies of an object ID. The object ID can be 0360 * incremented when a copy is made. Each copy of the ID can then be 0361 * safely closed or decremented and the HDF5 object will be closed 0362 * when the reference count for that object drops to zero. 0363 * 0364 * \since 1.6.3 0365 * 0366 */ 0367 H5_DLL int H5Idec_ref(hid_t id); 0368 /** 0369 * \ingroup H5I 0370 * 0371 * \brief Retrieves the reference count for an object 0372 * 0373 * \obj_id{id} 0374 * 0375 * \return Returns a non-negative current reference count of the object 0376 * identifier if successful; otherwise a negative value is returned. 0377 * 0378 * \details H5Iget_ref() retrieves the reference count of the object identified 0379 * by \p id. 0380 * 0381 * The reference count for an object identifier is attached to the 0382 * information about an object in memory and has no relation to the 0383 * number of links to an object on disk. 0384 * 0385 * The function H5Iis_valid() is used to determine whether a specific 0386 * object identifier is valid. 0387 * 0388 * \since 1.6.3 0389 * 0390 */ 0391 H5_DLL int H5Iget_ref(hid_t id); 0392 /** 0393 * \ingroup H5IUD 0394 * 0395 * \brief Creates and returns a new ID type 0396 * 0397 * \param[in] hash_size Minimum hash table size (in entries) used to store IDs 0398 * for the new type (unused in 1.8.13 and later) 0399 * \param[in] reserved Number of reserved IDs for the new type 0400 * \param[in] free_func Function used to deallocate space for a single ID 0401 * 0402 * \return Returns the type identifier on success, negative on failure. 0403 * 0404 * \details H5Iregister_type() allocates space for a new ID type and returns an 0405 * identifier for it. 0406 * 0407 * The \p hash_size parameter indicates the minimum size of the hash 0408 * table used to store IDs in the new type. This parameter is unused 0409 * in 1.8.13 and later, when the implementation of ID storage changed. 0410 * 0411 * The \p reserved parameter indicates the number of IDs in this new 0412 * type to be reserved. Reserved IDs are valid IDs which are not 0413 * associated with any storage within the library. 0414 * 0415 * The \p free_func parameter is a function pointer to a function 0416 * which returns an herr_t and accepts a \c void*. The purpose of this 0417 * function is to deallocate memory for a single ID. It will be called 0418 * by H5Iclear_type() and H5Idestroy_type() on each ID. This function 0419 * is NOT called by H5Iremove_verify(). The \c void* will be the same 0420 * pointer which was passed in to the H5Iregister() function. The \p 0421 * free_func function should return 0 on success and -1 on failure. 0422 * 0423 * \since 1.8.0 0424 * 0425 */ 0426 H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func); 0427 /** 0428 * \ingroup H5IUD 0429 * 0430 * \brief Deletes all identifiers of the given type 0431 * 0432 * \param[in] type Identifier of identifier type which is to be cleared of identifiers 0433 * \param[in] force Whether or not to force deletion of all identifiers 0434 * 0435 * \return \herr_t 0436 * 0437 * \details H5Iclear_type() deletes all identifiers of the type identified by 0438 * the argument \p type. 0439 * 0440 * The identifier type's free function is first called on all of these 0441 * identifiers to free their memory, then they are removed from the 0442 * type. 0443 * 0444 * If the \p force flag is set to false, only those identifiers whose 0445 * reference counts are equal to 1 will be deleted, and all other 0446 * identifiers will be entirely unchanged. If the force flag is true, 0447 * all identifiers of this type will be deleted. 0448 * 0449 * \since 1.8.0 0450 * 0451 */ 0452 H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force); 0453 /** 0454 * \ingroup H5IUD 0455 * 0456 * \brief Removes an identifier type and all identifiers within that type 0457 * 0458 * \param[in] type Identifier of identifier type which is to be destroyed 0459 * 0460 * \return \herr_t 0461 * 0462 * \details H5Idestroy_type deletes an entire identifier type \p type. All 0463 * identifiers of this type are destroyed and no new identifiers of 0464 * this type can be registered. 0465 * 0466 * The type's free function is called on all of the identifiers which 0467 * are deleted by this function, freeing their memory. In addition, 0468 * all memory used by this type's hash table is freed. 0469 * 0470 * Since the H5I_type_t values of destroyed identifier types are 0471 * reused when new types are registered, it is a good idea to set the 0472 * variable holding the value of the destroyed type to #H5I_UNINIT. 0473 * 0474 * \since 1.8.0 0475 * 0476 */ 0477 H5_DLL herr_t H5Idestroy_type(H5I_type_t type); 0478 /** 0479 * \ingroup H5IUD 0480 * 0481 * \brief Increments the reference count on an ID type 0482 * 0483 * \param[in] type The identifier of the type whose reference count is to be incremented 0484 * 0485 * \return Returns the current reference count on success, negative on failure. 0486 * 0487 * \details H5Iinc_type_ref() increments the reference count on an ID type. The 0488 * reference count is used by the library to indicate when an ID type 0489 * can be destroyed. 0490 * 0491 * The type parameter is the identifier for the ID type whose 0492 * reference count is to be incremented. This identifier must have 0493 * been created by a call to H5Iregister_type(). 0494 * 0495 * \since 1.8.0 0496 * 0497 */ 0498 H5_DLL int H5Iinc_type_ref(H5I_type_t type); 0499 /** 0500 * \ingroup H5IUD 0501 * 0502 * \brief Decrements the reference count on an identifier type 0503 * 0504 * \param[in] type The identifier of the type whose reference count is to be decremented 0505 * 0506 * \return Returns the current reference count on success, negative on failure. 0507 * 0508 * \details H5Idec_type_ref() decrements the reference count on an identifier 0509 * type. The reference count is used by the library to indicate when 0510 * an identifier type can be destroyed. If the reference count reaches 0511 * zero, this function will destroy it. 0512 * 0513 * The type parameter is the identifier for the identifier type whose 0514 * reference count is to be decremented. This identifier must have 0515 * been created by a call to H5Iregister_type(). 0516 * 0517 * \since 1.8.0 0518 * 0519 */ 0520 H5_DLL int H5Idec_type_ref(H5I_type_t type); 0521 /** 0522 * \ingroup H5IUD 0523 * 0524 * \brief Retrieves the reference count on an ID type 0525 * 0526 * \param[in] type The identifier of the type whose reference count is to be retrieved 0527 * 0528 * \return Returns the current reference count on success, negative on failure. 0529 * 0530 * \details H5Iget_type_ref() retrieves the reference count on an ID type. The 0531 * reference count is used by the library to indicate when an ID type 0532 * can be destroyed. 0533 * 0534 * The type parameter is the identifier for the ID type whose 0535 * reference count is to be retrieved. This identifier must have been 0536 * created by a call to H5Iregister_type(). 0537 * 0538 * \since 1.8.0 0539 * 0540 */ 0541 H5_DLL int H5Iget_type_ref(H5I_type_t type); 0542 /** 0543 * \ingroup H5IUD 0544 * 0545 * \brief Finds the memory referred to by an ID within the given ID type such 0546 * that some criterion is satisfied 0547 * 0548 * \param[in] type The identifier of the type to be searched 0549 * \param[in] func The function defining the search criteria 0550 * \param[in] key A key for the search function 0551 * 0552 * \return Returns a pointer to the object which satisfies the search function 0553 * on success, NULL on failure. 0554 * 0555 * \details H5Isearch() searches through a given ID type to find an object that 0556 * satisfies the criteria defined by \p func. If such an object is 0557 * found, the pointer to the memory containing this object is 0558 * returned. Otherwise, NULL is returned. To do this, \p func is 0559 * called on every member of type \p type. The first member to satisfy 0560 * \p func is returned. 0561 * 0562 * The \p type parameter is the identifier for the ID type which is to 0563 * be searched. This identifier must have been created by a call to 0564 * H5Iregister_type(). 0565 * 0566 * The parameter \p func is a function pointer to a function which 0567 * takes three parameters. The first parameter is a \c void* and will 0568 * be a pointer to the object to be tested. This is the same object 0569 * that was placed in storage using H5Iregister(). The second 0570 * parameter is a hid_t and is the ID of the object to be tested. The 0571 * last parameter is a \c void*. This is the \p key parameter and can 0572 * be used however the user finds helpful, or it can be ignored if it 0573 * is not needed. \p func returns 0 if the object it is testing does 0574 * not pass its criteria. A non-zero value should be returned if the 0575 * object does pass its criteria. H5I_search_func_t is defined in 0576 * H5Ipublic.h and is shown below. 0577 * \snippet this H5I_search_func_t_snip 0578 * The \p key parameter will be passed to the search function as a 0579 * parameter. It can be used to further define the search at run-time. 0580 * 0581 * \since 1.8.0 0582 * 0583 */ 0584 H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key); 0585 /** 0586 * \ingroup H5IUD 0587 * 0588 * \brief Calls a callback for each member of the identifier type specified 0589 * 0590 * \param[in] type The identifier type 0591 * \param[in] op The callback function 0592 * \param[in,out] op_data The data for the callback function 0593 * 0594 * \return The last value returned by \p op 0595 * 0596 * \details H5Iiterate() calls the callback function \p op for each member of 0597 * the identifier type \p type. The callback function type for \p op, 0598 * H5I_iterate_func_t, is defined in H5Ipublic.h as: 0599 * \snippet this H5I_iterate_func_t_snip 0600 * \p op takes as parameters the identifier and a pass through of 0601 * \p op_data, and returns an herr_t. 0602 * 0603 * A positive return from op will cause the iteration to stop and 0604 * H5Iiterate() will return the value returned by \p op. A negative 0605 * return from \p op will cause the iteration to stop and H5Iiterate() 0606 * will return failure. A zero return from \p op will allow iteration 0607 * to continue, as long as there are other identifiers remaining in 0608 * type. 0609 * 0610 * \warning Adding or removing members of the identifier type during iteration 0611 * will lead to undefined behavior. 0612 * 0613 * \since 1.12.0 0614 * 0615 */ 0616 H5_DLL herr_t H5Iiterate(H5I_type_t type, H5I_iterate_func_t op, void *op_data); 0617 /** 0618 * \ingroup H5IUD 0619 * 0620 * \brief Returns the number of identifiers in a given identifier type 0621 * 0622 * \param[in] type The identifier type 0623 * \param[out] num_members Number of identifiers of the specified identifier type 0624 * 0625 * \return \herr_t 0626 * 0627 * \details H5Inmembers() returns the number of identifiers of the identifier 0628 * type specified in \p type. 0629 * 0630 * The number of identifiers is returned in \p num_members. If no 0631 * identifiers of this type have been registered, the type does not 0632 * exist, or it has been destroyed, \p num_members is returned with 0633 * the value 0. 0634 * 0635 * \since 1.8.0 0636 * 0637 */ 0638 H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members); 0639 /** 0640 * \ingroup H5IUD 0641 * 0642 * \brief Determines whether an identifier type is registered 0643 * 0644 * \param[in] type Identifier type 0645 * 0646 * \return \htri_t 0647 * 0648 * \details H5Itype_exists() determines whether the given identifier type, 0649 * \p type, is registered with the library. 0650 * 0651 * \since 1.8.0 0652 * 0653 */ 0654 H5_DLL htri_t H5Itype_exists(H5I_type_t type); 0655 /** 0656 * \ingroup H5I 0657 * 0658 * \brief Determines whether an identifier is valid 0659 * 0660 * \obj_id{id} 0661 * 0662 * \return \htri_t 0663 * 0664 * \details H5Iis_valid() determines whether the identifier \p id is valid. 0665 * 0666 * \details Valid identifiers are those that have been obtained by an 0667 * application and can still be used to access the original target. 0668 * Examples of invalid identifiers include: 0669 * \li Out-of-range values: negative, for example 0670 * \li Previously-valid identifiers that have been released: 0671 * for example, a dataset identifier for which the dataset has 0672 * been closed 0673 * 0674 * H5Iis_valid() can be used with any type of identifier: object 0675 * identifier, property list identifier, attribute identifier, error 0676 * message identifier, etc. When necessary, a call to H5Iget_type() 0677 * can determine the type of object that the \p id identifies. 0678 * 0679 * \since 1.8.3 0680 * 0681 */ 0682 H5_DLL htri_t H5Iis_valid(hid_t id); 0683 0684 #ifdef __cplusplus 0685 } 0686 #endif 0687 #endif /* H5Ipublic_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |