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 | |
---|
9 | int 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 | CComputeConnectivityDomain compConDomain; |
---|
36 | |
---|
37 | CInterpolateAxis interpolateAxis; |
---|
38 | CZoomAxis zoomAxis; |
---|
39 | CInverseAxis inverseAxis; |
---|
40 | |
---|
41 | CReduceAxisToScalar reduceAxisToScalar; |
---|
42 | |
---|
43 | ostringstream oss; |
---|
44 | ofstream file; |
---|
45 | |
---|
46 | file.open((path+"scalar_interface_attr.F90").c_str()); |
---|
47 | scalar.generateFortran2003Interface(file); |
---|
48 | file.close(); |
---|
49 | |
---|
50 | file.open((path+"icscalar_attr.cpp").c_str()); |
---|
51 | scalar.generateCInterface(file); |
---|
52 | file.close(); |
---|
53 | |
---|
54 | file.open((path+"iscalar_attr.F90").c_str()); |
---|
55 | scalar.generateFortranInterface(file); |
---|
56 | file.close(); |
---|
57 | |
---|
58 | file.open((path+"scalargroup_interface_attr.F90").c_str()); |
---|
59 | scalargroup.generateFortran2003Interface(file); |
---|
60 | file.close(); |
---|
61 | |
---|
62 | file.open((path+"icscalargroup_attr.cpp").c_str()); |
---|
63 | scalargroup.generateCInterface(file); |
---|
64 | file.close(); |
---|
65 | |
---|
66 | file.open((path+"iscalargroup_attr.F90").c_str()); |
---|
67 | scalargroup.generateFortranInterface(file); |
---|
68 | file.close(); |
---|
69 | |
---|
70 | file.open((path+"axis_interface_attr.F90").c_str()); |
---|
71 | axis.generateFortran2003Interface(file); |
---|
72 | file.close(); |
---|
73 | |
---|
74 | file.open((path+"icaxis_attr.cpp").c_str()); |
---|
75 | axis.generateCInterface(file); |
---|
76 | file.close(); |
---|
77 | |
---|
78 | file.open((path+"iaxis_attr.F90").c_str()); |
---|
79 | axis.generateFortranInterface(file); |
---|
80 | file.close(); |
---|
81 | |
---|
82 | file.open((path+"axisgroup_interface_attr.F90").c_str()); |
---|
83 | axisgroup.generateFortran2003Interface(file); |
---|
84 | file.close(); |
---|
85 | |
---|
86 | file.open((path+"icaxisgroup_attr.cpp").c_str()); |
---|
87 | axisgroup.generateCInterface(file); |
---|
88 | file.close(); |
---|
89 | |
---|
90 | file.open((path+"iaxisgroup_attr.F90").c_str()); |
---|
91 | axisgroup.generateFortranInterface(file); |
---|
92 | file.close(); |
---|
93 | |
---|
94 | file.open((path+"domain_interface_attr.F90").c_str()); |
---|
95 | domain.generateFortran2003Interface(file); |
---|
96 | file.close(); |
---|
97 | |
---|
98 | file.open((path+"icdomain_attr.cpp").c_str()); |
---|
99 | domain.generateCInterface(file); |
---|
100 | file.close(); |
---|
101 | |
---|
102 | file.open((path+"idomain_attr.F90").c_str()); |
---|
103 | domain.generateFortranInterface(file); |
---|
104 | file.close(); |
---|
105 | |
---|
106 | file.open((path+"domaingroup_interface_attr.F90").c_str()); |
---|
107 | domaingroup.generateFortran2003Interface(file); |
---|
108 | file.close(); |
---|
109 | |
---|
110 | file.open((path+"icdomaingroup_attr.cpp").c_str()); |
---|
111 | domaingroup.generateCInterface(file); |
---|
112 | file.close(); |
---|
113 | |
---|
114 | file.open((path+"idomaingroup_attr.F90").c_str()); |
---|
115 | domaingroup.generateFortranInterface(file); |
---|
116 | file.close(); |
---|
117 | |
---|
118 | |
---|
119 | file.open((path+"grid_interface_attr.F90").c_str()); |
---|
120 | grid.generateFortran2003Interface(file); |
---|
121 | file.close(); |
---|
122 | |
---|
123 | file.open((path+"icgrid_attr.cpp").c_str()); |
---|
124 | grid.generateCInterface(file); |
---|
125 | file.close(); |
---|
126 | |
---|
127 | file.open((path+"igrid_attr.F90").c_str()); |
---|
128 | grid.generateFortranInterface(file); |
---|
129 | file.close(); |
---|
130 | |
---|
131 | file.open((path+"gridgroup_interface_attr.F90").c_str()); |
---|
132 | gridgroup.generateFortran2003Interface(file); |
---|
133 | file.close(); |
---|
134 | |
---|
135 | file.open((path+"icgridgroup_attr.cpp").c_str()); |
---|
136 | gridgroup.generateCInterface(file); |
---|
137 | file.close(); |
---|
138 | |
---|
139 | file.open((path+"igridgroup_attr.F90").c_str()); |
---|
140 | gridgroup.generateFortranInterface(file); |
---|
141 | file.close(); |
---|
142 | |
---|
143 | |
---|
144 | file.open((path+"field_interface_attr.F90").c_str()); |
---|
145 | field.generateFortran2003Interface(file); |
---|
146 | file.close(); |
---|
147 | |
---|
148 | file.open((path+"icfield_attr.cpp").c_str()); |
---|
149 | field.generateCInterface(file); |
---|
150 | file.close(); |
---|
151 | |
---|
152 | file.open((path+"ifield_attr.F90").c_str()); |
---|
153 | field.generateFortranInterface(file); |
---|
154 | file.close(); |
---|
155 | |
---|
156 | file.open((path+"fieldgroup_interface_attr.F90").c_str()); |
---|
157 | fieldgroup.generateFortran2003Interface(file); |
---|
158 | file.close(); |
---|
159 | |
---|
160 | file.open((path+"icfieldgroup_attr.cpp").c_str()); |
---|
161 | fieldgroup.generateCInterface(file); |
---|
162 | file.close(); |
---|
163 | |
---|
164 | file.open((path+"ifieldgroup_attr.F90").c_str()); |
---|
165 | fieldgroup.generateFortranInterface(file); |
---|
166 | file.close(); |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | file.open((path+"variable_interface_attr.F90").c_str()); |
---|
171 | variable.generateFortran2003Interface(file); |
---|
172 | file.close(); |
---|
173 | |
---|
174 | file.open((path+"icvariable_attr.cpp").c_str()); |
---|
175 | variable.generateCInterface(file); |
---|
176 | file.close(); |
---|
177 | |
---|
178 | file.open((path+"ivariable_attr.F90").c_str()); |
---|
179 | variable.generateFortranInterface(file); |
---|
180 | file.close(); |
---|
181 | |
---|
182 | file.open((path+"variablegroup_interface_attr.F90").c_str()); |
---|
183 | variablegroup.generateFortran2003Interface(file); |
---|
184 | file.close(); |
---|
185 | |
---|
186 | file.open((path+"icvariablegroup_attr.cpp").c_str()); |
---|
187 | variablegroup.generateCInterface(file); |
---|
188 | file.close(); |
---|
189 | |
---|
190 | file.open((path+"ivariablegroup_attr.F90").c_str()); |
---|
191 | variablegroup.generateFortranInterface(file); |
---|
192 | file.close(); |
---|
193 | |
---|
194 | |
---|
195 | |
---|
196 | file.open((path+"file_interface_attr.F90").c_str()); |
---|
197 | afile.generateFortran2003Interface(file); |
---|
198 | file.close(); |
---|
199 | |
---|
200 | file.open((path+"icfile_attr.cpp").c_str()); |
---|
201 | afile.generateCInterface(file); |
---|
202 | file.close(); |
---|
203 | |
---|
204 | file.open((path+"ifile_attr.F90").c_str()); |
---|
205 | afile.generateFortranInterface(file); |
---|
206 | file.close(); |
---|
207 | |
---|
208 | file.open((path+"filegroup_interface_attr.F90").c_str()); |
---|
209 | filegroup.generateFortran2003Interface(file); |
---|
210 | file.close(); |
---|
211 | |
---|
212 | file.open((path+"icfilegroup_attr.cpp").c_str()); |
---|
213 | filegroup.generateCInterface(file); |
---|
214 | file.close(); |
---|
215 | |
---|
216 | file.open((path+"ifilegroup_attr.F90").c_str()); |
---|
217 | filegroup.generateFortranInterface(file); |
---|
218 | file.close(); |
---|
219 | |
---|
220 | |
---|
221 | file.open((path+"calendar_wrapper_interface_attr.F90").c_str()); |
---|
222 | calendarWrapper.generateFortran2003Interface(file); |
---|
223 | file.close(); |
---|
224 | |
---|
225 | file.open((path+"iccalendar_wrapper_attr.cpp").c_str()); |
---|
226 | calendarWrapper.generateCInterface(file); |
---|
227 | file.close(); |
---|
228 | |
---|
229 | file.open((path+"icalendar_wrapper_attr.F90").c_str()); |
---|
230 | calendarWrapper.generateFortranInterface(file); |
---|
231 | file.close(); |
---|
232 | |
---|
233 | file.open((path+"zoom_domain_interface_attr.F90").c_str()); |
---|
234 | zoomDomain.generateFortran2003Interface(file); |
---|
235 | file.close(); |
---|
236 | |
---|
237 | file.open((path+"iczoom_domain_attr.cpp").c_str()); |
---|
238 | zoomDomain.generateCInterface(file); |
---|
239 | file.close(); |
---|
240 | |
---|
241 | file.open((path+"izoom_domain_attr.F90").c_str()); |
---|
242 | zoomDomain.generateFortranInterface(file); |
---|
243 | file.close(); |
---|
244 | |
---|
245 | file.open((path+"zoom_axis_interface_attr.F90").c_str()); |
---|
246 | zoomAxis.generateFortran2003Interface(file); |
---|
247 | file.close(); |
---|
248 | |
---|
249 | file.open((path+"iczoom_axis_attr.cpp").c_str()); |
---|
250 | zoomAxis.generateCInterface(file); |
---|
251 | file.close(); |
---|
252 | |
---|
253 | file.open((path+"izoom_axis_attr.F90").c_str()); |
---|
254 | zoomAxis.generateFortranInterface(file); |
---|
255 | file.close(); |
---|
256 | |
---|
257 | file.open((path+"interpolate_axis_interface_attr.F90").c_str()); |
---|
258 | interpolateAxis.generateFortran2003Interface(file); |
---|
259 | file.close(); |
---|
260 | |
---|
261 | file.open((path+"icinterpolate_axis_attr.cpp").c_str()); |
---|
262 | interpolateAxis.generateCInterface(file); |
---|
263 | file.close(); |
---|
264 | |
---|
265 | file.open((path+"iinterpolate_axis_attr.F90").c_str()); |
---|
266 | interpolateAxis.generateFortranInterface(file); |
---|
267 | file.close(); |
---|
268 | |
---|
269 | file.open((path+"interpolate_domain_interface_attr.F90").c_str()); |
---|
270 | interpolateDomain.generateFortran2003Interface(file); |
---|
271 | file.close(); |
---|
272 | |
---|
273 | file.open((path+"icinterpolate_domain_attr.cpp").c_str()); |
---|
274 | interpolateDomain.generateCInterface(file); |
---|
275 | file.close(); |
---|
276 | |
---|
277 | file.open((path+"iinterpolate_domain_attr.F90").c_str()); |
---|
278 | interpolateDomain.generateFortranInterface(file); |
---|
279 | file.close(); |
---|
280 | |
---|
281 | file.open((path+"generate_rectilinear_domain_interface_attr.F90").c_str()); |
---|
282 | genDomain.generateFortran2003Interface(file); |
---|
283 | file.close(); |
---|
284 | |
---|
285 | file.open((path+"icgenerate_rectilinear_domain_attr.cpp").c_str()); |
---|
286 | genDomain.generateCInterface(file); |
---|
287 | file.close(); |
---|
288 | |
---|
289 | file.open((path+"igenerate_rectilinear_domain_attr.F90").c_str()); |
---|
290 | genDomain.generateFortranInterface(file); |
---|
291 | file.close(); |
---|
292 | |
---|
293 | file.open((path+"compute_connectivity_domain_interface_attr.F90").c_str()); |
---|
294 | compConDomain.generateFortran2003Interface(file); |
---|
295 | file.close(); |
---|
296 | |
---|
297 | file.open((path+"iccompute_connectivity_domain_attr.cpp").c_str()); |
---|
298 | compConDomain.generateCInterface(file); |
---|
299 | file.close(); |
---|
300 | |
---|
301 | file.open((path+"icompute_connectivity_domain_attr.F90").c_str()); |
---|
302 | compConDomain.generateFortranInterface(file); |
---|
303 | file.close(); |
---|
304 | |
---|
305 | |
---|
306 | |
---|
307 | |
---|
308 | file.open((path+"inverse_axis_interface_attr.F90").c_str()); |
---|
309 | inverseAxis.generateFortran2003Interface(file); |
---|
310 | file.close(); |
---|
311 | |
---|
312 | file.open((path+"icinverse_axis_attr.cpp").c_str()); |
---|
313 | inverseAxis.generateCInterface(file); |
---|
314 | file.close(); |
---|
315 | |
---|
316 | file.open((path+"iinverse_axis_attr.F90").c_str()); |
---|
317 | inverseAxis.generateFortranInterface(file); |
---|
318 | file.close(); |
---|
319 | |
---|
320 | file.open((path+"reduce_axis_to_scalar_interface_attr.F90").c_str()); |
---|
321 | reduceAxisToScalar.generateFortran2003Interface(file); |
---|
322 | file.close(); |
---|
323 | |
---|
324 | file.open((path+"icreduce_axis_to_scalar_attr.cpp").c_str()); |
---|
325 | reduceAxisToScalar.generateCInterface(file); |
---|
326 | file.close(); |
---|
327 | |
---|
328 | file.open((path+"ireduce_axis_to_scalar_attr.F90").c_str()); |
---|
329 | reduceAxisToScalar.generateFortranInterface(file); |
---|
330 | file.close(); |
---|
331 | |
---|
332 | file.open((path+"context_interface_attr.F90").c_str()); |
---|
333 | context->generateFortran2003Interface(file); |
---|
334 | file.close(); |
---|
335 | |
---|
336 | file.open((path+"iccontext_attr.cpp").c_str()); |
---|
337 | context->generateCInterface(file); |
---|
338 | file.close(); |
---|
339 | |
---|
340 | file.open((path+"icontext_attr.F90").c_str()); |
---|
341 | context->generateFortranInterface(file); |
---|
342 | file.close(); |
---|
343 | } |
---|