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

Last change on this file since 470 was 369, checked in by ymipsl, 12 years ago

Major Update

  • redesign Type and attribute manipulation
  • add enumerate type and attribute
  • use blitz class array instead of boost class array

YM

  • Property svn:eol-style set to native
File size: 4.4 KB
Line 
1#include "xmlioserver.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
10int main (int argc, char ** argv, char ** UNUSED (env))
11{
12//  string path="./src/attr_interface/" ;
13  string path="./interface/" ;
14 
15  CContext* context=CContext::create("interface") ;
16  CAxis axis ;
17  CAxisGroup axisgroup ;
18  CField field;
19  CFieldGroup fieldgroup ;
20  CDomain domain ;
21  CDomainGroup domaingroup ;
22  CGrid grid ;
23  CGridGroup gridgroup ;
24 
25  CFile afile;
26  CFileGroup filegroup;
27 
28  ostringstream oss ;
29  ofstream file;
30 
31  file.open((path+"axis_interface_attr.f90").c_str()); 
32  axis.generateFortran2003Interface(file) ;
33  file.close();
34 
35  file.open((path+"icaxis_attr.cpp").c_str()); 
36  axis.generateCInterface(file) ;
37  file.close();
38 
39  file.open((path+"iaxis_attr.F90").c_str()); 
40  axis.generateFortranInterface(file) ;
41  file.close();
42 
43  file.open((path+"axisgroup_interface_attr.f90").c_str()); 
44  axisgroup.generateFortran2003Interface(file) ;
45  file.close();
46 
47  file.open((path+"icaxisgroup_attr.cpp").c_str()); 
48  axisgroup.generateCInterface(file) ;
49  file.close();
50 
51  file.open((path+"iaxisgroup_attr.F90").c_str()); 
52  axisgroup.generateFortranInterface(file) ;
53  file.close();
54 
55  file.open((path+"domain_interface_attr.f90").c_str()); 
56  domain.generateFortran2003Interface(file) ;
57  file.close();
58 
59  file.open((path+"icdomain_attr.cpp").c_str()); 
60  domain.generateCInterface(file) ;
61  file.close();
62 
63  file.open((path+"idomain_attr.F90").c_str()); 
64  domain.generateFortranInterface(file) ;
65  file.close();
66 
67  file.open((path+"domaingroup_interface_attr.f90").c_str()); 
68  domaingroup.generateFortran2003Interface(file) ;
69  file.close();
70 
71  file.open((path+"icdomaingroup_attr.cpp").c_str()); 
72  domaingroup.generateCInterface(file) ;
73  file.close();
74 
75  file.open((path+"idomaingroup_attr.F90").c_str()); 
76  domaingroup.generateFortranInterface(file) ;
77  file.close();
78 
79 
80  file.open((path+"grid_interface_attr.f90").c_str()); 
81  grid.generateFortran2003Interface(file) ;
82  file.close();
83 
84  file.open((path+"icgrid_attr.cpp").c_str()); 
85  grid.generateCInterface(file) ;
86  file.close();
87 
88  file.open((path+"igrid_attr.F90").c_str()); 
89  grid.generateFortranInterface(file) ;
90  file.close();
91 
92  file.open((path+"gridgroup_interface_attr.f90").c_str()); 
93  gridgroup.generateFortran2003Interface(file) ;
94  file.close();
95 
96  file.open((path+"icgridgroup_attr.cpp").c_str()); 
97  gridgroup.generateCInterface(file) ;
98  file.close();
99 
100  file.open((path+"igridgroup_attr.F90").c_str()); 
101  gridgroup.generateFortranInterface(file) ;
102  file.close();
103 
104 
105  file.open((path+"field_interface_attr.f90").c_str()); 
106  field.generateFortran2003Interface(file) ;
107  file.close();
108 
109  file.open((path+"icfield_attr.cpp").c_str()); 
110  field.generateCInterface(file) ;
111  file.close();
112 
113  file.open((path+"ifield_attr.F90").c_str()); 
114  field.generateFortranInterface(file) ;
115  file.close();
116 
117  file.open((path+"fieldgroup_interface_attr.f90").c_str()); 
118  fieldgroup.generateFortran2003Interface(file) ;
119  file.close();
120 
121  file.open((path+"icfieldgroup_attr.cpp").c_str()); 
122  fieldgroup.generateCInterface(file) ;
123  file.close();
124 
125  file.open((path+"ifieldgroup_attr.F90").c_str()); 
126  fieldgroup.generateFortranInterface(file) ;
127  file.close();
128 
129
130
131  file.open((path+"file_interface_attr.f90").c_str()); 
132  afile.generateFortran2003Interface(file) ;
133  file.close();
134 
135  file.open((path+"icfile_attr.cpp").c_str()); 
136  afile.generateCInterface(file) ;
137  file.close();
138 
139  file.open((path+"ifile_attr.F90").c_str()); 
140  afile.generateFortranInterface(file) ;
141  file.close();
142 
143  file.open((path+"filegroup_interface_attr.f90").c_str()); 
144  filegroup.generateFortran2003Interface(file) ;
145  file.close();
146 
147  file.open((path+"icfilegroup_attr.cpp").c_str()); 
148  filegroup.generateCInterface(file) ;
149  file.close();
150 
151  file.open((path+"ifilegroup_attr.F90").c_str()); 
152  filegroup.generateFortranInterface(file) ;
153  file.close();
154 
155 
156  file.open((path+"context_interface_attr.f90").c_str()); 
157  context->generateFortran2003Interface(file) ;
158  file.close();
159 
160  file.open((path+"iccontext_attr.cpp").c_str()); 
161  context->generateCInterface(file) ;
162  file.close();
163 
164  file.open((path+"icontext_attr.F90").c_str()); 
165  context->generateFortranInterface(file) ;
166  file.close();
167 
168}
Note: See TracBrowser for help on using the repository browser.