[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" |
---|
[786] | 7 | #include "node_type.hpp" |
---|
[313] | 8 | |
---|
| 9 | int main (int argc, char ** argv, char ** UNUSED (env)) |
---|
| 10 | { |
---|
[549] | 11 | // string path="./src/attr_interface/"; |
---|
| 12 | string path="./interface/"; |
---|
| 13 | |
---|
| 14 | CContext* context=CContext::create("interface"); |
---|
| 15 | CCalendarWrapper calendarWrapper; |
---|
[891] | 16 | CScalar scalar; |
---|
| 17 | CScalarGroup scalargroup; |
---|
[549] | 18 | CAxis axis; |
---|
| 19 | CAxisGroup axisgroup; |
---|
[313] | 20 | CField field; |
---|
[549] | 21 | CFieldGroup fieldgroup; |
---|
[472] | 22 | CVariable variable; |
---|
[549] | 23 | CVariableGroup variablegroup; |
---|
| 24 | CDomain domain; |
---|
| 25 | CDomainGroup domaingroup; |
---|
| 26 | CGrid grid; |
---|
| 27 | CGridGroup gridgroup; |
---|
| 28 | |
---|
[313] | 29 | CFile afile; |
---|
| 30 | CFileGroup filegroup; |
---|
[549] | 31 | |
---|
[891] | 32 | CInterpolateDomain interpolateDomain; |
---|
[784] | 33 | CZoomDomain zoomDomain; |
---|
[891] | 34 | CGenerateRectilinearDomain genDomain; |
---|
[934] | 35 | CComputeConnectivityDomain compConDomain; |
---|
[784] | 36 | |
---|
[786] | 37 | CInterpolateAxis interpolateAxis; |
---|
[891] | 38 | CZoomAxis zoomAxis; |
---|
[786] | 39 | CInverseAxis inverseAxis; |
---|
| 40 | |
---|
[891] | 41 | CReduceAxisToScalar reduceAxisToScalar; |
---|
| 42 | |
---|
[549] | 43 | ostringstream oss; |
---|
[313] | 44 | ofstream file; |
---|
[549] | 45 | |
---|
[891] | 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 | |
---|
[549] | 70 | file.open((path+"axis_interface_attr.F90").c_str()); |
---|
| 71 | axis.generateFortran2003Interface(file); |
---|
[313] | 72 | file.close(); |
---|
[549] | 73 | |
---|
| 74 | file.open((path+"icaxis_attr.cpp").c_str()); |
---|
| 75 | axis.generateCInterface(file); |
---|
[313] | 76 | file.close(); |
---|
[549] | 77 | |
---|
| 78 | file.open((path+"iaxis_attr.F90").c_str()); |
---|
| 79 | axis.generateFortranInterface(file); |
---|
[313] | 80 | file.close(); |
---|
[549] | 81 | |
---|
| 82 | file.open((path+"axisgroup_interface_attr.F90").c_str()); |
---|
| 83 | axisgroup.generateFortran2003Interface(file); |
---|
[313] | 84 | file.close(); |
---|
[549] | 85 | |
---|
| 86 | file.open((path+"icaxisgroup_attr.cpp").c_str()); |
---|
| 87 | axisgroup.generateCInterface(file); |
---|
[313] | 88 | file.close(); |
---|
[549] | 89 | |
---|
| 90 | file.open((path+"iaxisgroup_attr.F90").c_str()); |
---|
| 91 | axisgroup.generateFortranInterface(file); |
---|
[313] | 92 | file.close(); |
---|
[549] | 93 | |
---|
| 94 | file.open((path+"domain_interface_attr.F90").c_str()); |
---|
| 95 | domain.generateFortran2003Interface(file); |
---|
[313] | 96 | file.close(); |
---|
[549] | 97 | |
---|
| 98 | file.open((path+"icdomain_attr.cpp").c_str()); |
---|
| 99 | domain.generateCInterface(file); |
---|
[313] | 100 | file.close(); |
---|
[549] | 101 | |
---|
| 102 | file.open((path+"idomain_attr.F90").c_str()); |
---|
| 103 | domain.generateFortranInterface(file); |
---|
[313] | 104 | file.close(); |
---|
[549] | 105 | |
---|
| 106 | file.open((path+"domaingroup_interface_attr.F90").c_str()); |
---|
| 107 | domaingroup.generateFortran2003Interface(file); |
---|
[313] | 108 | file.close(); |
---|
[549] | 109 | |
---|
| 110 | file.open((path+"icdomaingroup_attr.cpp").c_str()); |
---|
| 111 | domaingroup.generateCInterface(file); |
---|
[313] | 112 | file.close(); |
---|
[549] | 113 | |
---|
| 114 | file.open((path+"idomaingroup_attr.F90").c_str()); |
---|
| 115 | domaingroup.generateFortranInterface(file); |
---|
[313] | 116 | file.close(); |
---|
[549] | 117 | |
---|
| 118 | |
---|
| 119 | file.open((path+"grid_interface_attr.F90").c_str()); |
---|
| 120 | grid.generateFortran2003Interface(file); |
---|
[313] | 121 | file.close(); |
---|
[549] | 122 | |
---|
| 123 | file.open((path+"icgrid_attr.cpp").c_str()); |
---|
| 124 | grid.generateCInterface(file); |
---|
[313] | 125 | file.close(); |
---|
[549] | 126 | |
---|
| 127 | file.open((path+"igrid_attr.F90").c_str()); |
---|
| 128 | grid.generateFortranInterface(file); |
---|
[313] | 129 | file.close(); |
---|
[549] | 130 | |
---|
| 131 | file.open((path+"gridgroup_interface_attr.F90").c_str()); |
---|
| 132 | gridgroup.generateFortran2003Interface(file); |
---|
[313] | 133 | file.close(); |
---|
[549] | 134 | |
---|
| 135 | file.open((path+"icgridgroup_attr.cpp").c_str()); |
---|
| 136 | gridgroup.generateCInterface(file); |
---|
[313] | 137 | file.close(); |
---|
[549] | 138 | |
---|
| 139 | file.open((path+"igridgroup_attr.F90").c_str()); |
---|
| 140 | gridgroup.generateFortranInterface(file); |
---|
[313] | 141 | file.close(); |
---|
[549] | 142 | |
---|
| 143 | |
---|
| 144 | file.open((path+"field_interface_attr.F90").c_str()); |
---|
| 145 | field.generateFortran2003Interface(file); |
---|
[313] | 146 | file.close(); |
---|
[549] | 147 | |
---|
| 148 | file.open((path+"icfield_attr.cpp").c_str()); |
---|
| 149 | field.generateCInterface(file); |
---|
[313] | 150 | file.close(); |
---|
[549] | 151 | |
---|
| 152 | file.open((path+"ifield_attr.F90").c_str()); |
---|
| 153 | field.generateFortranInterface(file); |
---|
[313] | 154 | file.close(); |
---|
[549] | 155 | |
---|
| 156 | file.open((path+"fieldgroup_interface_attr.F90").c_str()); |
---|
| 157 | fieldgroup.generateFortran2003Interface(file); |
---|
[313] | 158 | file.close(); |
---|
[549] | 159 | |
---|
| 160 | file.open((path+"icfieldgroup_attr.cpp").c_str()); |
---|
| 161 | fieldgroup.generateCInterface(file); |
---|
[313] | 162 | file.close(); |
---|
[549] | 163 | |
---|
| 164 | file.open((path+"ifieldgroup_attr.F90").c_str()); |
---|
| 165 | fieldgroup.generateFortranInterface(file); |
---|
[313] | 166 | file.close(); |
---|
| 167 | |
---|
| 168 | |
---|
[549] | 169 | |
---|
| 170 | file.open((path+"variable_interface_attr.F90").c_str()); |
---|
| 171 | variable.generateFortran2003Interface(file); |
---|
[472] | 172 | file.close(); |
---|
[549] | 173 | |
---|
| 174 | file.open((path+"icvariable_attr.cpp").c_str()); |
---|
| 175 | variable.generateCInterface(file); |
---|
[472] | 176 | file.close(); |
---|
[549] | 177 | |
---|
| 178 | file.open((path+"ivariable_attr.F90").c_str()); |
---|
| 179 | variable.generateFortranInterface(file); |
---|
[472] | 180 | file.close(); |
---|
[549] | 181 | |
---|
| 182 | file.open((path+"variablegroup_interface_attr.F90").c_str()); |
---|
| 183 | variablegroup.generateFortran2003Interface(file); |
---|
[472] | 184 | file.close(); |
---|
[549] | 185 | |
---|
| 186 | file.open((path+"icvariablegroup_attr.cpp").c_str()); |
---|
| 187 | variablegroup.generateCInterface(file); |
---|
[472] | 188 | file.close(); |
---|
[549] | 189 | |
---|
| 190 | file.open((path+"ivariablegroup_attr.F90").c_str()); |
---|
| 191 | variablegroup.generateFortranInterface(file); |
---|
[472] | 192 | file.close(); |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | |
---|
[549] | 196 | file.open((path+"file_interface_attr.F90").c_str()); |
---|
| 197 | afile.generateFortran2003Interface(file); |
---|
[313] | 198 | file.close(); |
---|
[549] | 199 | |
---|
| 200 | file.open((path+"icfile_attr.cpp").c_str()); |
---|
| 201 | afile.generateCInterface(file); |
---|
[313] | 202 | file.close(); |
---|
[549] | 203 | |
---|
| 204 | file.open((path+"ifile_attr.F90").c_str()); |
---|
| 205 | afile.generateFortranInterface(file); |
---|
[313] | 206 | file.close(); |
---|
[549] | 207 | |
---|
| 208 | file.open((path+"filegroup_interface_attr.F90").c_str()); |
---|
| 209 | filegroup.generateFortran2003Interface(file); |
---|
[313] | 210 | file.close(); |
---|
[549] | 211 | |
---|
| 212 | file.open((path+"icfilegroup_attr.cpp").c_str()); |
---|
| 213 | filegroup.generateCInterface(file); |
---|
[313] | 214 | file.close(); |
---|
[549] | 215 | |
---|
| 216 | file.open((path+"ifilegroup_attr.F90").c_str()); |
---|
| 217 | filegroup.generateFortranInterface(file); |
---|
[313] | 218 | file.close(); |
---|
[549] | 219 | |
---|
| 220 | |
---|
| 221 | file.open((path+"calendar_wrapper_interface_attr.F90").c_str()); |
---|
| 222 | calendarWrapper.generateFortran2003Interface(file); |
---|
[313] | 223 | file.close(); |
---|
[549] | 224 | |
---|
| 225 | file.open((path+"iccalendar_wrapper_attr.cpp").c_str()); |
---|
| 226 | calendarWrapper.generateCInterface(file); |
---|
[313] | 227 | file.close(); |
---|
[549] | 228 | |
---|
| 229 | file.open((path+"icalendar_wrapper_attr.F90").c_str()); |
---|
| 230 | calendarWrapper.generateFortranInterface(file); |
---|
[313] | 231 | file.close(); |
---|
[549] | 232 | |
---|
[784] | 233 | file.open((path+"zoom_domain_interface_attr.F90").c_str()); |
---|
| 234 | zoomDomain.generateFortran2003Interface(file); |
---|
| 235 | file.close(); |
---|
[549] | 236 | |
---|
[784] | 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 | |
---|
[786] | 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 | |
---|
[934] | 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 | |
---|
[786] | 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 | |
---|
[891] | 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 | |
---|
[549] | 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(); |
---|
[313] | 343 | } |
---|