]> SALOME platform Git repositories - modules/kernel.git/blob - src/HDFPersist/HDFobjectIdentify.c
Salome HOME
NRI : KERNEL is now defined in KERNELCatalog.
[modules/kernel.git] / src / HDFPersist / HDFobjectIdentify.c
1 #include "hdfi.h"
2
3 /*
4  * - Name: HDFobjectIdentify
5  * - Description : find the name of the HDF object of rank "i" in the HDF
6  *     group "path"
7  * - Parameters :
8  *     - fid     (IN)     : l'ID du fichier o
9  *     - path  (IN)       : group access path
10  *     - i (IN)           : access rank
11  *     - name (OUT)       : expected name
12  * - Result : 
13  *     - if sucess : 0
14  *     - if failure : -1
15  */ 
16
17 hdf_err RankInfo(hdf_idt id, const char *name, void *data);
18
19 hdf_err HDFobjectIdentify(hdf_idt fid,char *path,int i,char *name)
20 {
21   int idx;
22
23   if ((idx = H5Giterate(fid,path,&i,RankInfo,
24                         name)) < 0)
25     return -1;
26
27   return 0;
28 }
29
30
31 hdf_err RankInfo(hdf_idt id, const char *name, void *data)
32 {
33   if (data != NULL)
34     strcpy(data,name);
35   else 
36     return -1;
37
38   return 1;
39 }