HDF5 2.0.0.258fa78
API Reference
|
Functions | |
hid_t | H5Tenum_create (hid_t base_id) |
Creates a new enumeration datatype. | |
herr_t | H5Tenum_insert (hid_t type, const char *name, const void *value) |
Inserts a new enumeration datatype member. | |
herr_t | H5Tenum_nameof (hid_t type, const void *value, char *name, size_t size) |
Returns the symbol name corresponding to a specified member of an enumeration datatype. | |
herr_t | H5Tenum_valueof (hid_t type, const char *name, void *value) |
Returns the value corresponding to a specified member of an enumeration datatype. | |
herr_t | H5Tget_member_value (hid_t type_id, unsigned membno, void *value) |
Returns the value of an enumeration datatype member. | |
Creates a new enumeration datatype.
[in] | base_id | Datatype identifier for the base datatype. Must be an integer datatype |
H5Tenum_create() creates a new enumeration datatype based on the specified base datatype, dtype_id, which must be an integer datatype.
If a particular architecture datatype is required, a little endian or big endian datatype for example, use a native datatype as the base datatype and use H5Tconvert() on values as they are read from or written to a dataset.
Inserts a new enumeration datatype member.
[in] | type | Datatype identifier |
[in] | name | Name of the new member |
[in] | value | Pointer to the value of the new member |
H5Tenum_insert() inserts a new enumeration datatype member into an enumeration datatype.
type_id
is the datatype identifier for the enumeration datatype, name
is the name of the new member, and value
points to the value of the new member.
name
and value
must both be unique within dtype_id
.
value
points to data which must be of the integer base datatype used when the enumeration datatype was created. If a particular architecture datatype is required, a little endian or big endian datatype for example, use a native datatype as the base datatype and use H5Tconvert() on values as they are read from or written to a dataset.
Returns the symbol name corresponding to a specified member of an enumeration datatype.
[in] | type | Datatype identifier |
[in] | value | Value of the enumeration datatype |
[out] | name | Buffer for output of the symbol name |
[in] | size | Anticipated size of the symbol name, in bytes |
H5Tenum_nameof() finds the symbol name that corresponds to the specified value
of the enumeration datatype type
.
At most size
characters of the symbol name
are copied into the name
buffer. If the entire symbol name and null terminator do not fit in the name buffer, then as many characters as possible are copied (not null terminated) and the function fails.
Returns the value corresponding to a specified member of an enumeration datatype.
[in] | type | Datatype identifier |
[in] | name | Symbol name of the enumeration datatype |
[out] | value | Buffer for the value of the enumeration datatype |
H5Tenum_valueof() finds the value that corresponds to the specified name of the enumeration datatype dtype_id
.
Values returned in value
will be of the enumerated type's base type, that is, the datatype used by H5Tenum_create() when the enumerated type was created.
The value
buffer must be at least large enough to hold a value of that base type. If the size is unknown, you can determine it with H5Tget_size().
Returns the value of an enumeration datatype member.
[in] | type_id | Datatype identifier |
[in] | membno | Number of the enumeration datatype member |
[out] | value | Buffer for the value of the enumeration datatype member |
H5Tget_member_value() returns the value of the enumeration datatype member member_no
.
The member value is returned in a user-supplied buffer pointed to by value
. Values returned in value
will be of the enumerated type's base type, that is, the datatype used by H5Tenum_create() when the enumerated type was created.
The value buffer must be at least large enough to hold a value of that base type. If the size is unknown, you can determine it with H5Tget_size().