Private generic functions used within HLHDF that should not be exposed to the end-user.
More...
Go to the source code of this file.
Private generic functions used within HLHDF that should not be exposed to the end-user.
- Author
- Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
- Date
- 2009-06-11
◆ createHlHdfFile()
Creates a HDF5 file.
If the filename already exists this file will be truncated.
- Parameters
-
[in] | filename | the name of the file to create |
[in] | property | The properties for trimming the filesize and structure. (May be NULL) |
- Returns
- the file identifier or -1 on failure.
◆ extractParentChildName()
int extractParentChildName |
( |
HL_Node * | node, |
|
|
char ** | parent, |
|
|
char ** | child ) |
Extracts the parent and child name from the node name.
Example: '/group1/group2/group3' will be splitted into '/group1/group2' and 'group3'.
- Parameters
-
[in] | node | the node containing the name that should be splitted |
[out] | parent | the parent path |
[out] | child | this nodes name. |
- Returns
- 1 on success, otherwise 0.
◆ getFixedType()
hid_t getFixedType |
( |
hid_t | type | ) |
|
Translates a HDF5 type identifier into a native type identifier.
This identifier is used within the HLHDF library.
- Parameters
-
[in] | type | the type that should be translated |
- Returns
- a reference to the native type identifier, <0 on failure. Remember to call H5Tclose on the returned type.
◆ getFormatNameString()
const char * getFormatNameString |
( |
hid_t | type | ) |
|
Returns the format specifier as defined by HLHDF.
- Parameters
-
[in] | type | the type identifier, must be a native type. |
- Returns
- the format specifier string or NULL on failure. See here for valid values.
◆ getStringCsetName()
char * getStringCsetName |
( |
hid_t | type | ) |
|
Returns the CSET name as represented in HDF5.
- Parameters
-
[in] | type | the type identifier |
- Returns
- the CSET name as represented in HDF5.
◆ getStringCtypeName()
char * getStringCtypeName |
( |
hid_t | type | ) |
|
Returns the CTYPE name as represented in HDF5.
- Parameters
-
[in] | type | the type identifier |
- Returns
- the CTYPE name as represented in HDF5.
◆ getStringPadName()
char * getStringPadName |
( |
hid_t | type | ) |
|
Returns the String Pad name as represented by HDF5.
- Parameters
-
[in] | type | the type identifier |
- Returns
- the String Pad name as defined in HDF5.
◆ getTypeNameString()
char * getTypeNameString |
( |
hid_t | type | ) |
|
Returns the type as represented by HDF5.
For example 'H5T_STD_I8BE'.
- Parameters
-
[in] | type | the type identifier |
- Returns
- an allocated string with the name or NULL upon failure.
◆ HL_getFormatSpecifierFromType()
Returns the format specifier for the provided type identifier.
- Parameters
-
[in] | type | the type identifier, must be a native type. |
- Returns
- the format specifier or HLHDF_UNDEFINED on error.
◆ HL_translateFormatStringToDatatype()
hid_t HL_translateFormatStringToDatatype |
( |
const char * | dataType | ) |
|
Returns a native data type from the format specifier.
- Parameters
-
[in] | dataType | Format specifier. See here for valid format specifiers. |
- Returns
- the reference to the type or <0 on failure.
◆ openGroupOrDataset()
int openGroupOrDataset |
( |
hid_t | file_id, |
|
|
const char * | name, |
|
|
hid_t * | lid, |
|
|
HL_Type * | type ) |
Opens a group or dataset hid and returns the type as well.
- Parameters
-
[in] | file_id | - the file pointer |
[in] | name | - the node name to open |
[out] | lid | - the opened hid |
[out] | type | - the type of the opened hid |
- Returns
- 0 on failure, otherwise 1
◆ openHlHdfFile()
hid_t openHlHdfFile |
( |
const char * | filename, |
|
|
const char * | how ) |
Opens a HDF5 file by specifying the file and an option mode.
- Parameters
-
[in] | filename | the filename |
[in] | how | how the file should be opened, 'r', 'w' or 'rw' |
- Returns
- the file identifier or -1 on failure.