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

Last change on this file since 785 was 784, checked in by mhnguyen, 9 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
RevLine 
[591]1#include "xios.hpp"
[352]2#include "generate_interface.hpp"
[313]3#include "indent.hpp"
[352]4#include "attribute_template.hpp"
5#include "object_template.hpp"
6#include "group_template.hpp"
[369]7#include "context.hpp"
8#include "file.hpp"
[784]9#include "zoom_domain.hpp"
10#include "zoom_axis.hpp"
[313]11
12int main (int argc, char ** argv, char ** UNUSED (env))
13{
[549]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;
[313]21  CField field;
[549]22  CFieldGroup fieldgroup;
[472]23  CVariable variable;
[549]24  CVariableGroup variablegroup;
25  CDomain domain;
26  CDomainGroup domaingroup;
27  CGrid grid;
28  CGridGroup gridgroup;
29
[313]30  CFile afile;
31  CFileGroup filegroup;
[549]32
[784]33  CZoomDomain zoomDomain;
34  CZoomAxis zoomAxis;
35
[549]36  ostringstream oss;
[313]37  ofstream file;
[549]38
39  file.open((path+"axis_interface_attr.F90").c_str());
40  axis.generateFortran2003Interface(file);
[313]41  file.close();
[549]42
43  file.open((path+"icaxis_attr.cpp").c_str());
44  axis.generateCInterface(file);
[313]45  file.close();
[549]46
47  file.open((path+"iaxis_attr.F90").c_str());
48  axis.generateFortranInterface(file);
[313]49  file.close();
[549]50
51  file.open((path+"axisgroup_interface_attr.F90").c_str());
52  axisgroup.generateFortran2003Interface(file);
[313]53  file.close();
[549]54
55  file.open((path+"icaxisgroup_attr.cpp").c_str());
56  axisgroup.generateCInterface(file);
[313]57  file.close();
[549]58
59  file.open((path+"iaxisgroup_attr.F90").c_str());
60  axisgroup.generateFortranInterface(file);
[313]61  file.close();
[549]62
63  file.open((path+"domain_interface_attr.F90").c_str());
64  domain.generateFortran2003Interface(file);
[313]65  file.close();
[549]66
67  file.open((path+"icdomain_attr.cpp").c_str());
68  domain.generateCInterface(file);
[313]69  file.close();
[549]70
71  file.open((path+"idomain_attr.F90").c_str());
72  domain.generateFortranInterface(file);
[313]73  file.close();
[549]74
75  file.open((path+"domaingroup_interface_attr.F90").c_str());
76  domaingroup.generateFortran2003Interface(file);
[313]77  file.close();
[549]78
79  file.open((path+"icdomaingroup_attr.cpp").c_str());
80  domaingroup.generateCInterface(file);
[313]81  file.close();
[549]82
83  file.open((path+"idomaingroup_attr.F90").c_str());
84  domaingroup.generateFortranInterface(file);
[313]85  file.close();
[549]86
87
88  file.open((path+"grid_interface_attr.F90").c_str());
89  grid.generateFortran2003Interface(file);
[313]90  file.close();
[549]91
92  file.open((path+"icgrid_attr.cpp").c_str());
93  grid.generateCInterface(file);
[313]94  file.close();
[549]95
96  file.open((path+"igrid_attr.F90").c_str());
97  grid.generateFortranInterface(file);
[313]98  file.close();
[549]99
100  file.open((path+"gridgroup_interface_attr.F90").c_str());
101  gridgroup.generateFortran2003Interface(file);
[313]102  file.close();
[549]103
104  file.open((path+"icgridgroup_attr.cpp").c_str());
105  gridgroup.generateCInterface(file);
[313]106  file.close();
[549]107
108  file.open((path+"igridgroup_attr.F90").c_str());
109  gridgroup.generateFortranInterface(file);
[313]110  file.close();
[549]111
112
113  file.open((path+"field_interface_attr.F90").c_str());
114  field.generateFortran2003Interface(file);
[313]115  file.close();
[549]116
117  file.open((path+"icfield_attr.cpp").c_str());
118  field.generateCInterface(file);
[313]119  file.close();
[549]120
121  file.open((path+"ifield_attr.F90").c_str());
122  field.generateFortranInterface(file);
[313]123  file.close();
[549]124
125  file.open((path+"fieldgroup_interface_attr.F90").c_str());
126  fieldgroup.generateFortran2003Interface(file);
[313]127  file.close();
[549]128
129  file.open((path+"icfieldgroup_attr.cpp").c_str());
130  fieldgroup.generateCInterface(file);
[313]131  file.close();
[549]132
133  file.open((path+"ifieldgroup_attr.F90").c_str());
134  fieldgroup.generateFortranInterface(file);
[313]135  file.close();
136
137
[549]138
139  file.open((path+"variable_interface_attr.F90").c_str());
140  variable.generateFortran2003Interface(file);
[472]141  file.close();
[549]142
143  file.open((path+"icvariable_attr.cpp").c_str());
144  variable.generateCInterface(file);
[472]145  file.close();
[549]146
147  file.open((path+"ivariable_attr.F90").c_str());
148  variable.generateFortranInterface(file);
[472]149  file.close();
[549]150
151  file.open((path+"variablegroup_interface_attr.F90").c_str());
152  variablegroup.generateFortran2003Interface(file);
[472]153  file.close();
[549]154
155  file.open((path+"icvariablegroup_attr.cpp").c_str());
156  variablegroup.generateCInterface(file);
[472]157  file.close();
[549]158
159  file.open((path+"ivariablegroup_attr.F90").c_str());
160  variablegroup.generateFortranInterface(file);
[472]161  file.close();
162
163
164
[549]165  file.open((path+"file_interface_attr.F90").c_str());
166  afile.generateFortran2003Interface(file);
[313]167  file.close();
[549]168
169  file.open((path+"icfile_attr.cpp").c_str());
170  afile.generateCInterface(file);
[313]171  file.close();
[549]172
173  file.open((path+"ifile_attr.F90").c_str());
174  afile.generateFortranInterface(file);
[313]175  file.close();
[549]176
177  file.open((path+"filegroup_interface_attr.F90").c_str());
178  filegroup.generateFortran2003Interface(file);
[313]179  file.close();
[549]180
181  file.open((path+"icfilegroup_attr.cpp").c_str());
182  filegroup.generateCInterface(file);
[313]183  file.close();
[549]184
185  file.open((path+"ifilegroup_attr.F90").c_str());
186  filegroup.generateFortranInterface(file);
[313]187  file.close();
[549]188
189
190  file.open((path+"calendar_wrapper_interface_attr.F90").c_str());
191  calendarWrapper.generateFortran2003Interface(file);
[313]192  file.close();
[549]193
194  file.open((path+"iccalendar_wrapper_attr.cpp").c_str());
195  calendarWrapper.generateCInterface(file);
[313]196  file.close();
[549]197
198  file.open((path+"icalendar_wrapper_attr.F90").c_str());
199  calendarWrapper.generateFortranInterface(file);
[313]200  file.close();
[549]201
[784]202  file.open((path+"zoom_domain_interface_attr.F90").c_str());
203  zoomDomain.generateFortran2003Interface(file);
204  file.close();
[549]205
[784]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
[549]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
[784]238
239
[313]240}
Note: See TracBrowser for help on using the repository browser.