H5Part  1.6.6
Functions
Reading and Writing Attributes

Functions

h5part_int64_t H5PartWriteFileAttribFloat32 (H5PartFile *f, const char *name, const h5part_float32_t value)
 
h5part_int64_t H5PartWriteFileAttribFloat64 (H5PartFile *f, const char *name, const h5part_float64_t value)
 
h5part_int64_t H5PartWriteFileAttribInt32 (H5PartFile *f, const char *name, const h5part_int32_t value)
 
h5part_int64_t H5PartWriteFileAttribInt64 (H5PartFile *f, const char *name, const h5part_int64_t value)
 
h5part_int64_t H5PartWriteStepAttribFloat32 (H5PartFile *f, const char *name, const h5part_float32_t value)
 
h5part_int64_t H5PartWriteStepAttribFloat64 (H5PartFile *f, const char *name, const h5part_float64_t value)
 
h5part_int64_t H5PartWriteStepAttribInt32 (H5PartFile *f, const char *name, const h5part_int32_t value)
 
h5part_int64_t H5PartWriteStepAttribInt64 (H5PartFile *f, const char *name, const h5part_int64_t value)
 
h5part_int64_t H5PartWriteFileAttribString (H5PartFile *f, const char *name, const char *value)
 
h5part_int64_t H5PartWriteStepAttribString (H5PartFile *f, const char *name, const char *value)
 
h5part_int64_t H5PartWriteStepAttrib (H5PartFile *f, const char *name, const h5part_int64_t type, const void *data, const h5part_int64_t nelem)
 
h5part_int64_t H5PartWriteFileAttrib (H5PartFile *f, const char *name, const h5part_int64_t type, const void *data, const h5part_int64_t nelem)
 
h5part_int64_t H5PartGetNumStepAttribs (H5PartFile *f)
 
h5part_int64_t H5PartGetNumFileAttribs (H5PartFile *f)
 
h5part_int64_t H5PartGetStepAttribInfo (H5PartFile *f, const h5part_int64_t attrib_idx, char *attrib_name, const h5part_int64_t len_of_attrib_name, h5part_int64_t *attrib_type, h5part_int64_t *attrib_nelem)
 
h5part_int64_t H5PartGetFileAttribInfo (H5PartFile *f, const h5part_int64_t attrib_idx, char *attrib_name, const h5part_int64_t len_of_attrib_name, h5part_int64_t *attrib_type, h5part_int64_t *attrib_nelem)
 
h5part_int64_t H5PartReadStepAttrib (H5PartFile *f, const char *attrib_name, void *attrib_value)
 
h5part_int64_t H5PartReadFileAttrib (H5PartFile *f, const char *attrib_name, void *attrib_value)
 

Detailed Description

Function Documentation

◆ H5PartGetFileAttribInfo()

h5part_int64_t H5PartGetFileAttribInfo ( H5PartFile *  f,
const h5part_int64_t  attrib_idx,
char *  attrib_name,
const h5part_int64_t  len_of_attrib_name,
h5part_int64_t *  attrib_type,
h5part_int64_t *  attrib_nelem 
)

Gets the name, type and number of elements of the file attribute specified by its index.

This function can be used to retrieve all attributes bound to the file f by looping from 0 to the number of attribute minus one. The number of attributes bound to file f can be queried by calling the function H5PartGetNumFileAttribs().

Returns
H5PART_SUCCESS or error code
Parameters
[in]f[in] Handle to open file
[in]attrib_idx[in] Index of attribute to get infos about
[out]attrib_name[out] Name of attribute
[in]len_of_attrib_name[in] length of buffer name
[out]attrib_type[out] Type of value.
[out]attrib_nelem[out] Number of elements

◆ H5PartGetNumFileAttribs()

h5part_int64_t H5PartGetNumFileAttribs ( H5PartFile *  f)

Gets the number of attributes bound to the file.

Returns
Number of attributes bound to file f or error code.
Parameters
[in]f[in] Handle to open file

◆ H5PartGetNumStepAttribs()

h5part_int64_t H5PartGetNumStepAttribs ( H5PartFile *  f)

Gets the number of attributes bound to the current step.

Returns
Number of attributes bound to current time step or error code.
Parameters
[in]f[in] Handle to open file

◆ H5PartGetStepAttribInfo()

h5part_int64_t H5PartGetStepAttribInfo ( H5PartFile *  f,
const h5part_int64_t  attrib_idx,
char *  attrib_name,
const h5part_int64_t  len_of_attrib_name,
h5part_int64_t *  attrib_type,
h5part_int64_t *  attrib_nelem 
)

Gets the name, type and number of elements of the step attribute specified by its index.

This function can be used to retrieve all attributes bound to the current time-step by looping from 0 to the number of attribute minus one. The number of attributes bound to the current time-step can be queried by calling the function H5PartGetNumStepAttribs().

Returns
H5PART_SUCCESS or error code
Parameters
[in]f[in] Handle to open file
[in]attrib_idx[in] Index of attribute to get infos about
[out]attrib_name[out] Name of attribute
[in]len_of_attrib_name[in] length of buffer name
[out]attrib_type[out] Type of value.
[out]attrib_nelem[out] Number of elements

◆ H5PartReadFileAttrib()

h5part_int64_t H5PartReadFileAttrib ( H5PartFile *  f,
const char *  attrib_name,
void *  attrib_value 
)

Reads an attribute bound to file f.

Returns
H5PART_SUCCESS or error code

◆ H5PartReadStepAttrib()

h5part_int64_t H5PartReadStepAttrib ( H5PartFile *  f,
const char *  attrib_name,
void *  attrib_value 
)

Reads an attribute bound to current time-step.

Returns
H5PART_SUCCESS or error code
Parameters
[in]f[in] Handle to open file
[in]attrib_name[in] Name of attribute to read
[out]attrib_value[out] Value of attribute

◆ H5PartWriteFileAttrib()

h5part_int64_t H5PartWriteFileAttrib ( H5PartFile *  f,
const char *  name,
const h5part_int64_t  type,
const void *  data,
const h5part_int64_t  nelem 
)

Writes an attribute name with values in the array data of nelem elements to the file root ("/").

The type of data must ve specified using one of the folowing macros:

  • H5PART_FLOAT64 (for h5part_float64_t)
  • H5PART_FLOAT32 (for h5part_float32_t)
  • H5PART_INT64 (for h5part_int64_t)
  • H5PART_INT32 (for h5part_int32_t)
  • H5PART_CHAR (for char)
  • H5PART_STRING (for char*)
Returns
H5PART_SUCCESS or error code
Parameters
[in]f[in] Handle to open file
[in]name[in] Name of attribute
[in]type[in] Type of values
[in]data[in] Array of attribute values
[in]nelem[in] Number of array elements

◆ H5PartWriteFileAttribFloat32()

h5part_int64_t H5PartWriteFileAttribFloat32 ( H5PartFile *  f,
const char *  name,
const h5part_float32_t  value 
)

Writes a value of type floating points (32-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteFileAttribFloat64()

h5part_int64_t H5PartWriteFileAttribFloat64 ( H5PartFile *  f,
const char *  name,
const h5part_float64_t  value 
)

Writes a value of type floating points (64-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteFileAttribInt32()

h5part_int64_t H5PartWriteFileAttribInt32 ( H5PartFile *  f,
const char *  name,
const h5part_int32_t  value 
)

Writes a value of type integers (32-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteFileAttribInt64()

h5part_int64_t H5PartWriteFileAttribInt64 ( H5PartFile *  f,
const char *  name,
const h5part_int64_t  value 
)

Writes a value of type integers (64-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteFileAttribString()

h5part_int64_t H5PartWriteFileAttribString ( H5PartFile *  f,
const char *  name,
const char *  value 
)

}@

Writes an attribute name with the string value to the file root ("/").

Returns
H5PART_SUCCESS or error code
Parameters
[in]f[in] Handle to open file
[in]name[in] Name of attribute to create
[in]value[in] Value of attribute

◆ H5PartWriteStepAttrib()

h5part_int64_t H5PartWriteStepAttrib ( H5PartFile *  f,
const char *  name,
const h5part_int64_t  type,
const void *  data,
const h5part_int64_t  nelem 
)

Writes an attribute name with values in the array data of nelem elements to the current timestep.

The type of data must ve specified using one of the folowing macros:

  • H5PART_FLOAT64 (for h5part_float64_t)
  • H5PART_FLOAT32 (for h5part_float32_t)
  • H5PART_INT64 (for h5part_int64_t)
  • H5PART_INT32 (for h5part_int32_t)
  • H5PART_CHAR (for char)
  • H5PART_STRING (for char*)
Returns
H5PART_SUCCESS or error code
Parameters
[in]f[in] Handle to open file
[in]name[in] Name of attribute
[in]type[in] Type of values
[in]data[in] Array of attribute values
[in]nelem[in] Number of array elements

◆ H5PartWriteStepAttribFloat32()

h5part_int64_t H5PartWriteStepAttribFloat32 ( H5PartFile *  f,
const char *  name,
const h5part_float32_t  value 
)

Writes a value of type floating points (32-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteStepAttribFloat64()

h5part_int64_t H5PartWriteStepAttribFloat64 ( H5PartFile *  f,
const char *  name,
const h5part_float64_t  value 
)

Writes a value of type floating points (64-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteStepAttribInt32()

h5part_int64_t H5PartWriteStepAttribInt32 ( H5PartFile *  f,
const char *  name,
const h5part_int32_t  value 
)

Writes a value of type integers (32-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteStepAttribInt64()

h5part_int64_t H5PartWriteStepAttribInt64 ( H5PartFile *  f,
const char *  name,
const h5part_int64_t  value 
)

Writes a value of type integers (64-bit) to the root ("/") of the file as attribute name.

Returns
H5PART_SUCCESS or error code
Parameters
fIN: file handle
nameIN: attribute name
valueIN: attribute value

◆ H5PartWriteStepAttribString()

h5part_int64_t H5PartWriteStepAttribString ( H5PartFile *  f,
const char *  name,
const char *  value 
)

Writes an attribute name with the string value to the current timestep.

Returns
H5PART_SUCCESS or error code
Parameters
[in]f[in] Handle to open file
[in]name[in] Name of attribute to create
[in]value[in] Value of attribute