Salome HOME
updated copyright message
[modules/kernel.git] / src / HDFPersist / hdfi.h
1 /* Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
2  *
3  * Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4  * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19  *
20  * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21  */
22
23 /*----------------------------------------------------------------------
24   SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
25   File   : hdfi.h
26   Module : SALOME
27   ----------------------------------------------------------------------*/
28
29 #ifndef HDFI_H
30 #define HDFI_H
31
32 #include "HDFtypes.h"
33
34 /* HDF C INTERFACE */
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 /* File Interface */
40 extern
41 hdf_idt HDFfileCreate(char *name);
42
43 extern
44 hdf_err HDFfileClose(hdf_idt fid);
45
46 extern
47 hdf_idt HDFfileOpen(char *name,hdf_access_mode access_mode);
48
49 extern
50 hdf_err HDFfileMount(hdf_idt id,const char *name,hdf_idt fid);
51
52 extern
53 hdf_err HDFfileUmount(hdf_idt id,const char *name);
54
55 /* Group Interface */
56 extern
57 hdf_idt HDFgroupCreate(hdf_idt pid, char *name);
58
59 extern
60 hdf_idt HDFgroupOpen(hdf_idt pid, char *name);
61
62 extern 
63 hdf_err HDFgroupClose(hdf_idt id);
64
65 /* DataSet Interface */
66 extern 
67 hdf_idt HDFdatasetOpen(hdf_idt pid,char *name);
68
69 extern
70 hdf_err HDFdatasetClose(hdf_idt id);
71
72 extern
73 hdf_idt HDFdatasetCreate(hdf_idt pid,char *name, hdf_type type,
74                          hdf_size *dimd, int ndim, hdf_byte_order order, hdf_idt arrayId);
75
76 extern
77 hdf_err HDFdatasetWrite(hdf_idt id, void *val);
78
79 extern
80 hdf_err HDFdatasetRead(hdf_idt id, void *val);
81
82 extern
83 hdf_type HDFdatasetGetType(hdf_idt id);
84
85 extern
86 hdf_type HDFarrayGetType(hdf_idt id);
87
88 extern 
89 hdf_idt HDFarrayGetTypeId(hdf_idt type_id);
90
91 extern 
92 hdf_err HDFarrayClose(hdf_idt id);
93
94 extern 
95 int HDFarrayGetnDim(hdf_idt id);
96
97 extern 
98 hdf_err HDFarrayGetDim(hdf_idt id, hdf_size dim[]);
99
100
101 extern 
102 hdf_idt HDFarrayCreate(hdf_type dataType,int ndim,hdf_size *dim);
103
104 extern 
105 int HDFdatasetGetnDim(hdf_idt id);
106
107 extern 
108 hdf_err HDFdatasetGetDim(hdf_idt id,hdf_size dim[]);
109
110 extern
111 long HDFdatasetGetSize(hdf_idt id);
112
113 extern 
114 hdf_byte_order HDFdatasetGetOrder(hdf_idt id);
115
116 /* Attribute interface */
117 extern
118 hdf_idt HDFattrOpen(hdf_idt pid,char *name);
119
120 extern
121 hdf_err HDFattrClose(hdf_idt id);
122
123 extern
124 hdf_idt HDFattrCreate(hdf_idt pid,char *name,hdf_type type, size_t size);
125
126 extern
127 hdf_err HDFattrWrite(hdf_idt id,void *val);
128
129 extern
130 hdf_err HDFattrRead(hdf_idt id,void *val);
131
132 extern
133 hdf_type HDFattrGetType(hdf_idt id);
134
135 extern
136 hdf_type HDFattrGetSize(hdf_idt id);
137
138 /* HDF Tools */
139 extern
140 void HDFerrorModeLock();
141
142 extern
143 hdf_err
144 HDFnObjects(hdf_idt fid,const char *path,int *n);
145
146 extern
147 hdf_err HDFobjectIdentify(hdf_idt fid,const char *path,int i,char *name);
148
149 extern
150 hdf_err HDFobjectType(hdf_idt id, char *name, hdf_object_type *type);
151 #ifdef __cplusplus
152 }
153 #endif
154
155 #endif /* HDFI_H */