Salome HOME
Initialisation de la base KERNEL avec la version operationnelle de KERNEL_SRC issue...
[modules/kernel.git] / src / HDFPersist / HDFattrRead.c
1 #include "hdfi.h"
2
3 /*
4  * - Name : HDFattrWrite
5  * - Description : write a value to a HDF attribute
6  * - Parameters :
7  *     - id   (IN) : attribute ID
8  *     - val  (OUT) : attribute value
9  * - Result : 
10  *     - if success : 0
11  *     - if failure : -1
12  */
13 hdf_err HDFattrRead(hdf_idt id,void *val)
14 {
15   hdf_err ret;
16   int type_hdf;
17
18   if ((type_hdf = H5Aget_type(id)) < 0)
19     return -1;
20
21   if ((ret = H5Aread(id,type_hdf,val)) < 0)
22     return -1;
23
24   return 0;
25 }