source: XIOS/trunk/src/generate_fortran_interface.cpp @ 895

Last change on this file since 895 was 891, checked in by mhnguyen, 8 years ago

Adding Fortran interface for reduce_axis_to_scalar

Test
+) On Curie
+) Only compilation

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 8.9 KB
Line 
1#include "xios.hpp"
2#include "generate_interface.hpp"
3#include "indent.hpp"
4#include "attribute_template.hpp"
5#include "object_template.hpp"
6#include "group_template.hpp"
7#include "node_type.hpp"
8
9int main (int argc, char ** argv, char ** UNUSED (env))
10{
11//  string path="./src/attr_interface/";
12  string path="./interface/";
13
14  CContext* context=CContext::create("interface");
15  CCalendarWrapper calendarWrapper;
16  CScalar scalar;
17  CScalarGroup scalargroup;
18  CAxis axis;
19  CAxisGroup axisgroup;
20  CField field;
21  CFieldGroup fieldgroup;
22  CVariable variable;
23  CVariableGroup variablegroup;
24  CDomain domain;
25  CDomainGroup domaingroup;
26  CGrid grid;
27  CGridGroup gridgroup;
28
29  CFile afile;
30  CFileGroup filegroup;
31
32  CInterpolateDomain interpolateDomain;
33  CZoomDomain zoomDomain;
34  CGenerateRectilinearDomain genDomain;
35
36  CInterpolateAxis interpolateAxis;
37  CZoomAxis zoomAxis;
38  CInverseAxis inverseAxis;
39
40  CReduceAxisToScalar reduceAxisToScalar;
41
42  ostringstream oss;
43  ofstream file;
44
45  file.open((path+"scalar_interface_attr.F90").c_str());
46  scalar.generateFortran2003Interface(file);
47  file.close();
48
49  file.open((path+"icscalar_attr.cpp").c_str());
50  scalar.generateCInterface(file);
51  file.close();
52
53  file.open((path+"iscalar_attr.F90").c_str());
54  scalar.generateFortranInterface(file);
55  file.close();
56
57  file.open((path+"scalargroup_interface_attr.F90").c_str());
58  scalargroup.generateFortran2003Interface(file);
59  file.close();
60
61  file.open((path+"icscalargroup_attr.cpp").c_str());
62  scalargroup.generateCInterface(file);
63  file.close();
64
65  file.open((path+"iscalargroup_attr.F90").c_str());
66  scalargroup.generateFortranInterface(file);
67  file.close();
68
69  file.open((path+"axis_interface_attr.F90").c_str());
70  axis.generateFortran2003Interface(file);
71  file.close();
72
73  file.open((path+"icaxis_attr.cpp").c_str());
74  axis.generateCInterface(file);
75  file.close();
76
77  file.open((path+"iaxis_attr.F90").c_str());
78  axis.generateFortranInterface(file);
79  file.close();
80
81  file.open((path+"axisgroup_interface_attr.F90").c_str());
82  axisgroup.generateFortran2003Interface(file);
83  file.close();
84
85  file.open((path+"icaxisgroup_attr.cpp").c_str());
86  axisgroup.generateCInterface(file);
87  file.close();
88
89  file.open((path+"iaxisgroup_attr.F90").c_str());
90  axisgroup.generateFortranInterface(file);
91  file.close();
92
93  file.open((path+"domain_interface_attr.F90").c_str());
94  domain.generateFortran2003Interface(file);
95  file.close();
96
97  file.open((path+"icdomain_attr.cpp").c_str());
98  domain.generateCInterface(file);
99  file.close();
100
101  file.open((path+"idomain_attr.F90").c_str());
102  domain.generateFortranInterface(file);
103  file.close();
104
105  file.open((path+"domaingroup_interface_attr.F90").c_str());
106  domaingroup.generateFortran2003Interface(file);
107  file.close();
108
109  file.open((path+"icdomaingroup_attr.cpp").c_str());
110  domaingroup.generateCInterface(file);
111  file.close();
112
113  file.open((path+"idomaingroup_attr.F90").c_str());
114  domaingroup.generateFortranInterface(file);
115  file.close();
116
117
118  file.open((path+"grid_interface_attr.F90").c_str());
119  grid.generateFortran2003Interface(file);
120  file.close();
121
122  file.open((path+"icgrid_attr.cpp").c_str());
123  grid.generateCInterface(file);
124  file.close();
125
126  file.open((path+"igrid_attr.F90").c_str());
127  grid.generateFortranInterface(file);
128  file.close();
129
130  file.open((path+"gridgroup_interface_attr.F90").c_str());
131  gridgroup.generateFortran2003Interface(file);
132  file.close();
133
134  file.open((path+"icgridgroup_attr.cpp").c_str());
135  gridgroup.generateCInterface(file);
136  file.close();
137
138  file.open((path+"igridgroup_attr.F90").c_str());
139  gridgroup.generateFortranInterface(file);
140  file.close();
141
142
143  file.open((path+"field_interface_attr.F90").c_str());
144  field.generateFortran2003Interface(file);
145  file.close();
146
147  file.open((path+"icfield_attr.cpp").c_str());
148  field.generateCInterface(file);
149  file.close();
150
151  file.open((path+"ifield_attr.F90").c_str());
152  field.generateFortranInterface(file);
153  file.close();
154
155  file.open((path+"fieldgroup_interface_attr.F90").c_str());
156  fieldgroup.generateFortran2003Interface(file);
157  file.close();
158
159  file.open((path+"icfieldgroup_attr.cpp").c_str());
160  fieldgroup.generateCInterface(file);
161  file.close();
162
163  file.open((path+"ifieldgroup_attr.F90").c_str());
164  fieldgroup.generateFortranInterface(file);
165  file.close();
166
167
168
169  file.open((path+"variable_interface_attr.F90").c_str());
170  variable.generateFortran2003Interface(file);
171  file.close();
172
173  file.open((path+"icvariable_attr.cpp").c_str());
174  variable.generateCInterface(file);
175  file.close();
176
177  file.open((path+"ivariable_attr.F90").c_str());
178  variable.generateFortranInterface(file);
179  file.close();
180
181  file.open((path+"variablegroup_interface_attr.F90").c_str());
182  variablegroup.generateFortran2003Interface(file);
183  file.close();
184
185  file.open((path+"icvariablegroup_attr.cpp").c_str());
186  variablegroup.generateCInterface(file);
187  file.close();
188
189  file.open((path+"ivariablegroup_attr.F90").c_str());
190  variablegroup.generateFortranInterface(file);
191  file.close();
192
193
194
195  file.open((path+"file_interface_attr.F90").c_str());
196  afile.generateFortran2003Interface(file);
197  file.close();
198
199  file.open((path+"icfile_attr.cpp").c_str());
200  afile.generateCInterface(file);
201  file.close();
202
203  file.open((path+"ifile_attr.F90").c_str());
204  afile.generateFortranInterface(file);
205  file.close();
206
207  file.open((path+"filegroup_interface_attr.F90").c_str());
208  filegroup.generateFortran2003Interface(file);
209  file.close();
210
211  file.open((path+"icfilegroup_attr.cpp").c_str());
212  filegroup.generateCInterface(file);
213  file.close();
214
215  file.open((path+"ifilegroup_attr.F90").c_str());
216  filegroup.generateFortranInterface(file);
217  file.close();
218
219
220  file.open((path+"calendar_wrapper_interface_attr.F90").c_str());
221  calendarWrapper.generateFortran2003Interface(file);
222  file.close();
223
224  file.open((path+"iccalendar_wrapper_attr.cpp").c_str());
225  calendarWrapper.generateCInterface(file);
226  file.close();
227
228  file.open((path+"icalendar_wrapper_attr.F90").c_str());
229  calendarWrapper.generateFortranInterface(file);
230  file.close();
231
232  file.open((path+"zoom_domain_interface_attr.F90").c_str());
233  zoomDomain.generateFortran2003Interface(file);
234  file.close();
235
236  file.open((path+"iczoom_domain_attr.cpp").c_str());
237  zoomDomain.generateCInterface(file);
238  file.close();
239
240  file.open((path+"izoom_domain_attr.F90").c_str());
241  zoomDomain.generateFortranInterface(file);
242  file.close();
243
244  file.open((path+"zoom_axis_interface_attr.F90").c_str());
245  zoomAxis.generateFortran2003Interface(file);
246  file.close();
247
248  file.open((path+"iczoom_axis_attr.cpp").c_str());
249  zoomAxis.generateCInterface(file);
250  file.close();
251
252  file.open((path+"izoom_axis_attr.F90").c_str());
253  zoomAxis.generateFortranInterface(file);
254  file.close();
255
256  file.open((path+"interpolate_axis_interface_attr.F90").c_str());
257  interpolateAxis.generateFortran2003Interface(file);
258  file.close();
259
260  file.open((path+"icinterpolate_axis_attr.cpp").c_str());
261  interpolateAxis.generateCInterface(file);
262  file.close();
263
264  file.open((path+"iinterpolate_axis_attr.F90").c_str());
265  interpolateAxis.generateFortranInterface(file);
266  file.close();
267
268  file.open((path+"interpolate_domain_interface_attr.F90").c_str());
269  interpolateDomain.generateFortran2003Interface(file);
270  file.close();
271
272  file.open((path+"icinterpolate_domain_attr.cpp").c_str());
273  interpolateDomain.generateCInterface(file);
274  file.close();
275
276  file.open((path+"iinterpolate_domain_attr.F90").c_str());
277  interpolateDomain.generateFortranInterface(file);
278  file.close();
279
280  file.open((path+"generate_rectilinear_domain_interface_attr.F90").c_str());
281  genDomain.generateFortran2003Interface(file);
282  file.close();
283
284  file.open((path+"icgenerate_rectilinear_domain_attr.cpp").c_str());
285  genDomain.generateCInterface(file);
286  file.close();
287
288  file.open((path+"igenerate_rectilinear_domain_attr.F90").c_str());
289  genDomain.generateFortranInterface(file);
290  file.close();
291
292  file.open((path+"inverse_axis_interface_attr.F90").c_str());
293  inverseAxis.generateFortran2003Interface(file);
294  file.close();
295
296  file.open((path+"icinverse_axis_attr.cpp").c_str());
297  inverseAxis.generateCInterface(file);
298  file.close();
299
300  file.open((path+"iinverse_axis_attr.F90").c_str());
301  inverseAxis.generateFortranInterface(file);
302  file.close();
303
304  file.open((path+"reduce_axis_to_scalar_interface_attr.F90").c_str());
305  reduceAxisToScalar.generateFortran2003Interface(file);
306  file.close();
307
308  file.open((path+"icreduce_axis_to_scalar_attr.cpp").c_str());
309  reduceAxisToScalar.generateCInterface(file);
310  file.close();
311
312  file.open((path+"ireduce_axis_to_scalar_attr.F90").c_str());
313  reduceAxisToScalar.generateFortranInterface(file);
314  file.close();
315
316  file.open((path+"context_interface_attr.F90").c_str());
317  context->generateFortran2003Interface(file);
318  file.close();
319
320  file.open((path+"iccontext_attr.cpp").c_str());
321  context->generateCInterface(file);
322  file.close();
323
324  file.open((path+"icontext_attr.F90").c_str());
325  context->generateFortranInterface(file);
326  file.close();
327}
Note: See TracBrowser for help on using the repository browser.