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

Last change on this file since 786 was 786, checked in by mhnguyen, 7 years ago

Generating interface for transformations

+) Update Fortran interface for other transformations
+) Remove some redundant files
+) Update test to new interface

Test
+) On Curie
+) test_client and test_complete are correct

  • 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: 7.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 "context.hpp"
8//#include "file.hpp"
9//#include "zoom_domain.hpp"
10//#include "zoom_axis.hpp"
11//#include "interpolate_axis.hpp"
12//#include "interpolate_domain.hpp"
13#include "node_type.hpp"
14
15int main (int argc, char ** argv, char ** UNUSED (env))
16{
17//  string path="./src/attr_interface/";
18  string path="./interface/";
19
20  CContext* context=CContext::create("interface");
21  CCalendarWrapper calendarWrapper;
22  CAxis axis;
23  CAxisGroup axisgroup;
24  CField field;
25  CFieldGroup fieldgroup;
26  CVariable variable;
27  CVariableGroup variablegroup;
28  CDomain domain;
29  CDomainGroup domaingroup;
30  CGrid grid;
31  CGridGroup gridgroup;
32
33  CFile afile;
34  CFileGroup filegroup;
35
36  CZoomDomain zoomDomain;
37  CZoomAxis zoomAxis;
38
39  CInterpolateAxis interpolateAxis;
40  CInterpolateDomain interpolateDomain;
41
42  CGenerateRectilinearDomain genDomain;
43  CInverseAxis inverseAxis;
44
45  ostringstream oss;
46  ofstream file;
47
48  file.open((path+"axis_interface_attr.F90").c_str());
49  axis.generateFortran2003Interface(file);
50  file.close();
51
52  file.open((path+"icaxis_attr.cpp").c_str());
53  axis.generateCInterface(file);
54  file.close();
55
56  file.open((path+"iaxis_attr.F90").c_str());
57  axis.generateFortranInterface(file);
58  file.close();
59
60  file.open((path+"axisgroup_interface_attr.F90").c_str());
61  axisgroup.generateFortran2003Interface(file);
62  file.close();
63
64  file.open((path+"icaxisgroup_attr.cpp").c_str());
65  axisgroup.generateCInterface(file);
66  file.close();
67
68  file.open((path+"iaxisgroup_attr.F90").c_str());
69  axisgroup.generateFortranInterface(file);
70  file.close();
71
72  file.open((path+"domain_interface_attr.F90").c_str());
73  domain.generateFortran2003Interface(file);
74  file.close();
75
76  file.open((path+"icdomain_attr.cpp").c_str());
77  domain.generateCInterface(file);
78  file.close();
79
80  file.open((path+"idomain_attr.F90").c_str());
81  domain.generateFortranInterface(file);
82  file.close();
83
84  file.open((path+"domaingroup_interface_attr.F90").c_str());
85  domaingroup.generateFortran2003Interface(file);
86  file.close();
87
88  file.open((path+"icdomaingroup_attr.cpp").c_str());
89  domaingroup.generateCInterface(file);
90  file.close();
91
92  file.open((path+"idomaingroup_attr.F90").c_str());
93  domaingroup.generateFortranInterface(file);
94  file.close();
95
96
97  file.open((path+"grid_interface_attr.F90").c_str());
98  grid.generateFortran2003Interface(file);
99  file.close();
100
101  file.open((path+"icgrid_attr.cpp").c_str());
102  grid.generateCInterface(file);
103  file.close();
104
105  file.open((path+"igrid_attr.F90").c_str());
106  grid.generateFortranInterface(file);
107  file.close();
108
109  file.open((path+"gridgroup_interface_attr.F90").c_str());
110  gridgroup.generateFortran2003Interface(file);
111  file.close();
112
113  file.open((path+"icgridgroup_attr.cpp").c_str());
114  gridgroup.generateCInterface(file);
115  file.close();
116
117  file.open((path+"igridgroup_attr.F90").c_str());
118  gridgroup.generateFortranInterface(file);
119  file.close();
120
121
122  file.open((path+"field_interface_attr.F90").c_str());
123  field.generateFortran2003Interface(file);
124  file.close();
125
126  file.open((path+"icfield_attr.cpp").c_str());
127  field.generateCInterface(file);
128  file.close();
129
130  file.open((path+"ifield_attr.F90").c_str());
131  field.generateFortranInterface(file);
132  file.close();
133
134  file.open((path+"fieldgroup_interface_attr.F90").c_str());
135  fieldgroup.generateFortran2003Interface(file);
136  file.close();
137
138  file.open((path+"icfieldgroup_attr.cpp").c_str());
139  fieldgroup.generateCInterface(file);
140  file.close();
141
142  file.open((path+"ifieldgroup_attr.F90").c_str());
143  fieldgroup.generateFortranInterface(file);
144  file.close();
145
146
147
148  file.open((path+"variable_interface_attr.F90").c_str());
149  variable.generateFortran2003Interface(file);
150  file.close();
151
152  file.open((path+"icvariable_attr.cpp").c_str());
153  variable.generateCInterface(file);
154  file.close();
155
156  file.open((path+"ivariable_attr.F90").c_str());
157  variable.generateFortranInterface(file);
158  file.close();
159
160  file.open((path+"variablegroup_interface_attr.F90").c_str());
161  variablegroup.generateFortran2003Interface(file);
162  file.close();
163
164  file.open((path+"icvariablegroup_attr.cpp").c_str());
165  variablegroup.generateCInterface(file);
166  file.close();
167
168  file.open((path+"ivariablegroup_attr.F90").c_str());
169  variablegroup.generateFortranInterface(file);
170  file.close();
171
172
173
174  file.open((path+"file_interface_attr.F90").c_str());
175  afile.generateFortran2003Interface(file);
176  file.close();
177
178  file.open((path+"icfile_attr.cpp").c_str());
179  afile.generateCInterface(file);
180  file.close();
181
182  file.open((path+"ifile_attr.F90").c_str());
183  afile.generateFortranInterface(file);
184  file.close();
185
186  file.open((path+"filegroup_interface_attr.F90").c_str());
187  filegroup.generateFortran2003Interface(file);
188  file.close();
189
190  file.open((path+"icfilegroup_attr.cpp").c_str());
191  filegroup.generateCInterface(file);
192  file.close();
193
194  file.open((path+"ifilegroup_attr.F90").c_str());
195  filegroup.generateFortranInterface(file);
196  file.close();
197
198
199  file.open((path+"calendar_wrapper_interface_attr.F90").c_str());
200  calendarWrapper.generateFortran2003Interface(file);
201  file.close();
202
203  file.open((path+"iccalendar_wrapper_attr.cpp").c_str());
204  calendarWrapper.generateCInterface(file);
205  file.close();
206
207  file.open((path+"icalendar_wrapper_attr.F90").c_str());
208  calendarWrapper.generateFortranInterface(file);
209  file.close();
210
211  file.open((path+"zoom_domain_interface_attr.F90").c_str());
212  zoomDomain.generateFortran2003Interface(file);
213  file.close();
214
215  file.open((path+"iczoom_domain_attr.cpp").c_str());
216  zoomDomain.generateCInterface(file);
217  file.close();
218
219  file.open((path+"izoom_domain_attr.F90").c_str());
220  zoomDomain.generateFortranInterface(file);
221  file.close();
222
223  file.open((path+"zoom_axis_interface_attr.F90").c_str());
224  zoomAxis.generateFortran2003Interface(file);
225  file.close();
226
227  file.open((path+"iczoom_axis_attr.cpp").c_str());
228  zoomAxis.generateCInterface(file);
229  file.close();
230
231  file.open((path+"izoom_axis_attr.F90").c_str());
232  zoomAxis.generateFortranInterface(file);
233  file.close();
234
235  file.open((path+"interpolate_axis_interface_attr.F90").c_str());
236  interpolateAxis.generateFortran2003Interface(file);
237  file.close();
238
239  file.open((path+"icinterpolate_axis_attr.cpp").c_str());
240  interpolateAxis.generateCInterface(file);
241  file.close();
242
243  file.open((path+"iinterpolate_axis_attr.F90").c_str());
244  interpolateAxis.generateFortranInterface(file);
245  file.close();
246
247  file.open((path+"interpolate_domain_interface_attr.F90").c_str());
248  interpolateDomain.generateFortran2003Interface(file);
249  file.close();
250
251  file.open((path+"icinterpolate_domain_attr.cpp").c_str());
252  interpolateDomain.generateCInterface(file);
253  file.close();
254
255  file.open((path+"iinterpolate_domain_attr.F90").c_str());
256  interpolateDomain.generateFortranInterface(file);
257  file.close();
258
259  file.open((path+"generate_rectilinear_domain_interface_attr.F90").c_str());
260  genDomain.generateFortran2003Interface(file);
261  file.close();
262
263  file.open((path+"icgenerate_rectilinear_domain_attr.cpp").c_str());
264  genDomain.generateCInterface(file);
265  file.close();
266
267  file.open((path+"igenerate_rectilinear_domain_attr.F90").c_str());
268  genDomain.generateFortranInterface(file);
269  file.close();
270
271  file.open((path+"inverse_axis_interface_attr.F90").c_str());
272  inverseAxis.generateFortran2003Interface(file);
273  file.close();
274
275  file.open((path+"icinverse_axis_attr.cpp").c_str());
276  inverseAxis.generateCInterface(file);
277  file.close();
278
279  file.open((path+"iinverse_axis_attr.F90").c_str());
280  inverseAxis.generateFortranInterface(file);
281  file.close();
282
283  file.open((path+"context_interface_attr.F90").c_str());
284  context->generateFortran2003Interface(file);
285  file.close();
286
287  file.open((path+"iccontext_attr.cpp").c_str());
288  context->generateCInterface(file);
289  file.close();
290
291  file.open((path+"icontext_attr.F90").c_str());
292  context->generateFortranInterface(file);
293  file.close();
294}
Note: See TracBrowser for help on using the repository browser.