[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; |
---|
[784] | 35 | |
---|
[786] | 36 | CInterpolateAxis interpolateAxis; |
---|
[891] | 37 | CZoomAxis zoomAxis; |
---|
[786] | 38 | CInverseAxis inverseAxis; |
---|
| 39 | |
---|
[891] | 40 | CReduceAxisToScalar reduceAxisToScalar; |
---|
| 41 | |
---|
[549] | 42 | ostringstream oss; |
---|
[313] | 43 | ofstream file; |
---|
[549] | 44 | |
---|
[891] | 45 | file.open((path+"scalar_interface_attr.F90").c_str()); |
---|
| 46 | scalar.generateFortran2003Interface(file); |
---|
| 47 | file.close(); |
---|
| 48 | |
---|
| 49 | file.open((path+"icscalar_attr.cpp").c_str()); |
---|
| 50 | scalar.generateCInterface(file); |
---|
| 51 | file.close(); |
---|
| 52 | |
---|
| 53 | file.open((path+"iscalar_attr.F90").c_str()); |
---|
| 54 | scalar.generateFortranInterface(file); |
---|
| 55 | file.close(); |
---|
| 56 | |
---|
| 57 | file.open((path+"scalargroup_interface_attr.F90").c_str()); |
---|
| 58 | scalargroup.generateFortran2003Interface(file); |
---|
| 59 | file.close(); |
---|
| 60 | |
---|
| 61 | file.open((path+"icscalargroup_attr.cpp").c_str()); |
---|
| 62 | scalargroup.generateCInterface(file); |
---|
| 63 | file.close(); |
---|
| 64 | |
---|
| 65 | file.open((path+"iscalargroup_attr.F90").c_str()); |
---|
| 66 | scalargroup.generateFortranInterface(file); |
---|
| 67 | file.close(); |
---|
| 68 | |
---|
[549] | 69 | file.open((path+"axis_interface_attr.F90").c_str()); |
---|
| 70 | axis.generateFortran2003Interface(file); |
---|
[313] | 71 | file.close(); |
---|
[549] | 72 | |
---|
| 73 | file.open((path+"icaxis_attr.cpp").c_str()); |
---|
| 74 | axis.generateCInterface(file); |
---|
[313] | 75 | file.close(); |
---|
[549] | 76 | |
---|
| 77 | file.open((path+"iaxis_attr.F90").c_str()); |
---|
| 78 | axis.generateFortranInterface(file); |
---|
[313] | 79 | file.close(); |
---|
[549] | 80 | |
---|
| 81 | file.open((path+"axisgroup_interface_attr.F90").c_str()); |
---|
| 82 | axisgroup.generateFortran2003Interface(file); |
---|
[313] | 83 | file.close(); |
---|
[549] | 84 | |
---|
| 85 | file.open((path+"icaxisgroup_attr.cpp").c_str()); |
---|
| 86 | axisgroup.generateCInterface(file); |
---|
[313] | 87 | file.close(); |
---|
[549] | 88 | |
---|
| 89 | file.open((path+"iaxisgroup_attr.F90").c_str()); |
---|
| 90 | axisgroup.generateFortranInterface(file); |
---|
[313] | 91 | file.close(); |
---|
[549] | 92 | |
---|
| 93 | file.open((path+"domain_interface_attr.F90").c_str()); |
---|
| 94 | domain.generateFortran2003Interface(file); |
---|
[313] | 95 | file.close(); |
---|
[549] | 96 | |
---|
| 97 | file.open((path+"icdomain_attr.cpp").c_str()); |
---|
| 98 | domain.generateCInterface(file); |
---|
[313] | 99 | file.close(); |
---|
[549] | 100 | |
---|
| 101 | file.open((path+"idomain_attr.F90").c_str()); |
---|
| 102 | domain.generateFortranInterface(file); |
---|
[313] | 103 | file.close(); |
---|
[549] | 104 | |
---|
| 105 | file.open((path+"domaingroup_interface_attr.F90").c_str()); |
---|
| 106 | domaingroup.generateFortran2003Interface(file); |
---|
[313] | 107 | file.close(); |
---|
[549] | 108 | |
---|
| 109 | file.open((path+"icdomaingroup_attr.cpp").c_str()); |
---|
| 110 | domaingroup.generateCInterface(file); |
---|
[313] | 111 | file.close(); |
---|
[549] | 112 | |
---|
| 113 | file.open((path+"idomaingroup_attr.F90").c_str()); |
---|
| 114 | domaingroup.generateFortranInterface(file); |
---|
[313] | 115 | file.close(); |
---|
[549] | 116 | |
---|
| 117 | |
---|
| 118 | file.open((path+"grid_interface_attr.F90").c_str()); |
---|
| 119 | grid.generateFortran2003Interface(file); |
---|
[313] | 120 | file.close(); |
---|
[549] | 121 | |
---|
| 122 | file.open((path+"icgrid_attr.cpp").c_str()); |
---|
| 123 | grid.generateCInterface(file); |
---|
[313] | 124 | file.close(); |
---|
[549] | 125 | |
---|
| 126 | file.open((path+"igrid_attr.F90").c_str()); |
---|
| 127 | grid.generateFortranInterface(file); |
---|
[313] | 128 | file.close(); |
---|
[549] | 129 | |
---|
| 130 | file.open((path+"gridgroup_interface_attr.F90").c_str()); |
---|
| 131 | gridgroup.generateFortran2003Interface(file); |
---|
[313] | 132 | file.close(); |
---|
[549] | 133 | |
---|
| 134 | file.open((path+"icgridgroup_attr.cpp").c_str()); |
---|
| 135 | gridgroup.generateCInterface(file); |
---|
[313] | 136 | file.close(); |
---|
[549] | 137 | |
---|
| 138 | file.open((path+"igridgroup_attr.F90").c_str()); |
---|
| 139 | gridgroup.generateFortranInterface(file); |
---|
[313] | 140 | file.close(); |
---|
[549] | 141 | |
---|
| 142 | |
---|
| 143 | file.open((path+"field_interface_attr.F90").c_str()); |
---|
| 144 | field.generateFortran2003Interface(file); |
---|
[313] | 145 | file.close(); |
---|
[549] | 146 | |
---|
| 147 | file.open((path+"icfield_attr.cpp").c_str()); |
---|
| 148 | field.generateCInterface(file); |
---|
[313] | 149 | file.close(); |
---|
[549] | 150 | |
---|
| 151 | file.open((path+"ifield_attr.F90").c_str()); |
---|
| 152 | field.generateFortranInterface(file); |
---|
[313] | 153 | file.close(); |
---|
[549] | 154 | |
---|
| 155 | file.open((path+"fieldgroup_interface_attr.F90").c_str()); |
---|
| 156 | fieldgroup.generateFortran2003Interface(file); |
---|
[313] | 157 | file.close(); |
---|
[549] | 158 | |
---|
| 159 | file.open((path+"icfieldgroup_attr.cpp").c_str()); |
---|
| 160 | fieldgroup.generateCInterface(file); |
---|
[313] | 161 | file.close(); |
---|
[549] | 162 | |
---|
| 163 | file.open((path+"ifieldgroup_attr.F90").c_str()); |
---|
| 164 | fieldgroup.generateFortranInterface(file); |
---|
[313] | 165 | file.close(); |
---|
| 166 | |
---|
| 167 | |
---|
[549] | 168 | |
---|
| 169 | file.open((path+"variable_interface_attr.F90").c_str()); |
---|
| 170 | variable.generateFortran2003Interface(file); |
---|
[472] | 171 | file.close(); |
---|
[549] | 172 | |
---|
| 173 | file.open((path+"icvariable_attr.cpp").c_str()); |
---|
| 174 | variable.generateCInterface(file); |
---|
[472] | 175 | file.close(); |
---|
[549] | 176 | |
---|
| 177 | file.open((path+"ivariable_attr.F90").c_str()); |
---|
| 178 | variable.generateFortranInterface(file); |
---|
[472] | 179 | file.close(); |
---|
[549] | 180 | |
---|
| 181 | file.open((path+"variablegroup_interface_attr.F90").c_str()); |
---|
| 182 | variablegroup.generateFortran2003Interface(file); |
---|
[472] | 183 | file.close(); |
---|
[549] | 184 | |
---|
| 185 | file.open((path+"icvariablegroup_attr.cpp").c_str()); |
---|
| 186 | variablegroup.generateCInterface(file); |
---|
[472] | 187 | file.close(); |
---|
[549] | 188 | |
---|
| 189 | file.open((path+"ivariablegroup_attr.F90").c_str()); |
---|
| 190 | variablegroup.generateFortranInterface(file); |
---|
[472] | 191 | file.close(); |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | |
---|
[549] | 195 | file.open((path+"file_interface_attr.F90").c_str()); |
---|
| 196 | afile.generateFortran2003Interface(file); |
---|
[313] | 197 | file.close(); |
---|
[549] | 198 | |
---|
| 199 | file.open((path+"icfile_attr.cpp").c_str()); |
---|
| 200 | afile.generateCInterface(file); |
---|
[313] | 201 | file.close(); |
---|
[549] | 202 | |
---|
| 203 | file.open((path+"ifile_attr.F90").c_str()); |
---|
| 204 | afile.generateFortranInterface(file); |
---|
[313] | 205 | file.close(); |
---|
[549] | 206 | |
---|
| 207 | file.open((path+"filegroup_interface_attr.F90").c_str()); |
---|
| 208 | filegroup.generateFortran2003Interface(file); |
---|
[313] | 209 | file.close(); |
---|
[549] | 210 | |
---|
| 211 | file.open((path+"icfilegroup_attr.cpp").c_str()); |
---|
| 212 | filegroup.generateCInterface(file); |
---|
[313] | 213 | file.close(); |
---|
[549] | 214 | |
---|
| 215 | file.open((path+"ifilegroup_attr.F90").c_str()); |
---|
| 216 | filegroup.generateFortranInterface(file); |
---|
[313] | 217 | file.close(); |
---|
[549] | 218 | |
---|
| 219 | |
---|
| 220 | file.open((path+"calendar_wrapper_interface_attr.F90").c_str()); |
---|
| 221 | calendarWrapper.generateFortran2003Interface(file); |
---|
[313] | 222 | file.close(); |
---|
[549] | 223 | |
---|
| 224 | file.open((path+"iccalendar_wrapper_attr.cpp").c_str()); |
---|
| 225 | calendarWrapper.generateCInterface(file); |
---|
[313] | 226 | file.close(); |
---|
[549] | 227 | |
---|
| 228 | file.open((path+"icalendar_wrapper_attr.F90").c_str()); |
---|
| 229 | calendarWrapper.generateFortranInterface(file); |
---|
[313] | 230 | file.close(); |
---|
[549] | 231 | |
---|
[784] | 232 | file.open((path+"zoom_domain_interface_attr.F90").c_str()); |
---|
| 233 | zoomDomain.generateFortran2003Interface(file); |
---|
| 234 | file.close(); |
---|
[549] | 235 | |
---|
[784] | 236 | file.open((path+"iczoom_domain_attr.cpp").c_str()); |
---|
| 237 | zoomDomain.generateCInterface(file); |
---|
| 238 | file.close(); |
---|
| 239 | |
---|
| 240 | file.open((path+"izoom_domain_attr.F90").c_str()); |
---|
| 241 | zoomDomain.generateFortranInterface(file); |
---|
| 242 | file.close(); |
---|
| 243 | |
---|
| 244 | file.open((path+"zoom_axis_interface_attr.F90").c_str()); |
---|
| 245 | zoomAxis.generateFortran2003Interface(file); |
---|
| 246 | file.close(); |
---|
| 247 | |
---|
| 248 | file.open((path+"iczoom_axis_attr.cpp").c_str()); |
---|
| 249 | zoomAxis.generateCInterface(file); |
---|
| 250 | file.close(); |
---|
| 251 | |
---|
| 252 | file.open((path+"izoom_axis_attr.F90").c_str()); |
---|
| 253 | zoomAxis.generateFortranInterface(file); |
---|
| 254 | file.close(); |
---|
| 255 | |
---|
[786] | 256 | file.open((path+"interpolate_axis_interface_attr.F90").c_str()); |
---|
| 257 | interpolateAxis.generateFortran2003Interface(file); |
---|
| 258 | file.close(); |
---|
| 259 | |
---|
| 260 | file.open((path+"icinterpolate_axis_attr.cpp").c_str()); |
---|
| 261 | interpolateAxis.generateCInterface(file); |
---|
| 262 | file.close(); |
---|
| 263 | |
---|
| 264 | file.open((path+"iinterpolate_axis_attr.F90").c_str()); |
---|
| 265 | interpolateAxis.generateFortranInterface(file); |
---|
| 266 | file.close(); |
---|
| 267 | |
---|
| 268 | file.open((path+"interpolate_domain_interface_attr.F90").c_str()); |
---|
| 269 | interpolateDomain.generateFortran2003Interface(file); |
---|
| 270 | file.close(); |
---|
| 271 | |
---|
| 272 | file.open((path+"icinterpolate_domain_attr.cpp").c_str()); |
---|
| 273 | interpolateDomain.generateCInterface(file); |
---|
| 274 | file.close(); |
---|
| 275 | |
---|
| 276 | file.open((path+"iinterpolate_domain_attr.F90").c_str()); |
---|
| 277 | interpolateDomain.generateFortranInterface(file); |
---|
| 278 | file.close(); |
---|
| 279 | |
---|
| 280 | file.open((path+"generate_rectilinear_domain_interface_attr.F90").c_str()); |
---|
| 281 | genDomain.generateFortran2003Interface(file); |
---|
| 282 | file.close(); |
---|
| 283 | |
---|
| 284 | file.open((path+"icgenerate_rectilinear_domain_attr.cpp").c_str()); |
---|
| 285 | genDomain.generateCInterface(file); |
---|
| 286 | file.close(); |
---|
| 287 | |
---|
| 288 | file.open((path+"igenerate_rectilinear_domain_attr.F90").c_str()); |
---|
| 289 | genDomain.generateFortranInterface(file); |
---|
| 290 | file.close(); |
---|
| 291 | |
---|
| 292 | file.open((path+"inverse_axis_interface_attr.F90").c_str()); |
---|
| 293 | inverseAxis.generateFortran2003Interface(file); |
---|
| 294 | file.close(); |
---|
| 295 | |
---|
| 296 | file.open((path+"icinverse_axis_attr.cpp").c_str()); |
---|
| 297 | inverseAxis.generateCInterface(file); |
---|
| 298 | file.close(); |
---|
| 299 | |
---|
| 300 | file.open((path+"iinverse_axis_attr.F90").c_str()); |
---|
| 301 | inverseAxis.generateFortranInterface(file); |
---|
| 302 | file.close(); |
---|
| 303 | |
---|
[891] | 304 | file.open((path+"reduce_axis_to_scalar_interface_attr.F90").c_str()); |
---|
| 305 | reduceAxisToScalar.generateFortran2003Interface(file); |
---|
| 306 | file.close(); |
---|
| 307 | |
---|
| 308 | file.open((path+"icreduce_axis_to_scalar_attr.cpp").c_str()); |
---|
| 309 | reduceAxisToScalar.generateCInterface(file); |
---|
| 310 | file.close(); |
---|
| 311 | |
---|
| 312 | file.open((path+"ireduce_axis_to_scalar_attr.F90").c_str()); |
---|
| 313 | reduceAxisToScalar.generateFortranInterface(file); |
---|
| 314 | file.close(); |
---|
| 315 | |
---|
[549] | 316 | file.open((path+"context_interface_attr.F90").c_str()); |
---|
| 317 | context->generateFortran2003Interface(file); |
---|
| 318 | file.close(); |
---|
| 319 | |
---|
| 320 | file.open((path+"iccontext_attr.cpp").c_str()); |
---|
| 321 | context->generateCInterface(file); |
---|
| 322 | file.close(); |
---|
| 323 | |
---|
| 324 | file.open((path+"icontext_attr.F90").c_str()); |
---|
| 325 | context->generateFortranInterface(file); |
---|
| 326 | file.close(); |
---|
[313] | 327 | } |
---|