HL-HDF
|
Common functions for working with an HDF5 file through the HL-HDF API. More...
#include "hlhdf.h"
#include "hlhdf_private.h"
#include "hlhdf_debug.h"
#include "hlhdf_alloc.h"
#include "hlhdf_defines_private.h"
#include <string.h>
#include <stdlib.h>
Functions | |
void | HL_disableErrorReporting (void) |
Disables error reporting. | |
void | HL_enableErrorReporting (void) |
Enables error reporting. | |
int | HL_isErrorReportingEnabled (void) |
Returns if error reporting is enabled or not. | |
void | HL_init (void) |
Initializes the HLHDF handler functions. | |
void | HL_setDebugMode (int flag) |
Toggles the debug mode for HLHDF. | |
int | HL_isHDF5File (const char *filename) |
Verifies if the provided filename is a valid HDF5 file or not. | |
HL_FileCreationProperty * | HLFileCreationProperty_new (void) |
Creates a file property instance that can be passed on to createHlHdfFile when creating a HDF5 file. | |
void | HLFileCreationProperty_free (HL_FileCreationProperty *prop) |
Deallocates the HL_FileCreationProperty instance. | |
int | HL_sizeOfFormat (const char *format) |
Calculates the size in bytes of the provided format specifiers. | |
int | HL_isFormatSupported (const char *format) |
Verifies if the format name is supported by HLHDF. | |
HL_FormatSpecifier | HL_getFormatSpecifier (const char *format) |
Returns the format specifier for the provided format string. | |
const char * | HL_getFormatSpecifierString (HL_FormatSpecifier specifier) |
Returns the string representation of the provided specifier. | |
const char * | HL_getHDF5Version (void) |
Returns the version that was used for building this binary. | |
HL_Compression * | HLCompression_new (HL_CompressionType aType) |
Creates an allocated and initialized instance of HL_Compression. | |
HL_Compression * | HLCompression_clone (HL_Compression *inv) |
Creates a copy of the provided HL_Compression instance. | |
void | HLCompression_init (HL_Compression *inv, HL_CompressionType aType) |
Initializes a HL_Compressiosn instance. | |
void | HLCompression_free (HL_Compression *inv) |
Deallocates the HL_Compression instance. | |
hid_t | openHlHdfFile (const char *filename, const char *how) |
Opens a HDF5 file by specifying the file and an option mode. | |
hid_t | createHlHdfFile (const char *filename, HL_FileCreationProperty *property) |
Creates a HDF5 file. | |
hid_t | getFixedType (hid_t type) |
Translates a HDF5 type identifier into a native type identifier. | |
hid_t | HL_translateFormatSpecifierToType (HL_FormatSpecifier specifier) |
hid_t | HL_translateFormatStringToDatatype (const char *dataType) |
Returns a native data type from the format specifier. | |
char * | getTypeNameString (hid_t type) |
Returns the type as represented by HDF5. | |
HL_FormatSpecifier | HL_getFormatSpecifierFromType (hid_t type) |
Returns the format specifier for the provided type identifier. | |
const char * | getFormatNameString (hid_t type) |
Returns the format specifier as defined by HLHDF. | |
char * | getStringPadName (hid_t type) |
Returns the String Pad name as represented by HDF5. | |
char * | getStringCsetName (hid_t type) |
Returns the CSET name as represented in HDF5. | |
char * | getStringCtypeName (hid_t type) |
Returns the CTYPE name as represented in HDF5. | |
int | extractParentChildName (HL_Node *node, char **parent, char **child) |
Extracts the parent and child name from the node name. | |
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. | |
Common functions for working with an HDF5 file through the HL-HDF API.
hid_t createHlHdfFile | ( | const char * | filename, |
HL_FileCreationProperty * | property ) |
Creates a HDF5 file.
If the filename already exists this file will be truncated.
[in] | filename | the name of the file to create |
[in] | property | The properties for trimming the filesize and structure. (May be NULL) |
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'.
[in] | node | the node containing the name that should be splitted |
[out] | parent | the parent path |
[out] | child | this nodes name. |
hid_t getFixedType | ( | hid_t | type | ) |
Translates a HDF5 type identifier into a native type identifier.
This identifier is used within the HLHDF library.
[in] | type | the type that should be translated |
const char * getFormatNameString | ( | hid_t | type | ) |
Returns the format specifier as defined by HLHDF.
[in] | type | the type identifier, must be a native type. |
char * getStringCsetName | ( | hid_t | type | ) |
Returns the CSET name as represented in HDF5.
[in] | type | the type identifier |
char * getStringCtypeName | ( | hid_t | type | ) |
Returns the CTYPE name as represented in HDF5.
[in] | type | the type identifier |
char * getStringPadName | ( | hid_t | type | ) |
Returns the String Pad name as represented by HDF5.
[in] | type | the type identifier |
char * getTypeNameString | ( | hid_t | type | ) |
Returns the type as represented by HDF5.
For example 'H5T_STD_I8BE'.
[in] | type | the type identifier |
HL_FormatSpecifier HL_getFormatSpecifier | ( | const char * | format | ) |
Returns the format specifier for the provided format string.
[in] | format | the format name |
HL_FormatSpecifier HL_getFormatSpecifierFromType | ( | hid_t | type | ) |
Returns the format specifier for the provided type identifier.
[in] | type | the type identifier, must be a native type. |
const char * HL_getFormatSpecifierString | ( | HL_FormatSpecifier | specifier | ) |
Returns the string representation of the provided specifier.
[in] | specifier | - the specifier |
const char * HL_getHDF5Version | ( | void | ) |
Returns the version that was used for building this binary.
hid_t HL_translateFormatStringToDatatype | ( | const char * | dataType | ) |
Returns a native data type from the format specifier.
[in] | dataType | Format specifier. See here for valid format specifiers. |
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.
[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 |
hid_t openHlHdfFile | ( | const char * | filename, |
const char * | how ) |
Opens a HDF5 file by specifying the file and an option mode.
[in] | filename | the filename |
[in] | how | how the file should be opened, 'r', 'w' or 'rw' |