[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 "context.hpp" |
---|
| 8 | //#include "file.hpp" |
---|
| 9 | //#include "zoom_domain.hpp" |
---|
| 10 | //#include "zoom_axis.hpp" |
---|
| 11 | //#include "interpolate_axis.hpp" |
---|
| 12 | //#include "interpolate_domain.hpp" |
---|
| 13 | #include "node_type.hpp" |
---|
[313] | 14 | |
---|
| 15 | int main (int argc, char ** argv, char ** UNUSED (env)) |
---|
| 16 | { |
---|
[549] | 17 | // string path="./src/attr_interface/"; |
---|
| 18 | string path="./interface/"; |
---|
| 19 | |
---|
| 20 | CContext* context=CContext::create("interface"); |
---|
| 21 | CCalendarWrapper calendarWrapper; |
---|
| 22 | CAxis axis; |
---|
| 23 | CAxisGroup axisgroup; |
---|
[313] | 24 | CField field; |
---|
[549] | 25 | CFieldGroup fieldgroup; |
---|
[472] | 26 | CVariable variable; |
---|
[549] | 27 | CVariableGroup variablegroup; |
---|
| 28 | CDomain domain; |
---|
| 29 | CDomainGroup domaingroup; |
---|
| 30 | CGrid grid; |
---|
| 31 | CGridGroup gridgroup; |
---|
| 32 | |
---|
[313] | 33 | CFile afile; |
---|
| 34 | CFileGroup filegroup; |
---|
[549] | 35 | |
---|
[784] | 36 | CZoomDomain zoomDomain; |
---|
| 37 | CZoomAxis zoomAxis; |
---|
| 38 | |
---|
[786] | 39 | CInterpolateAxis interpolateAxis; |
---|
| 40 | CInterpolateDomain interpolateDomain; |
---|
| 41 | |
---|
| 42 | CGenerateRectilinearDomain genDomain; |
---|
| 43 | CInverseAxis inverseAxis; |
---|
| 44 | |
---|
[549] | 45 | ostringstream oss; |
---|
[313] | 46 | ofstream file; |
---|
[549] | 47 | |
---|
| 48 | file.open((path+"axis_interface_attr.F90").c_str()); |
---|
| 49 | axis.generateFortran2003Interface(file); |
---|
[313] | 50 | file.close(); |
---|
[549] | 51 | |
---|
| 52 | file.open((path+"icaxis_attr.cpp").c_str()); |
---|
| 53 | axis.generateCInterface(file); |
---|
[313] | 54 | file.close(); |
---|
[549] | 55 | |
---|
| 56 | file.open((path+"iaxis_attr.F90").c_str()); |
---|
| 57 | axis.generateFortranInterface(file); |
---|
[313] | 58 | file.close(); |
---|
[549] | 59 | |
---|
| 60 | file.open((path+"axisgroup_interface_attr.F90").c_str()); |
---|
| 61 | axisgroup.generateFortran2003Interface(file); |
---|
[313] | 62 | file.close(); |
---|
[549] | 63 | |
---|
| 64 | file.open((path+"icaxisgroup_attr.cpp").c_str()); |
---|
| 65 | axisgroup.generateCInterface(file); |
---|
[313] | 66 | file.close(); |
---|
[549] | 67 | |
---|
| 68 | file.open((path+"iaxisgroup_attr.F90").c_str()); |
---|
| 69 | axisgroup.generateFortranInterface(file); |
---|
[313] | 70 | file.close(); |
---|
[549] | 71 | |
---|
| 72 | file.open((path+"domain_interface_attr.F90").c_str()); |
---|
| 73 | domain.generateFortran2003Interface(file); |
---|
[313] | 74 | file.close(); |
---|
[549] | 75 | |
---|
| 76 | file.open((path+"icdomain_attr.cpp").c_str()); |
---|
| 77 | domain.generateCInterface(file); |
---|
[313] | 78 | file.close(); |
---|
[549] | 79 | |
---|
| 80 | file.open((path+"idomain_attr.F90").c_str()); |
---|
| 81 | domain.generateFortranInterface(file); |
---|
[313] | 82 | file.close(); |
---|
[549] | 83 | |
---|
| 84 | file.open((path+"domaingroup_interface_attr.F90").c_str()); |
---|
| 85 | domaingroup.generateFortran2003Interface(file); |
---|
[313] | 86 | file.close(); |
---|
[549] | 87 | |
---|
| 88 | file.open((path+"icdomaingroup_attr.cpp").c_str()); |
---|
| 89 | domaingroup.generateCInterface(file); |
---|
[313] | 90 | file.close(); |
---|
[549] | 91 | |
---|
| 92 | file.open((path+"idomaingroup_attr.F90").c_str()); |
---|
| 93 | domaingroup.generateFortranInterface(file); |
---|
[313] | 94 | file.close(); |
---|
[549] | 95 | |
---|
| 96 | |
---|
| 97 | file.open((path+"grid_interface_attr.F90").c_str()); |
---|
| 98 | grid.generateFortran2003Interface(file); |
---|
[313] | 99 | file.close(); |
---|
[549] | 100 | |
---|
| 101 | file.open((path+"icgrid_attr.cpp").c_str()); |
---|
| 102 | grid.generateCInterface(file); |
---|
[313] | 103 | file.close(); |
---|
[549] | 104 | |
---|
| 105 | file.open((path+"igrid_attr.F90").c_str()); |
---|
| 106 | grid.generateFortranInterface(file); |
---|
[313] | 107 | file.close(); |
---|
[549] | 108 | |
---|
| 109 | file.open((path+"gridgroup_interface_attr.F90").c_str()); |
---|
| 110 | gridgroup.generateFortran2003Interface(file); |
---|
[313] | 111 | file.close(); |
---|
[549] | 112 | |
---|
| 113 | file.open((path+"icgridgroup_attr.cpp").c_str()); |
---|
| 114 | gridgroup.generateCInterface(file); |
---|
[313] | 115 | file.close(); |
---|
[549] | 116 | |
---|
| 117 | file.open((path+"igridgroup_attr.F90").c_str()); |
---|
| 118 | gridgroup.generateFortranInterface(file); |
---|
[313] | 119 | file.close(); |
---|
[549] | 120 | |
---|
| 121 | |
---|
| 122 | file.open((path+"field_interface_attr.F90").c_str()); |
---|
| 123 | field.generateFortran2003Interface(file); |
---|
[313] | 124 | file.close(); |
---|
[549] | 125 | |
---|
| 126 | file.open((path+"icfield_attr.cpp").c_str()); |
---|
| 127 | field.generateCInterface(file); |
---|
[313] | 128 | file.close(); |
---|
[549] | 129 | |
---|
| 130 | file.open((path+"ifield_attr.F90").c_str()); |
---|
| 131 | field.generateFortranInterface(file); |
---|
[313] | 132 | file.close(); |
---|
[549] | 133 | |
---|
| 134 | file.open((path+"fieldgroup_interface_attr.F90").c_str()); |
---|
| 135 | fieldgroup.generateFortran2003Interface(file); |
---|
[313] | 136 | file.close(); |
---|
[549] | 137 | |
---|
| 138 | file.open((path+"icfieldgroup_attr.cpp").c_str()); |
---|
| 139 | fieldgroup.generateCInterface(file); |
---|
[313] | 140 | file.close(); |
---|
[549] | 141 | |
---|
| 142 | file.open((path+"ifieldgroup_attr.F90").c_str()); |
---|
| 143 | fieldgroup.generateFortranInterface(file); |
---|
[313] | 144 | file.close(); |
---|
| 145 | |
---|
| 146 | |
---|
[549] | 147 | |
---|
| 148 | file.open((path+"variable_interface_attr.F90").c_str()); |
---|
| 149 | variable.generateFortran2003Interface(file); |
---|
[472] | 150 | file.close(); |
---|
[549] | 151 | |
---|
| 152 | file.open((path+"icvariable_attr.cpp").c_str()); |
---|
| 153 | variable.generateCInterface(file); |
---|
[472] | 154 | file.close(); |
---|
[549] | 155 | |
---|
| 156 | file.open((path+"ivariable_attr.F90").c_str()); |
---|
| 157 | variable.generateFortranInterface(file); |
---|
[472] | 158 | file.close(); |
---|
[549] | 159 | |
---|
| 160 | file.open((path+"variablegroup_interface_attr.F90").c_str()); |
---|
| 161 | variablegroup.generateFortran2003Interface(file); |
---|
[472] | 162 | file.close(); |
---|
[549] | 163 | |
---|
| 164 | file.open((path+"icvariablegroup_attr.cpp").c_str()); |
---|
| 165 | variablegroup.generateCInterface(file); |
---|
[472] | 166 | file.close(); |
---|
[549] | 167 | |
---|
| 168 | file.open((path+"ivariablegroup_attr.F90").c_str()); |
---|
| 169 | variablegroup.generateFortranInterface(file); |
---|
[472] | 170 | file.close(); |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | |
---|
[549] | 174 | file.open((path+"file_interface_attr.F90").c_str()); |
---|
| 175 | afile.generateFortran2003Interface(file); |
---|
[313] | 176 | file.close(); |
---|
[549] | 177 | |
---|
| 178 | file.open((path+"icfile_attr.cpp").c_str()); |
---|
| 179 | afile.generateCInterface(file); |
---|
[313] | 180 | file.close(); |
---|
[549] | 181 | |
---|
| 182 | file.open((path+"ifile_attr.F90").c_str()); |
---|
| 183 | afile.generateFortranInterface(file); |
---|
[313] | 184 | file.close(); |
---|
[549] | 185 | |
---|
| 186 | file.open((path+"filegroup_interface_attr.F90").c_str()); |
---|
| 187 | filegroup.generateFortran2003Interface(file); |
---|
[313] | 188 | file.close(); |
---|
[549] | 189 | |
---|
| 190 | file.open((path+"icfilegroup_attr.cpp").c_str()); |
---|
| 191 | filegroup.generateCInterface(file); |
---|
[313] | 192 | file.close(); |
---|
[549] | 193 | |
---|
| 194 | file.open((path+"ifilegroup_attr.F90").c_str()); |
---|
| 195 | filegroup.generateFortranInterface(file); |
---|
[313] | 196 | file.close(); |
---|
[549] | 197 | |
---|
| 198 | |
---|
| 199 | file.open((path+"calendar_wrapper_interface_attr.F90").c_str()); |
---|
| 200 | calendarWrapper.generateFortran2003Interface(file); |
---|
[313] | 201 | file.close(); |
---|
[549] | 202 | |
---|
| 203 | file.open((path+"iccalendar_wrapper_attr.cpp").c_str()); |
---|
| 204 | calendarWrapper.generateCInterface(file); |
---|
[313] | 205 | file.close(); |
---|
[549] | 206 | |
---|
| 207 | file.open((path+"icalendar_wrapper_attr.F90").c_str()); |
---|
| 208 | calendarWrapper.generateFortranInterface(file); |
---|
[313] | 209 | file.close(); |
---|
[549] | 210 | |
---|
[784] | 211 | file.open((path+"zoom_domain_interface_attr.F90").c_str()); |
---|
| 212 | zoomDomain.generateFortran2003Interface(file); |
---|
| 213 | file.close(); |
---|
[549] | 214 | |
---|
[784] | 215 | file.open((path+"iczoom_domain_attr.cpp").c_str()); |
---|
| 216 | zoomDomain.generateCInterface(file); |
---|
| 217 | file.close(); |
---|
| 218 | |
---|
| 219 | file.open((path+"izoom_domain_attr.F90").c_str()); |
---|
| 220 | zoomDomain.generateFortranInterface(file); |
---|
| 221 | file.close(); |
---|
| 222 | |
---|
| 223 | file.open((path+"zoom_axis_interface_attr.F90").c_str()); |
---|
| 224 | zoomAxis.generateFortran2003Interface(file); |
---|
| 225 | file.close(); |
---|
| 226 | |
---|
| 227 | file.open((path+"iczoom_axis_attr.cpp").c_str()); |
---|
| 228 | zoomAxis.generateCInterface(file); |
---|
| 229 | file.close(); |
---|
| 230 | |
---|
| 231 | file.open((path+"izoom_axis_attr.F90").c_str()); |
---|
| 232 | zoomAxis.generateFortranInterface(file); |
---|
| 233 | file.close(); |
---|
| 234 | |
---|
[786] | 235 | file.open((path+"interpolate_axis_interface_attr.F90").c_str()); |
---|
| 236 | interpolateAxis.generateFortran2003Interface(file); |
---|
| 237 | file.close(); |
---|
| 238 | |
---|
| 239 | file.open((path+"icinterpolate_axis_attr.cpp").c_str()); |
---|
| 240 | interpolateAxis.generateCInterface(file); |
---|
| 241 | file.close(); |
---|
| 242 | |
---|
| 243 | file.open((path+"iinterpolate_axis_attr.F90").c_str()); |
---|
| 244 | interpolateAxis.generateFortranInterface(file); |
---|
| 245 | file.close(); |
---|
| 246 | |
---|
| 247 | file.open((path+"interpolate_domain_interface_attr.F90").c_str()); |
---|
| 248 | interpolateDomain.generateFortran2003Interface(file); |
---|
| 249 | file.close(); |
---|
| 250 | |
---|
| 251 | file.open((path+"icinterpolate_domain_attr.cpp").c_str()); |
---|
| 252 | interpolateDomain.generateCInterface(file); |
---|
| 253 | file.close(); |
---|
| 254 | |
---|
| 255 | file.open((path+"iinterpolate_domain_attr.F90").c_str()); |
---|
| 256 | interpolateDomain.generateFortranInterface(file); |
---|
| 257 | file.close(); |
---|
| 258 | |
---|
| 259 | file.open((path+"generate_rectilinear_domain_interface_attr.F90").c_str()); |
---|
| 260 | genDomain.generateFortran2003Interface(file); |
---|
| 261 | file.close(); |
---|
| 262 | |
---|
| 263 | file.open((path+"icgenerate_rectilinear_domain_attr.cpp").c_str()); |
---|
| 264 | genDomain.generateCInterface(file); |
---|
| 265 | file.close(); |
---|
| 266 | |
---|
| 267 | file.open((path+"igenerate_rectilinear_domain_attr.F90").c_str()); |
---|
| 268 | genDomain.generateFortranInterface(file); |
---|
| 269 | file.close(); |
---|
| 270 | |
---|
| 271 | file.open((path+"inverse_axis_interface_attr.F90").c_str()); |
---|
| 272 | inverseAxis.generateFortran2003Interface(file); |
---|
| 273 | file.close(); |
---|
| 274 | |
---|
| 275 | file.open((path+"icinverse_axis_attr.cpp").c_str()); |
---|
| 276 | inverseAxis.generateCInterface(file); |
---|
| 277 | file.close(); |
---|
| 278 | |
---|
| 279 | file.open((path+"iinverse_axis_attr.F90").c_str()); |
---|
| 280 | inverseAxis.generateFortranInterface(file); |
---|
| 281 | file.close(); |
---|
| 282 | |
---|
[549] | 283 | file.open((path+"context_interface_attr.F90").c_str()); |
---|
| 284 | context->generateFortran2003Interface(file); |
---|
| 285 | file.close(); |
---|
| 286 | |
---|
| 287 | file.open((path+"iccontext_attr.cpp").c_str()); |
---|
| 288 | context->generateCInterface(file); |
---|
| 289 | file.close(); |
---|
| 290 | |
---|
| 291 | file.open((path+"icontext_attr.F90").c_str()); |
---|
| 292 | context->generateFortranInterface(file); |
---|
| 293 | file.close(); |
---|
[313] | 294 | } |
---|