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 | |
---|
10 | int 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 | CCalendarWrapper calendarWrapper; |
---|
17 | CAxis axis; |
---|
18 | CAxisGroup axisgroup; |
---|
19 | CField field; |
---|
20 | CFieldGroup fieldgroup; |
---|
21 | CVariable variable; |
---|
22 | CVariableGroup variablegroup; |
---|
23 | CDomain domain; |
---|
24 | CDomainGroup domaingroup; |
---|
25 | CGrid grid; |
---|
26 | CGridGroup gridgroup; |
---|
27 | |
---|
28 | CFile afile; |
---|
29 | CFileGroup filegroup; |
---|
30 | |
---|
31 | ostringstream oss; |
---|
32 | ofstream file; |
---|
33 | |
---|
34 | file.open((path+"axis_interface_attr.F90").c_str()); |
---|
35 | axis.generateFortran2003Interface(file); |
---|
36 | file.close(); |
---|
37 | |
---|
38 | file.open((path+"icaxis_attr.cpp").c_str()); |
---|
39 | axis.generateCInterface(file); |
---|
40 | file.close(); |
---|
41 | |
---|
42 | file.open((path+"iaxis_attr.F90").c_str()); |
---|
43 | axis.generateFortranInterface(file); |
---|
44 | file.close(); |
---|
45 | |
---|
46 | file.open((path+"axisgroup_interface_attr.F90").c_str()); |
---|
47 | axisgroup.generateFortran2003Interface(file); |
---|
48 | file.close(); |
---|
49 | |
---|
50 | file.open((path+"icaxisgroup_attr.cpp").c_str()); |
---|
51 | axisgroup.generateCInterface(file); |
---|
52 | file.close(); |
---|
53 | |
---|
54 | file.open((path+"iaxisgroup_attr.F90").c_str()); |
---|
55 | axisgroup.generateFortranInterface(file); |
---|
56 | file.close(); |
---|
57 | |
---|
58 | file.open((path+"domain_interface_attr.F90").c_str()); |
---|
59 | domain.generateFortran2003Interface(file); |
---|
60 | file.close(); |
---|
61 | |
---|
62 | file.open((path+"icdomain_attr.cpp").c_str()); |
---|
63 | domain.generateCInterface(file); |
---|
64 | file.close(); |
---|
65 | |
---|
66 | file.open((path+"idomain_attr.F90").c_str()); |
---|
67 | domain.generateFortranInterface(file); |
---|
68 | file.close(); |
---|
69 | |
---|
70 | file.open((path+"domaingroup_interface_attr.F90").c_str()); |
---|
71 | domaingroup.generateFortran2003Interface(file); |
---|
72 | file.close(); |
---|
73 | |
---|
74 | file.open((path+"icdomaingroup_attr.cpp").c_str()); |
---|
75 | domaingroup.generateCInterface(file); |
---|
76 | file.close(); |
---|
77 | |
---|
78 | file.open((path+"idomaingroup_attr.F90").c_str()); |
---|
79 | domaingroup.generateFortranInterface(file); |
---|
80 | file.close(); |
---|
81 | |
---|
82 | |
---|
83 | file.open((path+"grid_interface_attr.F90").c_str()); |
---|
84 | grid.generateFortran2003Interface(file); |
---|
85 | file.close(); |
---|
86 | |
---|
87 | file.open((path+"icgrid_attr.cpp").c_str()); |
---|
88 | grid.generateCInterface(file); |
---|
89 | file.close(); |
---|
90 | |
---|
91 | file.open((path+"igrid_attr.F90").c_str()); |
---|
92 | grid.generateFortranInterface(file); |
---|
93 | file.close(); |
---|
94 | |
---|
95 | file.open((path+"gridgroup_interface_attr.F90").c_str()); |
---|
96 | gridgroup.generateFortran2003Interface(file); |
---|
97 | file.close(); |
---|
98 | |
---|
99 | file.open((path+"icgridgroup_attr.cpp").c_str()); |
---|
100 | gridgroup.generateCInterface(file); |
---|
101 | file.close(); |
---|
102 | |
---|
103 | file.open((path+"igridgroup_attr.F90").c_str()); |
---|
104 | gridgroup.generateFortranInterface(file); |
---|
105 | file.close(); |
---|
106 | |
---|
107 | |
---|
108 | file.open((path+"field_interface_attr.F90").c_str()); |
---|
109 | field.generateFortran2003Interface(file); |
---|
110 | file.close(); |
---|
111 | |
---|
112 | file.open((path+"icfield_attr.cpp").c_str()); |
---|
113 | field.generateCInterface(file); |
---|
114 | file.close(); |
---|
115 | |
---|
116 | file.open((path+"ifield_attr.F90").c_str()); |
---|
117 | field.generateFortranInterface(file); |
---|
118 | file.close(); |
---|
119 | |
---|
120 | file.open((path+"fieldgroup_interface_attr.F90").c_str()); |
---|
121 | fieldgroup.generateFortran2003Interface(file); |
---|
122 | file.close(); |
---|
123 | |
---|
124 | file.open((path+"icfieldgroup_attr.cpp").c_str()); |
---|
125 | fieldgroup.generateCInterface(file); |
---|
126 | file.close(); |
---|
127 | |
---|
128 | file.open((path+"ifieldgroup_attr.F90").c_str()); |
---|
129 | fieldgroup.generateFortranInterface(file); |
---|
130 | file.close(); |
---|
131 | |
---|
132 | |
---|
133 | |
---|
134 | file.open((path+"variable_interface_attr.F90").c_str()); |
---|
135 | variable.generateFortran2003Interface(file); |
---|
136 | file.close(); |
---|
137 | |
---|
138 | file.open((path+"icvariable_attr.cpp").c_str()); |
---|
139 | variable.generateCInterface(file); |
---|
140 | file.close(); |
---|
141 | |
---|
142 | file.open((path+"ivariable_attr.F90").c_str()); |
---|
143 | variable.generateFortranInterface(file); |
---|
144 | file.close(); |
---|
145 | |
---|
146 | file.open((path+"variablegroup_interface_attr.F90").c_str()); |
---|
147 | variablegroup.generateFortran2003Interface(file); |
---|
148 | file.close(); |
---|
149 | |
---|
150 | file.open((path+"icvariablegroup_attr.cpp").c_str()); |
---|
151 | variablegroup.generateCInterface(file); |
---|
152 | file.close(); |
---|
153 | |
---|
154 | file.open((path+"ivariablegroup_attr.F90").c_str()); |
---|
155 | variablegroup.generateFortranInterface(file); |
---|
156 | file.close(); |
---|
157 | |
---|
158 | |
---|
159 | |
---|
160 | file.open((path+"file_interface_attr.F90").c_str()); |
---|
161 | afile.generateFortran2003Interface(file); |
---|
162 | file.close(); |
---|
163 | |
---|
164 | file.open((path+"icfile_attr.cpp").c_str()); |
---|
165 | afile.generateCInterface(file); |
---|
166 | file.close(); |
---|
167 | |
---|
168 | file.open((path+"ifile_attr.F90").c_str()); |
---|
169 | afile.generateFortranInterface(file); |
---|
170 | file.close(); |
---|
171 | |
---|
172 | file.open((path+"filegroup_interface_attr.F90").c_str()); |
---|
173 | filegroup.generateFortran2003Interface(file); |
---|
174 | file.close(); |
---|
175 | |
---|
176 | file.open((path+"icfilegroup_attr.cpp").c_str()); |
---|
177 | filegroup.generateCInterface(file); |
---|
178 | file.close(); |
---|
179 | |
---|
180 | file.open((path+"ifilegroup_attr.F90").c_str()); |
---|
181 | filegroup.generateFortranInterface(file); |
---|
182 | file.close(); |
---|
183 | |
---|
184 | |
---|
185 | file.open((path+"calendar_wrapper_interface_attr.F90").c_str()); |
---|
186 | calendarWrapper.generateFortran2003Interface(file); |
---|
187 | file.close(); |
---|
188 | |
---|
189 | file.open((path+"iccalendar_wrapper_attr.cpp").c_str()); |
---|
190 | calendarWrapper.generateCInterface(file); |
---|
191 | file.close(); |
---|
192 | |
---|
193 | file.open((path+"icalendar_wrapper_attr.F90").c_str()); |
---|
194 | calendarWrapper.generateFortranInterface(file); |
---|
195 | file.close(); |
---|
196 | |
---|
197 | |
---|
198 | file.open((path+"context_interface_attr.F90").c_str()); |
---|
199 | context->generateFortran2003Interface(file); |
---|
200 | file.close(); |
---|
201 | |
---|
202 | file.open((path+"iccontext_attr.cpp").c_str()); |
---|
203 | context->generateCInterface(file); |
---|
204 | file.close(); |
---|
205 | |
---|
206 | file.open((path+"icontext_attr.F90").c_str()); |
---|
207 | context->generateFortranInterface(file); |
---|
208 | file.close(); |
---|
209 | |
---|
210 | } |
---|