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

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

Generating Fortran interface for zoom_axis and zoom_domain

Test
+) On Curie
+) All results 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: 6.1 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
12int main (int argc, char ** argv, char ** UNUSED (env))
13{
14//  string path="./src/attr_interface/";
15  string path="./interface/";
16
17  CContext* context=CContext::create("interface");
18  CCalendarWrapper calendarWrapper;
19  CAxis axis;
20  CAxisGroup axisgroup;
21  CField field;
22  CFieldGroup fieldgroup;
23  CVariable variable;
24  CVariableGroup variablegroup;
25  CDomain domain;
26  CDomainGroup domaingroup;
27  CGrid grid;
28  CGridGroup gridgroup;
29
30  CFile afile;
31  CFileGroup filegroup;
32
33  CZoomDomain zoomDomain;
34  CZoomAxis zoomAxis;
35
36  ostringstream oss;
37  ofstream file;
38
39  file.open((path+"axis_interface_attr.F90").c_str());
40  axis.generateFortran2003Interface(file);
41  file.close();
42
43  file.open((path+"icaxis_attr.cpp").c_str());
44  axis.generateCInterface(file);
45  file.close();
46
47  file.open((path+"iaxis_attr.F90").c_str());
48  axis.generateFortranInterface(file);
49  file.close();
50
51  file.open((path+"axisgroup_interface_attr.F90").c_str());
52  axisgroup.generateFortran2003Interface(file);
53  file.close();
54
55  file.open((path+"icaxisgroup_attr.cpp").c_str());
56  axisgroup.generateCInterface(file);
57  file.close();
58
59  file.open((path+"iaxisgroup_attr.F90").c_str());
60  axisgroup.generateFortranInterface(file);
61  file.close();
62
63  file.open((path+"domain_interface_attr.F90").c_str());
64  domain.generateFortran2003Interface(file);
65  file.close();
66
67  file.open((path+"icdomain_attr.cpp").c_str());
68  domain.generateCInterface(file);
69  file.close();
70
71  file.open((path+"idomain_attr.F90").c_str());
72  domain.generateFortranInterface(file);
73  file.close();
74
75  file.open((path+"domaingroup_interface_attr.F90").c_str());
76  domaingroup.generateFortran2003Interface(file);
77  file.close();
78
79  file.open((path+"icdomaingroup_attr.cpp").c_str());
80  domaingroup.generateCInterface(file);
81  file.close();
82
83  file.open((path+"idomaingroup_attr.F90").c_str());
84  domaingroup.generateFortranInterface(file);
85  file.close();
86
87
88  file.open((path+"grid_interface_attr.F90").c_str());
89  grid.generateFortran2003Interface(file);
90  file.close();
91
92  file.open((path+"icgrid_attr.cpp").c_str());
93  grid.generateCInterface(file);
94  file.close();
95
96  file.open((path+"igrid_attr.F90").c_str());
97  grid.generateFortranInterface(file);
98  file.close();
99
100  file.open((path+"gridgroup_interface_attr.F90").c_str());
101  gridgroup.generateFortran2003Interface(file);
102  file.close();
103
104  file.open((path+"icgridgroup_attr.cpp").c_str());
105  gridgroup.generateCInterface(file);
106  file.close();
107
108  file.open((path+"igridgroup_attr.F90").c_str());
109  gridgroup.generateFortranInterface(file);
110  file.close();
111
112
113  file.open((path+"field_interface_attr.F90").c_str());
114  field.generateFortran2003Interface(file);
115  file.close();
116
117  file.open((path+"icfield_attr.cpp").c_str());
118  field.generateCInterface(file);
119  file.close();
120
121  file.open((path+"ifield_attr.F90").c_str());
122  field.generateFortranInterface(file);
123  file.close();
124
125  file.open((path+"fieldgroup_interface_attr.F90").c_str());
126  fieldgroup.generateFortran2003Interface(file);
127  file.close();
128
129  file.open((path+"icfieldgroup_attr.cpp").c_str());
130  fieldgroup.generateCInterface(file);
131  file.close();
132
133  file.open((path+"ifieldgroup_attr.F90").c_str());
134  fieldgroup.generateFortranInterface(file);
135  file.close();
136
137
138
139  file.open((path+"variable_interface_attr.F90").c_str());
140  variable.generateFortran2003Interface(file);
141  file.close();
142
143  file.open((path+"icvariable_attr.cpp").c_str());
144  variable.generateCInterface(file);
145  file.close();
146
147  file.open((path+"ivariable_attr.F90").c_str());
148  variable.generateFortranInterface(file);
149  file.close();
150
151  file.open((path+"variablegroup_interface_attr.F90").c_str());
152  variablegroup.generateFortran2003Interface(file);
153  file.close();
154
155  file.open((path+"icvariablegroup_attr.cpp").c_str());
156  variablegroup.generateCInterface(file);
157  file.close();
158
159  file.open((path+"ivariablegroup_attr.F90").c_str());
160  variablegroup.generateFortranInterface(file);
161  file.close();
162
163
164
165  file.open((path+"file_interface_attr.F90").c_str());
166  afile.generateFortran2003Interface(file);
167  file.close();
168
169  file.open((path+"icfile_attr.cpp").c_str());
170  afile.generateCInterface(file);
171  file.close();
172
173  file.open((path+"ifile_attr.F90").c_str());
174  afile.generateFortranInterface(file);
175  file.close();
176
177  file.open((path+"filegroup_interface_attr.F90").c_str());
178  filegroup.generateFortran2003Interface(file);
179  file.close();
180
181  file.open((path+"icfilegroup_attr.cpp").c_str());
182  filegroup.generateCInterface(file);
183  file.close();
184
185  file.open((path+"ifilegroup_attr.F90").c_str());
186  filegroup.generateFortranInterface(file);
187  file.close();
188
189
190  file.open((path+"calendar_wrapper_interface_attr.F90").c_str());
191  calendarWrapper.generateFortran2003Interface(file);
192  file.close();
193
194  file.open((path+"iccalendar_wrapper_attr.cpp").c_str());
195  calendarWrapper.generateCInterface(file);
196  file.close();
197
198  file.open((path+"icalendar_wrapper_attr.F90").c_str());
199  calendarWrapper.generateFortranInterface(file);
200  file.close();
201
202  file.open((path+"zoom_domain_interface_attr.F90").c_str());
203  zoomDomain.generateFortran2003Interface(file);
204  file.close();
205
206  file.open((path+"iczoom_domain_attr.cpp").c_str());
207  zoomDomain.generateCInterface(file);
208  file.close();
209
210  file.open((path+"izoom_domain_attr.F90").c_str());
211  zoomDomain.generateFortranInterface(file);
212  file.close();
213
214  file.open((path+"zoom_axis_interface_attr.F90").c_str());
215  zoomAxis.generateFortran2003Interface(file);
216  file.close();
217
218  file.open((path+"iczoom_axis_attr.cpp").c_str());
219  zoomAxis.generateCInterface(file);
220  file.close();
221
222  file.open((path+"izoom_axis_attr.F90").c_str());
223  zoomAxis.generateFortranInterface(file);
224  file.close();
225
226  file.open((path+"context_interface_attr.F90").c_str());
227  context->generateFortran2003Interface(file);
228  file.close();
229
230  file.open((path+"iccontext_attr.cpp").c_str());
231  context->generateCInterface(file);
232  file.close();
233
234  file.open((path+"icontext_attr.F90").c_str());
235  context->generateFortranInterface(file);
236  file.close();
237
238
239
240}
Note: See TracBrowser for help on using the repository browser.