Class H5I
Inheritance
Namespace: HDF.PInvoke
Assembly: HDF.PInvoke.dll
Syntax
public sealed class H5I : object
Fields
| Improve this Doc View SourceH5_SIZEOF_HID_T
Declaration
public const int H5_SIZEOF_HID_T = null
Field Value
Type | Description |
---|---|
System.Int32 |
H5I_INVALID_HID
An invalid object ID. This is also negative for error return.
Declaration
public const System.Int64 H5I_INVALID_HID = null
Field Value
Type | Description |
---|---|
System.Int64 |
Methods
clear_type(H5I.type_t, System.UInt32)
Deletes all identifiers of the given type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-ClearType
Declaration
public static System.Int32 clear_type(H5I.type_t type, System.UInt32 force)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | Identifier of identifier type which is to be cleared of identifiers |
System.UInt32 | force | Whether or not to force deletion of all identifiers |
Returns
Type | Description |
---|---|
System.Int32 | Returns non-negative on success, negative on failure. |
dec_ref(System.Int64)
Decrements the reference count for an object. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-DecRef
Declaration
public static int dec_ref(System.Int64 obj_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Object identifier whose reference count will be modified. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative reference count of the object identifier after decrementing it, if successful; otherwise a negative value is returned. |
dec_type_ref(H5I.type_t)
Decrements the reference count on an identifier type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-DecTypeRef
Declaration
public static int dec_type_ref(H5I.type_t type)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | The identifier of the type whose reference count is to be decremented |
Returns
Type | Description |
---|---|
System.Int32 | Returns the current reference count on success, negative on failure. |
destroy_type(H5I.type_t)
Removes the type type and all identifiers within that type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-DestroyType
Declaration
public static System.Int32 destroy_type(H5I.type_t type)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | Identifier of identifier type which is to be destroyed |
Returns
Type | Description |
---|---|
System.Int32 | Returns non-negative on success, negative on failure. |
get_file_id(System.Int64)
Retrieves an identifier for the file containing the specified object. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetFileId
Declaration
public static System.Int64 get_file_id(System.Int64 obj_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Identifier of the object whose associated file identifier will be returned. |
Returns
Type | Description |
---|---|
System.Int64 | Returns a file identifier on success, negative on failure.S |
get_name(System.Int64, StringBuilder, System.IntPtr)
Retrieves a name of an object based on the object identifier. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetName
Declaration
public static System.IntPtr get_name(System.Int64 obj_id, StringBuilder name, System.IntPtr size)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Identifier of the object. This identifier can refer to a group, dataset, or named datatype. |
StringBuilder | name | A name associated with the identifier. |
System.IntPtr | size | The size of the name buffer; must be the size of the name in bytes plus 1 for a terminator.
|
Returns
Type | Description |
---|---|
System.IntPtr | Returns the length of the name if successful, returning 0 (zero) if no name is associated with the identifier. Otherwise returns a negative value. |
Remarks
ASCII strings ONLY! This function does not work with UTF-8 encoded strings. See JIRA issue HDF5/HDFFV-9686.
get_ref(System.Int64)
Retrieves the reference count for an object. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetRef
Declaration
public static int get_ref(System.Int64 obj_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Object identifier whose reference count will be retrieved. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative current reference count of the object identifier if successful; otherwise a negative value is returned. |
get_type(System.Int64)
Retrieves the type of an object. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetType
Declaration
public static H5I.type_t get_type(System.Int64 obj_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Object identifier whose type is to be determined. |
Returns
Type | Description |
---|---|
H5I.type_t | Returns the object type if successful; otherwise .
|
H5Iget_type_ref(H5I.type_t)
Retrieves the reference count on an ID type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetTypeRef
Declaration
public static int H5Iget_type_ref(H5I.type_t type)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | The identifier of the type whose reference count is to be retrieved |
Returns
Type | Description |
---|---|
System.Int32 | Returns the current reference count on success, negative on failure. |
inc_ref(System.Int64)
Increments the reference count for an object. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-IncRef
Declaration
public static int inc_ref(System.Int64 obj_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Object identifier whose reference count will be modified. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative reference count of the object ID after incrementing it if successful; otherwise a negative value is returned. |
inc_type_ref(H5I.type_t)
Increments the reference count on an ID type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-IncTypeRef
Declaration
public static int inc_type_ref(H5I.type_t type)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | The identifier of the type whose reference count is to be incremented |
Returns
Type | Description |
---|---|
System.Int32 | Returns the current reference count on success, negative on failure. |
is_valid(System.Int64)
Determines whether an identifier is valid. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-IsValid
Declaration
public static System.Int32 is_valid(System.Int64 obj_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Identifier to validate |
Returns
Type | Description |
---|---|
System.Int32 | Returns if obj_id is
valid and if invalid.
Otherwise returns a negative value.
|
nmembers(H5I.type_t, ref System.UInt64)
Returns the number of identifiers in a given identifier type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-NMembers
Declaration
public static System.Int32 nmembers(H5I.type_t type, ref System.UInt64 num_members)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | Identifier for the identifier type whose member count will be retrieved |
System.UInt64 | num_members | Number of identifiers of the specified identifier type. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value on success; otherwise returns negative value. |
object_verify(System.Int64, H5I.type_t)
Returns the object referenced by id. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-ObjectVerify
Declaration
public static IntPtr object_verify(System.Int64 id, H5I.type_t id_type)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | id | ID to be dereferenced |
H5I.type_t | id_type | ID type to which id should belong |
Returns
Type | Description |
---|---|
IntPtr | Pointer to the object referenced by id on success, on failure.
|
register(H5I.type_t, IntPtr)
Creates and returns a new ID. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-Register
Declaration
public static System.Int64 register(H5I.type_t type, IntPtr obj)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | The identifier of the type to which the new ID will belong |
IntPtr | obj | Pointer to memory for the library to store |
Returns
Type | Description |
---|---|
System.Int64 | Returns the new ID on success, negative on failure. |
register_type(System.IntPtr, UInt32, H5I.free_t)
Creates and returns a new ID type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-RegisterType
Declaration
public static H5I.type_t register_type(System.IntPtr hash_size, uint reserved, H5I.free_t free_func)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | hash_size | Size of the hash table (in entries) used to store IDs for the new type |
System.UInt32 | reserved | Number of reserved IDs for the new type |
H5I.free_t | free_func | Function used to deallocate space for a single ID |
Returns
Type | Description |
---|---|
H5I.type_t | Returns the type identifier on success, negative on failure. |
remove_verify(System.Int64, H5I.type_t)
Removes an ID from internal storage. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-RemoveVerify
Declaration
public static IntPtr remove_verify(System.Int64 id, H5I.type_t id_type)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | id | The ID to be removed from internal storage |
H5I.type_t | id_type | The identifier of the type whose reference count is to be retrieved |
Returns
Type | Description |
---|---|
IntPtr | Returns a pointer to the memory referred to by id on success, on failure.
|
search(H5I.type_t, H5I.search_func_t, IntPtr)
Finds the memory referred to by an ID within the given ID type such that some criterion is satisfied. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-Search
Declaration
public static IntPtr search(H5I.type_t type, H5I.search_func_t func, IntPtr key)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | The identifier of the type to be searched |
H5I.search_func_t | func | The function defining the search criteria |
IntPtr | key | A key for the search function |
Returns
Type | Description |
---|---|
IntPtr | Returns a pointer to the object which satisfies the search function on success, NULL on failure. |
type_exists(H5I.type_t)
Determines whether an identifier type is registered. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-TypeExists
Declaration
public static System.Int32 type_exists(H5I.type_t type)
Parameters
Type | Name | Description |
---|---|---|
H5I.type_t | type | Identifier type. |
Returns
Type | Description |
---|---|
System.Int32 | Returns 1 if the type is registered and 0 if not. Returns a negative value on failure. |