- Timestamp:
- 03/24/15 11:21:45 (10 years ago)
- Location:
- XIOS
- Files:
-
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/branchs/xios-1.0/src/generate_interface_impl.hpp
r501 r581 41 41 oss<<"bool cxios_is_defined_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl )"<<iendl ; 42 42 oss<<"{"<<iendl ; 43 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 44 oss<<" return "<<className<<"_hdl->"<<name<<".hasInheritedValue();"<<iendl ; 45 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 43 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 44 oss<<" bool isDefined = "<<className<<"_hdl->"<<name<<".hasInheritedValue();"<<iendl ; 45 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 46 oss<<" return isDefined;"<<iendl ; 46 47 oss<<"}"<<iendl ; 47 48 oss<<iendl ; -
XIOS/branchs/xios-1.0/src/interface/c_attr/icaxis_attr.cpp
r501 r581 37 37 bool cxios_is_defined_axis_long_name(axis_Ptr axis_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return axis_hdl->long_name.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = axis_hdl->long_name.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 64 65 bool cxios_is_defined_axis_name(axis_Ptr axis_hdl ) 65 66 { 66 CTimer::get("XIOS").resume(); 67 return axis_hdl->name.hasInheritedValue(); 68 CTimer::get("XIOS").suspend(); 67 CTimer::get("XIOS").resume(); 68 bool isDefined = axis_hdl->name.hasInheritedValue(); 69 CTimer::get("XIOS").suspend(); 70 return isDefined; 69 71 } 70 72 … … 91 93 bool cxios_is_defined_axis_positive(axis_Ptr axis_hdl ) 92 94 { 93 CTimer::get("XIOS").resume(); 94 return axis_hdl->positive.hasInheritedValue(); 95 CTimer::get("XIOS").suspend(); 95 CTimer::get("XIOS").resume(); 96 bool isDefined = axis_hdl->positive.hasInheritedValue(); 97 CTimer::get("XIOS").suspend(); 98 return isDefined; 96 99 } 97 100 … … 113 116 bool cxios_is_defined_axis_size(axis_Ptr axis_hdl ) 114 117 { 115 CTimer::get("XIOS").resume(); 116 return axis_hdl->size.hasInheritedValue(); 117 CTimer::get("XIOS").suspend(); 118 CTimer::get("XIOS").resume(); 119 bool isDefined = axis_hdl->size.hasInheritedValue(); 120 CTimer::get("XIOS").suspend(); 121 return isDefined; 118 122 } 119 123 … … 140 144 bool cxios_is_defined_axis_standard_name(axis_Ptr axis_hdl ) 141 145 { 142 CTimer::get("XIOS").resume(); 143 return axis_hdl->standard_name.hasInheritedValue(); 144 CTimer::get("XIOS").suspend(); 146 CTimer::get("XIOS").resume(); 147 bool isDefined = axis_hdl->standard_name.hasInheritedValue(); 148 CTimer::get("XIOS").suspend(); 149 return isDefined; 145 150 } 146 151 … … 167 172 bool cxios_is_defined_axis_unit(axis_Ptr axis_hdl ) 168 173 { 169 CTimer::get("XIOS").resume(); 170 return axis_hdl->unit.hasInheritedValue(); 171 CTimer::get("XIOS").suspend(); 174 CTimer::get("XIOS").resume(); 175 bool isDefined = axis_hdl->unit.hasInheritedValue(); 176 CTimer::get("XIOS").suspend(); 177 return isDefined; 172 178 } 173 179 … … 193 199 bool cxios_is_defined_axis_value(axis_Ptr axis_hdl ) 194 200 { 195 CTimer::get("XIOS").resume(); 196 return axis_hdl->value.hasInheritedValue(); 197 CTimer::get("XIOS").suspend(); 201 CTimer::get("XIOS").resume(); 202 bool isDefined = axis_hdl->value.hasInheritedValue(); 203 CTimer::get("XIOS").suspend(); 204 return isDefined; 198 205 } 199 206 … … 215 222 bool cxios_is_defined_axis_zoom_begin(axis_Ptr axis_hdl ) 216 223 { 217 CTimer::get("XIOS").resume(); 218 return axis_hdl->zoom_begin.hasInheritedValue(); 219 CTimer::get("XIOS").suspend(); 224 CTimer::get("XIOS").resume(); 225 bool isDefined = axis_hdl->zoom_begin.hasInheritedValue(); 226 CTimer::get("XIOS").suspend(); 227 return isDefined; 220 228 } 221 229 … … 237 245 bool cxios_is_defined_axis_zoom_end(axis_Ptr axis_hdl ) 238 246 { 239 CTimer::get("XIOS").resume(); 240 return axis_hdl->zoom_end.hasInheritedValue(); 241 CTimer::get("XIOS").suspend(); 247 CTimer::get("XIOS").resume(); 248 bool isDefined = axis_hdl->zoom_end.hasInheritedValue(); 249 CTimer::get("XIOS").suspend(); 250 return isDefined; 242 251 } 243 252 … … 259 268 bool cxios_is_defined_axis_zoom_size(axis_Ptr axis_hdl ) 260 269 { 261 CTimer::get("XIOS").resume(); 262 return axis_hdl->zoom_size.hasInheritedValue(); 263 CTimer::get("XIOS").suspend(); 270 CTimer::get("XIOS").resume(); 271 bool isDefined = axis_hdl->zoom_size.hasInheritedValue(); 272 CTimer::get("XIOS").suspend(); 273 return isDefined; 264 274 } 265 275 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icaxisgroup_attr.cpp
r501 r581 37 37 bool cxios_is_defined_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return axisgroup_hdl->group_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = axisgroup_hdl->group_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 64 65 bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl ) 65 66 { 66 CTimer::get("XIOS").resume(); 67 return axisgroup_hdl->long_name.hasInheritedValue(); 68 CTimer::get("XIOS").suspend(); 67 CTimer::get("XIOS").resume(); 68 bool isDefined = axisgroup_hdl->long_name.hasInheritedValue(); 69 CTimer::get("XIOS").suspend(); 70 return isDefined; 69 71 } 70 72 … … 91 93 bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl ) 92 94 { 93 CTimer::get("XIOS").resume(); 94 return axisgroup_hdl->name.hasInheritedValue(); 95 CTimer::get("XIOS").suspend(); 95 CTimer::get("XIOS").resume(); 96 bool isDefined = axisgroup_hdl->name.hasInheritedValue(); 97 CTimer::get("XIOS").suspend(); 98 return isDefined; 96 99 } 97 100 … … 118 121 bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl ) 119 122 { 120 CTimer::get("XIOS").resume(); 121 return axisgroup_hdl->positive.hasInheritedValue(); 122 CTimer::get("XIOS").suspend(); 123 CTimer::get("XIOS").resume(); 124 bool isDefined = axisgroup_hdl->positive.hasInheritedValue(); 125 CTimer::get("XIOS").suspend(); 126 return isDefined; 123 127 } 124 128 … … 140 144 bool cxios_is_defined_axisgroup_size(axisgroup_Ptr axisgroup_hdl ) 141 145 { 142 CTimer::get("XIOS").resume(); 143 return axisgroup_hdl->size.hasInheritedValue(); 144 CTimer::get("XIOS").suspend(); 146 CTimer::get("XIOS").resume(); 147 bool isDefined = axisgroup_hdl->size.hasInheritedValue(); 148 CTimer::get("XIOS").suspend(); 149 return isDefined; 145 150 } 146 151 … … 167 172 bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl ) 168 173 { 169 CTimer::get("XIOS").resume(); 170 return axisgroup_hdl->standard_name.hasInheritedValue(); 171 CTimer::get("XIOS").suspend(); 174 CTimer::get("XIOS").resume(); 175 bool isDefined = axisgroup_hdl->standard_name.hasInheritedValue(); 176 CTimer::get("XIOS").suspend(); 177 return isDefined; 172 178 } 173 179 … … 194 200 bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl ) 195 201 { 196 CTimer::get("XIOS").resume(); 197 return axisgroup_hdl->unit.hasInheritedValue(); 198 CTimer::get("XIOS").suspend(); 202 CTimer::get("XIOS").resume(); 203 bool isDefined = axisgroup_hdl->unit.hasInheritedValue(); 204 CTimer::get("XIOS").suspend(); 205 return isDefined; 199 206 } 200 207 … … 220 227 bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl ) 221 228 { 222 CTimer::get("XIOS").resume(); 223 return axisgroup_hdl->value.hasInheritedValue(); 224 CTimer::get("XIOS").suspend(); 229 CTimer::get("XIOS").resume(); 230 bool isDefined = axisgroup_hdl->value.hasInheritedValue(); 231 CTimer::get("XIOS").suspend(); 232 return isDefined; 225 233 } 226 234 … … 242 250 bool cxios_is_defined_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl ) 243 251 { 244 CTimer::get("XIOS").resume(); 245 return axisgroup_hdl->zoom_begin.hasInheritedValue(); 246 CTimer::get("XIOS").suspend(); 252 CTimer::get("XIOS").resume(); 253 bool isDefined = axisgroup_hdl->zoom_begin.hasInheritedValue(); 254 CTimer::get("XIOS").suspend(); 255 return isDefined; 247 256 } 248 257 … … 264 273 bool cxios_is_defined_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl ) 265 274 { 266 CTimer::get("XIOS").resume(); 267 return axisgroup_hdl->zoom_end.hasInheritedValue(); 268 CTimer::get("XIOS").suspend(); 275 CTimer::get("XIOS").resume(); 276 bool isDefined = axisgroup_hdl->zoom_end.hasInheritedValue(); 277 CTimer::get("XIOS").suspend(); 278 return isDefined; 269 279 } 270 280 … … 286 296 bool cxios_is_defined_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl ) 287 297 { 288 CTimer::get("XIOS").resume(); 289 return axisgroup_hdl->zoom_size.hasInheritedValue(); 290 CTimer::get("XIOS").suspend(); 298 CTimer::get("XIOS").resume(); 299 bool isDefined = axisgroup_hdl->zoom_size.hasInheritedValue(); 300 CTimer::get("XIOS").suspend(); 301 return isDefined; 291 302 } 292 303 -
XIOS/branchs/xios-1.0/src/interface/c_attr/iccontext_attr.cpp
r501 r581 37 37 bool cxios_is_defined_context_calendar_type(context_Ptr context_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return context_hdl->calendar_type.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = context_hdl->calendar_type.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 64 65 bool cxios_is_defined_context_output_dir(context_Ptr context_hdl ) 65 66 { 66 CTimer::get("XIOS").resume(); 67 return context_hdl->output_dir.hasInheritedValue(); 68 CTimer::get("XIOS").suspend(); 67 CTimer::get("XIOS").resume(); 68 bool isDefined = context_hdl->output_dir.hasInheritedValue(); 69 CTimer::get("XIOS").suspend(); 70 return isDefined; 69 71 } 70 72 … … 91 93 bool cxios_is_defined_context_start_date(context_Ptr context_hdl ) 92 94 { 93 CTimer::get("XIOS").resume(); 94 return context_hdl->start_date.hasInheritedValue(); 95 CTimer::get("XIOS").suspend(); 95 CTimer::get("XIOS").resume(); 96 bool isDefined = context_hdl->start_date.hasInheritedValue(); 97 CTimer::get("XIOS").suspend(); 98 return isDefined; 96 99 } 97 100 … … 118 121 bool cxios_is_defined_context_time_origin(context_Ptr context_hdl ) 119 122 { 120 CTimer::get("XIOS").resume(); 121 return context_hdl->time_origin.hasInheritedValue(); 122 CTimer::get("XIOS").suspend(); 123 CTimer::get("XIOS").resume(); 124 bool isDefined = context_hdl->time_origin.hasInheritedValue(); 125 CTimer::get("XIOS").suspend(); 126 return isDefined; 123 127 } 124 128 … … 145 149 bool cxios_is_defined_context_timestep(context_Ptr context_hdl ) 146 150 { 147 CTimer::get("XIOS").resume(); 148 return context_hdl->timestep.hasInheritedValue(); 149 CTimer::get("XIOS").suspend(); 151 CTimer::get("XIOS").resume(); 152 bool isDefined = context_hdl->timestep.hasInheritedValue(); 153 CTimer::get("XIOS").suspend(); 154 return isDefined; 150 155 } 151 156 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icdomain_attr.cpp
r501 r581 36 36 bool cxios_is_defined_domain_bounds_lat(domain_Ptr domain_hdl ) 37 37 { 38 CTimer::get("XIOS").resume(); 39 return domain_hdl->bounds_lat.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 38 CTimer::get("XIOS").resume(); 39 bool isDefined = domain_hdl->bounds_lat.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 41 return isDefined; 41 42 } 42 43 … … 62 63 bool cxios_is_defined_domain_bounds_lon(domain_Ptr domain_hdl ) 63 64 { 64 CTimer::get("XIOS").resume(); 65 return domain_hdl->bounds_lon.hasInheritedValue(); 66 CTimer::get("XIOS").suspend(); 65 CTimer::get("XIOS").resume(); 66 bool isDefined = domain_hdl->bounds_lon.hasInheritedValue(); 67 CTimer::get("XIOS").suspend(); 68 return isDefined; 67 69 } 68 70 … … 84 86 bool cxios_is_defined_domain_data_dim(domain_Ptr domain_hdl ) 85 87 { 86 CTimer::get("XIOS").resume(); 87 return domain_hdl->data_dim.hasInheritedValue(); 88 CTimer::get("XIOS").suspend(); 88 CTimer::get("XIOS").resume(); 89 bool isDefined = domain_hdl->data_dim.hasInheritedValue(); 90 CTimer::get("XIOS").suspend(); 91 return isDefined; 89 92 } 90 93 … … 110 113 bool cxios_is_defined_domain_data_i_index(domain_Ptr domain_hdl ) 111 114 { 112 CTimer::get("XIOS").resume(); 113 return domain_hdl->data_i_index.hasInheritedValue(); 114 CTimer::get("XIOS").suspend(); 115 CTimer::get("XIOS").resume(); 116 bool isDefined = domain_hdl->data_i_index.hasInheritedValue(); 117 CTimer::get("XIOS").suspend(); 118 return isDefined; 115 119 } 116 120 … … 132 136 bool cxios_is_defined_domain_data_ibegin(domain_Ptr domain_hdl ) 133 137 { 134 CTimer::get("XIOS").resume(); 135 return domain_hdl->data_ibegin.hasInheritedValue(); 136 CTimer::get("XIOS").suspend(); 138 CTimer::get("XIOS").resume(); 139 bool isDefined = domain_hdl->data_ibegin.hasInheritedValue(); 140 CTimer::get("XIOS").suspend(); 141 return isDefined; 137 142 } 138 143 … … 158 163 bool cxios_is_defined_domain_data_j_index(domain_Ptr domain_hdl ) 159 164 { 160 CTimer::get("XIOS").resume(); 161 return domain_hdl->data_j_index.hasInheritedValue(); 162 CTimer::get("XIOS").suspend(); 165 CTimer::get("XIOS").resume(); 166 bool isDefined = domain_hdl->data_j_index.hasInheritedValue(); 167 CTimer::get("XIOS").suspend(); 168 return isDefined; 163 169 } 164 170 … … 180 186 bool cxios_is_defined_domain_data_jbegin(domain_Ptr domain_hdl ) 181 187 { 182 CTimer::get("XIOS").resume(); 183 return domain_hdl->data_jbegin.hasInheritedValue(); 184 CTimer::get("XIOS").suspend(); 188 CTimer::get("XIOS").resume(); 189 bool isDefined = domain_hdl->data_jbegin.hasInheritedValue(); 190 CTimer::get("XIOS").suspend(); 191 return isDefined; 185 192 } 186 193 … … 202 209 bool cxios_is_defined_domain_data_n_index(domain_Ptr domain_hdl ) 203 210 { 204 CTimer::get("XIOS").resume(); 205 return domain_hdl->data_n_index.hasInheritedValue(); 206 CTimer::get("XIOS").suspend(); 211 CTimer::get("XIOS").resume(); 212 bool isDefined = domain_hdl->data_n_index.hasInheritedValue(); 213 CTimer::get("XIOS").suspend(); 214 return isDefined; 207 215 } 208 216 … … 224 232 bool cxios_is_defined_domain_data_ni(domain_Ptr domain_hdl ) 225 233 { 226 CTimer::get("XIOS").resume(); 227 return domain_hdl->data_ni.hasInheritedValue(); 228 CTimer::get("XIOS").suspend(); 234 CTimer::get("XIOS").resume(); 235 bool isDefined = domain_hdl->data_ni.hasInheritedValue(); 236 CTimer::get("XIOS").suspend(); 237 return isDefined; 229 238 } 230 239 … … 246 255 bool cxios_is_defined_domain_data_nj(domain_Ptr domain_hdl ) 247 256 { 248 CTimer::get("XIOS").resume(); 249 return domain_hdl->data_nj.hasInheritedValue(); 250 CTimer::get("XIOS").suspend(); 257 CTimer::get("XIOS").resume(); 258 bool isDefined = domain_hdl->data_nj.hasInheritedValue(); 259 CTimer::get("XIOS").suspend(); 260 return isDefined; 251 261 } 252 262 … … 273 283 bool cxios_is_defined_domain_domain_group_ref(domain_Ptr domain_hdl ) 274 284 { 275 CTimer::get("XIOS").resume(); 276 return domain_hdl->domain_group_ref.hasInheritedValue(); 277 CTimer::get("XIOS").suspend(); 285 CTimer::get("XIOS").resume(); 286 bool isDefined = domain_hdl->domain_group_ref.hasInheritedValue(); 287 CTimer::get("XIOS").suspend(); 288 return isDefined; 278 289 } 279 290 … … 299 310 bool cxios_is_defined_domain_i_index(domain_Ptr domain_hdl ) 300 311 { 301 CTimer::get("XIOS").resume(); 302 return domain_hdl->i_index.hasInheritedValue(); 303 CTimer::get("XIOS").suspend(); 312 CTimer::get("XIOS").resume(); 313 bool isDefined = domain_hdl->i_index.hasInheritedValue(); 314 CTimer::get("XIOS").suspend(); 315 return isDefined; 304 316 } 305 317 … … 321 333 bool cxios_is_defined_domain_ibegin(domain_Ptr domain_hdl ) 322 334 { 323 CTimer::get("XIOS").resume(); 324 return domain_hdl->ibegin.hasInheritedValue(); 325 CTimer::get("XIOS").suspend(); 335 CTimer::get("XIOS").resume(); 336 bool isDefined = domain_hdl->ibegin.hasInheritedValue(); 337 CTimer::get("XIOS").suspend(); 338 return isDefined; 326 339 } 327 340 … … 343 356 bool cxios_is_defined_domain_iend(domain_Ptr domain_hdl ) 344 357 { 345 CTimer::get("XIOS").resume(); 346 return domain_hdl->iend.hasInheritedValue(); 347 CTimer::get("XIOS").suspend(); 358 CTimer::get("XIOS").resume(); 359 bool isDefined = domain_hdl->iend.hasInheritedValue(); 360 CTimer::get("XIOS").suspend(); 361 return isDefined; 348 362 } 349 363 … … 369 383 bool cxios_is_defined_domain_j_index(domain_Ptr domain_hdl ) 370 384 { 371 CTimer::get("XIOS").resume(); 372 return domain_hdl->j_index.hasInheritedValue(); 373 CTimer::get("XIOS").suspend(); 385 CTimer::get("XIOS").resume(); 386 bool isDefined = domain_hdl->j_index.hasInheritedValue(); 387 CTimer::get("XIOS").suspend(); 388 return isDefined; 374 389 } 375 390 … … 391 406 bool cxios_is_defined_domain_jbegin(domain_Ptr domain_hdl ) 392 407 { 393 CTimer::get("XIOS").resume(); 394 return domain_hdl->jbegin.hasInheritedValue(); 395 CTimer::get("XIOS").suspend(); 408 CTimer::get("XIOS").resume(); 409 bool isDefined = domain_hdl->jbegin.hasInheritedValue(); 410 CTimer::get("XIOS").suspend(); 411 return isDefined; 396 412 } 397 413 … … 413 429 bool cxios_is_defined_domain_jend(domain_Ptr domain_hdl ) 414 430 { 415 CTimer::get("XIOS").resume(); 416 return domain_hdl->jend.hasInheritedValue(); 417 CTimer::get("XIOS").suspend(); 431 CTimer::get("XIOS").resume(); 432 bool isDefined = domain_hdl->jend.hasInheritedValue(); 433 CTimer::get("XIOS").suspend(); 434 return isDefined; 418 435 } 419 436 … … 439 456 bool cxios_is_defined_domain_latvalue(domain_Ptr domain_hdl ) 440 457 { 441 CTimer::get("XIOS").resume(); 442 return domain_hdl->latvalue.hasInheritedValue(); 443 CTimer::get("XIOS").suspend(); 458 CTimer::get("XIOS").resume(); 459 bool isDefined = domain_hdl->latvalue.hasInheritedValue(); 460 CTimer::get("XIOS").suspend(); 461 return isDefined; 444 462 } 445 463 … … 466 484 bool cxios_is_defined_domain_long_name(domain_Ptr domain_hdl ) 467 485 { 468 CTimer::get("XIOS").resume(); 469 return domain_hdl->long_name.hasInheritedValue(); 470 CTimer::get("XIOS").suspend(); 486 CTimer::get("XIOS").resume(); 487 bool isDefined = domain_hdl->long_name.hasInheritedValue(); 488 CTimer::get("XIOS").suspend(); 489 return isDefined; 471 490 } 472 491 … … 492 511 bool cxios_is_defined_domain_lonvalue(domain_Ptr domain_hdl ) 493 512 { 494 CTimer::get("XIOS").resume(); 495 return domain_hdl->lonvalue.hasInheritedValue(); 496 CTimer::get("XIOS").suspend(); 513 CTimer::get("XIOS").resume(); 514 bool isDefined = domain_hdl->lonvalue.hasInheritedValue(); 515 CTimer::get("XIOS").suspend(); 516 return isDefined; 497 517 } 498 518 … … 518 538 bool cxios_is_defined_domain_mask(domain_Ptr domain_hdl ) 519 539 { 520 CTimer::get("XIOS").resume(); 521 return domain_hdl->mask.hasInheritedValue(); 522 CTimer::get("XIOS").suspend(); 540 CTimer::get("XIOS").resume(); 541 bool isDefined = domain_hdl->mask.hasInheritedValue(); 542 CTimer::get("XIOS").suspend(); 543 return isDefined; 523 544 } 524 545 … … 545 566 bool cxios_is_defined_domain_name(domain_Ptr domain_hdl ) 546 567 { 547 CTimer::get("XIOS").resume(); 548 return domain_hdl->name.hasInheritedValue(); 549 CTimer::get("XIOS").suspend(); 568 CTimer::get("XIOS").resume(); 569 bool isDefined = domain_hdl->name.hasInheritedValue(); 570 CTimer::get("XIOS").suspend(); 571 return isDefined; 550 572 } 551 573 … … 567 589 bool cxios_is_defined_domain_ni(domain_Ptr domain_hdl ) 568 590 { 569 CTimer::get("XIOS").resume(); 570 return domain_hdl->ni.hasInheritedValue(); 571 CTimer::get("XIOS").suspend(); 591 CTimer::get("XIOS").resume(); 592 bool isDefined = domain_hdl->ni.hasInheritedValue(); 593 CTimer::get("XIOS").suspend(); 594 return isDefined; 572 595 } 573 596 … … 589 612 bool cxios_is_defined_domain_ni_glo(domain_Ptr domain_hdl ) 590 613 { 591 CTimer::get("XIOS").resume(); 592 return domain_hdl->ni_glo.hasInheritedValue(); 593 CTimer::get("XIOS").suspend(); 614 CTimer::get("XIOS").resume(); 615 bool isDefined = domain_hdl->ni_glo.hasInheritedValue(); 616 CTimer::get("XIOS").suspend(); 617 return isDefined; 594 618 } 595 619 … … 611 635 bool cxios_is_defined_domain_nj(domain_Ptr domain_hdl ) 612 636 { 613 CTimer::get("XIOS").resume(); 614 return domain_hdl->nj.hasInheritedValue(); 615 CTimer::get("XIOS").suspend(); 637 CTimer::get("XIOS").resume(); 638 bool isDefined = domain_hdl->nj.hasInheritedValue(); 639 CTimer::get("XIOS").suspend(); 640 return isDefined; 616 641 } 617 642 … … 633 658 bool cxios_is_defined_domain_nj_glo(domain_Ptr domain_hdl ) 634 659 { 635 CTimer::get("XIOS").resume(); 636 return domain_hdl->nj_glo.hasInheritedValue(); 637 CTimer::get("XIOS").suspend(); 660 CTimer::get("XIOS").resume(); 661 bool isDefined = domain_hdl->nj_glo.hasInheritedValue(); 662 CTimer::get("XIOS").suspend(); 663 return isDefined; 638 664 } 639 665 … … 655 681 bool cxios_is_defined_domain_nvertex(domain_Ptr domain_hdl ) 656 682 { 657 CTimer::get("XIOS").resume(); 658 return domain_hdl->nvertex.hasInheritedValue(); 659 CTimer::get("XIOS").suspend(); 683 CTimer::get("XIOS").resume(); 684 bool isDefined = domain_hdl->nvertex.hasInheritedValue(); 685 CTimer::get("XIOS").suspend(); 686 return isDefined; 660 687 } 661 688 … … 682 709 bool cxios_is_defined_domain_standard_name(domain_Ptr domain_hdl ) 683 710 { 684 CTimer::get("XIOS").resume(); 685 return domain_hdl->standard_name.hasInheritedValue(); 686 CTimer::get("XIOS").suspend(); 711 CTimer::get("XIOS").resume(); 712 bool isDefined = domain_hdl->standard_name.hasInheritedValue(); 713 CTimer::get("XIOS").suspend(); 714 return isDefined; 687 715 } 688 716 … … 709 737 bool cxios_is_defined_domain_type(domain_Ptr domain_hdl ) 710 738 { 711 CTimer::get("XIOS").resume(); 712 return domain_hdl->type.hasInheritedValue(); 713 CTimer::get("XIOS").suspend(); 739 CTimer::get("XIOS").resume(); 740 bool isDefined = domain_hdl->type.hasInheritedValue(); 741 CTimer::get("XIOS").suspend(); 742 return isDefined; 714 743 } 715 744 … … 731 760 bool cxios_is_defined_domain_zoom_ibegin(domain_Ptr domain_hdl ) 732 761 { 733 CTimer::get("XIOS").resume(); 734 return domain_hdl->zoom_ibegin.hasInheritedValue(); 735 CTimer::get("XIOS").suspend(); 762 CTimer::get("XIOS").resume(); 763 bool isDefined = domain_hdl->zoom_ibegin.hasInheritedValue(); 764 CTimer::get("XIOS").suspend(); 765 return isDefined; 736 766 } 737 767 … … 753 783 bool cxios_is_defined_domain_zoom_ibegin_loc(domain_Ptr domain_hdl ) 754 784 { 755 CTimer::get("XIOS").resume(); 756 return domain_hdl->zoom_ibegin_loc.hasInheritedValue(); 757 CTimer::get("XIOS").suspend(); 785 CTimer::get("XIOS").resume(); 786 bool isDefined = domain_hdl->zoom_ibegin_loc.hasInheritedValue(); 787 CTimer::get("XIOS").suspend(); 788 return isDefined; 758 789 } 759 790 … … 775 806 bool cxios_is_defined_domain_zoom_jbegin(domain_Ptr domain_hdl ) 776 807 { 777 CTimer::get("XIOS").resume(); 778 return domain_hdl->zoom_jbegin.hasInheritedValue(); 779 CTimer::get("XIOS").suspend(); 808 CTimer::get("XIOS").resume(); 809 bool isDefined = domain_hdl->zoom_jbegin.hasInheritedValue(); 810 CTimer::get("XIOS").suspend(); 811 return isDefined; 780 812 } 781 813 … … 797 829 bool cxios_is_defined_domain_zoom_jbegin_loc(domain_Ptr domain_hdl ) 798 830 { 799 CTimer::get("XIOS").resume(); 800 return domain_hdl->zoom_jbegin_loc.hasInheritedValue(); 801 CTimer::get("XIOS").suspend(); 831 CTimer::get("XIOS").resume(); 832 bool isDefined = domain_hdl->zoom_jbegin_loc.hasInheritedValue(); 833 CTimer::get("XIOS").suspend(); 834 return isDefined; 802 835 } 803 836 … … 819 852 bool cxios_is_defined_domain_zoom_ni(domain_Ptr domain_hdl ) 820 853 { 821 CTimer::get("XIOS").resume(); 822 return domain_hdl->zoom_ni.hasInheritedValue(); 823 CTimer::get("XIOS").suspend(); 854 CTimer::get("XIOS").resume(); 855 bool isDefined = domain_hdl->zoom_ni.hasInheritedValue(); 856 CTimer::get("XIOS").suspend(); 857 return isDefined; 824 858 } 825 859 … … 841 875 bool cxios_is_defined_domain_zoom_ni_loc(domain_Ptr domain_hdl ) 842 876 { 843 CTimer::get("XIOS").resume(); 844 return domain_hdl->zoom_ni_loc.hasInheritedValue(); 845 CTimer::get("XIOS").suspend(); 877 CTimer::get("XIOS").resume(); 878 bool isDefined = domain_hdl->zoom_ni_loc.hasInheritedValue(); 879 CTimer::get("XIOS").suspend(); 880 return isDefined; 846 881 } 847 882 … … 863 898 bool cxios_is_defined_domain_zoom_nj(domain_Ptr domain_hdl ) 864 899 { 865 CTimer::get("XIOS").resume(); 866 return domain_hdl->zoom_nj.hasInheritedValue(); 867 CTimer::get("XIOS").suspend(); 900 CTimer::get("XIOS").resume(); 901 bool isDefined = domain_hdl->zoom_nj.hasInheritedValue(); 902 CTimer::get("XIOS").suspend(); 903 return isDefined; 868 904 } 869 905 … … 885 921 bool cxios_is_defined_domain_zoom_nj_loc(domain_Ptr domain_hdl ) 886 922 { 887 CTimer::get("XIOS").resume(); 888 return domain_hdl->zoom_nj_loc.hasInheritedValue(); 889 CTimer::get("XIOS").suspend(); 923 CTimer::get("XIOS").resume(); 924 bool isDefined = domain_hdl->zoom_nj_loc.hasInheritedValue(); 925 CTimer::get("XIOS").suspend(); 926 return isDefined; 890 927 } 891 928 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icdomaingroup_attr.cpp
r501 r581 36 36 bool cxios_is_defined_domaingroup_bounds_lat(domaingroup_Ptr domaingroup_hdl ) 37 37 { 38 CTimer::get("XIOS").resume(); 39 return domaingroup_hdl->bounds_lat.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 38 CTimer::get("XIOS").resume(); 39 bool isDefined = domaingroup_hdl->bounds_lat.hasInheritedValue(); 40 CTimer::get("XIOS").suspend(); 41 return isDefined; 41 42 } 42 43 … … 62 63 bool cxios_is_defined_domaingroup_bounds_lon(domaingroup_Ptr domaingroup_hdl ) 63 64 { 64 CTimer::get("XIOS").resume(); 65 return domaingroup_hdl->bounds_lon.hasInheritedValue(); 66 CTimer::get("XIOS").suspend(); 65 CTimer::get("XIOS").resume(); 66 bool isDefined = domaingroup_hdl->bounds_lon.hasInheritedValue(); 67 CTimer::get("XIOS").suspend(); 68 return isDefined; 67 69 } 68 70 … … 84 86 bool cxios_is_defined_domaingroup_data_dim(domaingroup_Ptr domaingroup_hdl ) 85 87 { 86 CTimer::get("XIOS").resume(); 87 return domaingroup_hdl->data_dim.hasInheritedValue(); 88 CTimer::get("XIOS").suspend(); 88 CTimer::get("XIOS").resume(); 89 bool isDefined = domaingroup_hdl->data_dim.hasInheritedValue(); 90 CTimer::get("XIOS").suspend(); 91 return isDefined; 89 92 } 90 93 … … 110 113 bool cxios_is_defined_domaingroup_data_i_index(domaingroup_Ptr domaingroup_hdl ) 111 114 { 112 CTimer::get("XIOS").resume(); 113 return domaingroup_hdl->data_i_index.hasInheritedValue(); 114 CTimer::get("XIOS").suspend(); 115 CTimer::get("XIOS").resume(); 116 bool isDefined = domaingroup_hdl->data_i_index.hasInheritedValue(); 117 CTimer::get("XIOS").suspend(); 118 return isDefined; 115 119 } 116 120 … … 132 136 bool cxios_is_defined_domaingroup_data_ibegin(domaingroup_Ptr domaingroup_hdl ) 133 137 { 134 CTimer::get("XIOS").resume(); 135 return domaingroup_hdl->data_ibegin.hasInheritedValue(); 136 CTimer::get("XIOS").suspend(); 138 CTimer::get("XIOS").resume(); 139 bool isDefined = domaingroup_hdl->data_ibegin.hasInheritedValue(); 140 CTimer::get("XIOS").suspend(); 141 return isDefined; 137 142 } 138 143 … … 158 163 bool cxios_is_defined_domaingroup_data_j_index(domaingroup_Ptr domaingroup_hdl ) 159 164 { 160 CTimer::get("XIOS").resume(); 161 return domaingroup_hdl->data_j_index.hasInheritedValue(); 162 CTimer::get("XIOS").suspend(); 165 CTimer::get("XIOS").resume(); 166 bool isDefined = domaingroup_hdl->data_j_index.hasInheritedValue(); 167 CTimer::get("XIOS").suspend(); 168 return isDefined; 163 169 } 164 170 … … 180 186 bool cxios_is_defined_domaingroup_data_jbegin(domaingroup_Ptr domaingroup_hdl ) 181 187 { 182 CTimer::get("XIOS").resume(); 183 return domaingroup_hdl->data_jbegin.hasInheritedValue(); 184 CTimer::get("XIOS").suspend(); 188 CTimer::get("XIOS").resume(); 189 bool isDefined = domaingroup_hdl->data_jbegin.hasInheritedValue(); 190 CTimer::get("XIOS").suspend(); 191 return isDefined; 185 192 } 186 193 … … 202 209 bool cxios_is_defined_domaingroup_data_n_index(domaingroup_Ptr domaingroup_hdl ) 203 210 { 204 CTimer::get("XIOS").resume(); 205 return domaingroup_hdl->data_n_index.hasInheritedValue(); 206 CTimer::get("XIOS").suspend(); 211 CTimer::get("XIOS").resume(); 212 bool isDefined = domaingroup_hdl->data_n_index.hasInheritedValue(); 213 CTimer::get("XIOS").suspend(); 214 return isDefined; 207 215 } 208 216 … … 224 232 bool cxios_is_defined_domaingroup_data_ni(domaingroup_Ptr domaingroup_hdl ) 225 233 { 226 CTimer::get("XIOS").resume(); 227 return domaingroup_hdl->data_ni.hasInheritedValue(); 228 CTimer::get("XIOS").suspend(); 234 CTimer::get("XIOS").resume(); 235 bool isDefined = domaingroup_hdl->data_ni.hasInheritedValue(); 236 CTimer::get("XIOS").suspend(); 237 return isDefined; 229 238 } 230 239 … … 246 255 bool cxios_is_defined_domaingroup_data_nj(domaingroup_Ptr domaingroup_hdl ) 247 256 { 248 CTimer::get("XIOS").resume(); 249 return domaingroup_hdl->data_nj.hasInheritedValue(); 250 CTimer::get("XIOS").suspend(); 257 CTimer::get("XIOS").resume(); 258 bool isDefined = domaingroup_hdl->data_nj.hasInheritedValue(); 259 CTimer::get("XIOS").suspend(); 260 return isDefined; 251 261 } 252 262 … … 273 283 bool cxios_is_defined_domaingroup_domain_group_ref(domaingroup_Ptr domaingroup_hdl ) 274 284 { 275 CTimer::get("XIOS").resume(); 276 return domaingroup_hdl->domain_group_ref.hasInheritedValue(); 277 CTimer::get("XIOS").suspend(); 285 CTimer::get("XIOS").resume(); 286 bool isDefined = domaingroup_hdl->domain_group_ref.hasInheritedValue(); 287 CTimer::get("XIOS").suspend(); 288 return isDefined; 278 289 } 279 290 … … 300 311 bool cxios_is_defined_domaingroup_group_ref(domaingroup_Ptr domaingroup_hdl ) 301 312 { 302 CTimer::get("XIOS").resume(); 303 return domaingroup_hdl->group_ref.hasInheritedValue(); 304 CTimer::get("XIOS").suspend(); 313 CTimer::get("XIOS").resume(); 314 bool isDefined = domaingroup_hdl->group_ref.hasInheritedValue(); 315 CTimer::get("XIOS").suspend(); 316 return isDefined; 305 317 } 306 318 … … 326 338 bool cxios_is_defined_domaingroup_i_index(domaingroup_Ptr domaingroup_hdl ) 327 339 { 328 CTimer::get("XIOS").resume(); 329 return domaingroup_hdl->i_index.hasInheritedValue(); 330 CTimer::get("XIOS").suspend(); 340 CTimer::get("XIOS").resume(); 341 bool isDefined = domaingroup_hdl->i_index.hasInheritedValue(); 342 CTimer::get("XIOS").suspend(); 343 return isDefined; 331 344 } 332 345 … … 348 361 bool cxios_is_defined_domaingroup_ibegin(domaingroup_Ptr domaingroup_hdl ) 349 362 { 350 CTimer::get("XIOS").resume(); 351 return domaingroup_hdl->ibegin.hasInheritedValue(); 352 CTimer::get("XIOS").suspend(); 363 CTimer::get("XIOS").resume(); 364 bool isDefined = domaingroup_hdl->ibegin.hasInheritedValue(); 365 CTimer::get("XIOS").suspend(); 366 return isDefined; 353 367 } 354 368 … … 370 384 bool cxios_is_defined_domaingroup_iend(domaingroup_Ptr domaingroup_hdl ) 371 385 { 372 CTimer::get("XIOS").resume(); 373 return domaingroup_hdl->iend.hasInheritedValue(); 374 CTimer::get("XIOS").suspend(); 386 CTimer::get("XIOS").resume(); 387 bool isDefined = domaingroup_hdl->iend.hasInheritedValue(); 388 CTimer::get("XIOS").suspend(); 389 return isDefined; 375 390 } 376 391 … … 396 411 bool cxios_is_defined_domaingroup_j_index(domaingroup_Ptr domaingroup_hdl ) 397 412 { 398 CTimer::get("XIOS").resume(); 399 return domaingroup_hdl->j_index.hasInheritedValue(); 400 CTimer::get("XIOS").suspend(); 413 CTimer::get("XIOS").resume(); 414 bool isDefined = domaingroup_hdl->j_index.hasInheritedValue(); 415 CTimer::get("XIOS").suspend(); 416 return isDefined; 401 417 } 402 418 … … 418 434 bool cxios_is_defined_domaingroup_jbegin(domaingroup_Ptr domaingroup_hdl ) 419 435 { 420 CTimer::get("XIOS").resume(); 421 return domaingroup_hdl->jbegin.hasInheritedValue(); 422 CTimer::get("XIOS").suspend(); 436 CTimer::get("XIOS").resume(); 437 bool isDefined = domaingroup_hdl->jbegin.hasInheritedValue(); 438 CTimer::get("XIOS").suspend(); 439 return isDefined; 423 440 } 424 441 … … 440 457 bool cxios_is_defined_domaingroup_jend(domaingroup_Ptr domaingroup_hdl ) 441 458 { 442 CTimer::get("XIOS").resume(); 443 return domaingroup_hdl->jend.hasInheritedValue(); 444 CTimer::get("XIOS").suspend(); 459 CTimer::get("XIOS").resume(); 460 bool isDefined = domaingroup_hdl->jend.hasInheritedValue(); 461 CTimer::get("XIOS").suspend(); 462 return isDefined; 445 463 } 446 464 … … 466 484 bool cxios_is_defined_domaingroup_latvalue(domaingroup_Ptr domaingroup_hdl ) 467 485 { 468 CTimer::get("XIOS").resume(); 469 return domaingroup_hdl->latvalue.hasInheritedValue(); 470 CTimer::get("XIOS").suspend(); 486 CTimer::get("XIOS").resume(); 487 bool isDefined = domaingroup_hdl->latvalue.hasInheritedValue(); 488 CTimer::get("XIOS").suspend(); 489 return isDefined; 471 490 } 472 491 … … 493 512 bool cxios_is_defined_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl ) 494 513 { 495 CTimer::get("XIOS").resume(); 496 return domaingroup_hdl->long_name.hasInheritedValue(); 497 CTimer::get("XIOS").suspend(); 514 CTimer::get("XIOS").resume(); 515 bool isDefined = domaingroup_hdl->long_name.hasInheritedValue(); 516 CTimer::get("XIOS").suspend(); 517 return isDefined; 498 518 } 499 519 … … 519 539 bool cxios_is_defined_domaingroup_lonvalue(domaingroup_Ptr domaingroup_hdl ) 520 540 { 521 CTimer::get("XIOS").resume(); 522 return domaingroup_hdl->lonvalue.hasInheritedValue(); 523 CTimer::get("XIOS").suspend(); 541 CTimer::get("XIOS").resume(); 542 bool isDefined = domaingroup_hdl->lonvalue.hasInheritedValue(); 543 CTimer::get("XIOS").suspend(); 544 return isDefined; 524 545 } 525 546 … … 545 566 bool cxios_is_defined_domaingroup_mask(domaingroup_Ptr domaingroup_hdl ) 546 567 { 547 CTimer::get("XIOS").resume(); 548 return domaingroup_hdl->mask.hasInheritedValue(); 549 CTimer::get("XIOS").suspend(); 568 CTimer::get("XIOS").resume(); 569 bool isDefined = domaingroup_hdl->mask.hasInheritedValue(); 570 CTimer::get("XIOS").suspend(); 571 return isDefined; 550 572 } 551 573 … … 572 594 bool cxios_is_defined_domaingroup_name(domaingroup_Ptr domaingroup_hdl ) 573 595 { 574 CTimer::get("XIOS").resume(); 575 return domaingroup_hdl->name.hasInheritedValue(); 576 CTimer::get("XIOS").suspend(); 596 CTimer::get("XIOS").resume(); 597 bool isDefined = domaingroup_hdl->name.hasInheritedValue(); 598 CTimer::get("XIOS").suspend(); 599 return isDefined; 577 600 } 578 601 … … 594 617 bool cxios_is_defined_domaingroup_ni(domaingroup_Ptr domaingroup_hdl ) 595 618 { 596 CTimer::get("XIOS").resume(); 597 return domaingroup_hdl->ni.hasInheritedValue(); 598 CTimer::get("XIOS").suspend(); 619 CTimer::get("XIOS").resume(); 620 bool isDefined = domaingroup_hdl->ni.hasInheritedValue(); 621 CTimer::get("XIOS").suspend(); 622 return isDefined; 599 623 } 600 624 … … 616 640 bool cxios_is_defined_domaingroup_ni_glo(domaingroup_Ptr domaingroup_hdl ) 617 641 { 618 CTimer::get("XIOS").resume(); 619 return domaingroup_hdl->ni_glo.hasInheritedValue(); 620 CTimer::get("XIOS").suspend(); 642 CTimer::get("XIOS").resume(); 643 bool isDefined = domaingroup_hdl->ni_glo.hasInheritedValue(); 644 CTimer::get("XIOS").suspend(); 645 return isDefined; 621 646 } 622 647 … … 638 663 bool cxios_is_defined_domaingroup_nj(domaingroup_Ptr domaingroup_hdl ) 639 664 { 640 CTimer::get("XIOS").resume(); 641 return domaingroup_hdl->nj.hasInheritedValue(); 642 CTimer::get("XIOS").suspend(); 665 CTimer::get("XIOS").resume(); 666 bool isDefined = domaingroup_hdl->nj.hasInheritedValue(); 667 CTimer::get("XIOS").suspend(); 668 return isDefined; 643 669 } 644 670 … … 660 686 bool cxios_is_defined_domaingroup_nj_glo(domaingroup_Ptr domaingroup_hdl ) 661 687 { 662 CTimer::get("XIOS").resume(); 663 return domaingroup_hdl->nj_glo.hasInheritedValue(); 664 CTimer::get("XIOS").suspend(); 688 CTimer::get("XIOS").resume(); 689 bool isDefined = domaingroup_hdl->nj_glo.hasInheritedValue(); 690 CTimer::get("XIOS").suspend(); 691 return isDefined; 665 692 } 666 693 … … 682 709 bool cxios_is_defined_domaingroup_nvertex(domaingroup_Ptr domaingroup_hdl ) 683 710 { 684 CTimer::get("XIOS").resume(); 685 return domaingroup_hdl->nvertex.hasInheritedValue(); 686 CTimer::get("XIOS").suspend(); 711 CTimer::get("XIOS").resume(); 712 bool isDefined = domaingroup_hdl->nvertex.hasInheritedValue(); 713 CTimer::get("XIOS").suspend(); 714 return isDefined; 687 715 } 688 716 … … 709 737 bool cxios_is_defined_domaingroup_standard_name(domaingroup_Ptr domaingroup_hdl ) 710 738 { 711 CTimer::get("XIOS").resume(); 712 return domaingroup_hdl->standard_name.hasInheritedValue(); 713 CTimer::get("XIOS").suspend(); 739 CTimer::get("XIOS").resume(); 740 bool isDefined = domaingroup_hdl->standard_name.hasInheritedValue(); 741 CTimer::get("XIOS").suspend(); 742 return isDefined; 714 743 } 715 744 … … 736 765 bool cxios_is_defined_domaingroup_type(domaingroup_Ptr domaingroup_hdl ) 737 766 { 738 CTimer::get("XIOS").resume(); 739 return domaingroup_hdl->type.hasInheritedValue(); 740 CTimer::get("XIOS").suspend(); 767 CTimer::get("XIOS").resume(); 768 bool isDefined = domaingroup_hdl->type.hasInheritedValue(); 769 CTimer::get("XIOS").suspend(); 770 return isDefined; 741 771 } 742 772 … … 758 788 bool cxios_is_defined_domaingroup_zoom_ibegin(domaingroup_Ptr domaingroup_hdl ) 759 789 { 760 CTimer::get("XIOS").resume(); 761 return domaingroup_hdl->zoom_ibegin.hasInheritedValue(); 762 CTimer::get("XIOS").suspend(); 790 CTimer::get("XIOS").resume(); 791 bool isDefined = domaingroup_hdl->zoom_ibegin.hasInheritedValue(); 792 CTimer::get("XIOS").suspend(); 793 return isDefined; 763 794 } 764 795 … … 780 811 bool cxios_is_defined_domaingroup_zoom_ibegin_loc(domaingroup_Ptr domaingroup_hdl ) 781 812 { 782 CTimer::get("XIOS").resume(); 783 return domaingroup_hdl->zoom_ibegin_loc.hasInheritedValue(); 784 CTimer::get("XIOS").suspend(); 813 CTimer::get("XIOS").resume(); 814 bool isDefined = domaingroup_hdl->zoom_ibegin_loc.hasInheritedValue(); 815 CTimer::get("XIOS").suspend(); 816 return isDefined; 785 817 } 786 818 … … 802 834 bool cxios_is_defined_domaingroup_zoom_jbegin(domaingroup_Ptr domaingroup_hdl ) 803 835 { 804 CTimer::get("XIOS").resume(); 805 return domaingroup_hdl->zoom_jbegin.hasInheritedValue(); 806 CTimer::get("XIOS").suspend(); 836 CTimer::get("XIOS").resume(); 837 bool isDefined = domaingroup_hdl->zoom_jbegin.hasInheritedValue(); 838 CTimer::get("XIOS").suspend(); 839 return isDefined; 807 840 } 808 841 … … 824 857 bool cxios_is_defined_domaingroup_zoom_jbegin_loc(domaingroup_Ptr domaingroup_hdl ) 825 858 { 826 CTimer::get("XIOS").resume(); 827 return domaingroup_hdl->zoom_jbegin_loc.hasInheritedValue(); 828 CTimer::get("XIOS").suspend(); 859 CTimer::get("XIOS").resume(); 860 bool isDefined = domaingroup_hdl->zoom_jbegin_loc.hasInheritedValue(); 861 CTimer::get("XIOS").suspend(); 862 return isDefined; 829 863 } 830 864 … … 846 880 bool cxios_is_defined_domaingroup_zoom_ni(domaingroup_Ptr domaingroup_hdl ) 847 881 { 848 CTimer::get("XIOS").resume(); 849 return domaingroup_hdl->zoom_ni.hasInheritedValue(); 850 CTimer::get("XIOS").suspend(); 882 CTimer::get("XIOS").resume(); 883 bool isDefined = domaingroup_hdl->zoom_ni.hasInheritedValue(); 884 CTimer::get("XIOS").suspend(); 885 return isDefined; 851 886 } 852 887 … … 868 903 bool cxios_is_defined_domaingroup_zoom_ni_loc(domaingroup_Ptr domaingroup_hdl ) 869 904 { 870 CTimer::get("XIOS").resume(); 871 return domaingroup_hdl->zoom_ni_loc.hasInheritedValue(); 872 CTimer::get("XIOS").suspend(); 905 CTimer::get("XIOS").resume(); 906 bool isDefined = domaingroup_hdl->zoom_ni_loc.hasInheritedValue(); 907 CTimer::get("XIOS").suspend(); 908 return isDefined; 873 909 } 874 910 … … 890 926 bool cxios_is_defined_domaingroup_zoom_nj(domaingroup_Ptr domaingroup_hdl ) 891 927 { 892 CTimer::get("XIOS").resume(); 893 return domaingroup_hdl->zoom_nj.hasInheritedValue(); 894 CTimer::get("XIOS").suspend(); 928 CTimer::get("XIOS").resume(); 929 bool isDefined = domaingroup_hdl->zoom_nj.hasInheritedValue(); 930 CTimer::get("XIOS").suspend(); 931 return isDefined; 895 932 } 896 933 … … 912 949 bool cxios_is_defined_domaingroup_zoom_nj_loc(domaingroup_Ptr domaingroup_hdl ) 913 950 { 914 CTimer::get("XIOS").resume(); 915 return domaingroup_hdl->zoom_nj_loc.hasInheritedValue(); 916 CTimer::get("XIOS").suspend(); 951 CTimer::get("XIOS").resume(); 952 bool isDefined = domaingroup_hdl->zoom_nj_loc.hasInheritedValue(); 953 CTimer::get("XIOS").suspend(); 954 return isDefined; 917 955 } 918 956 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icfield_attr.cpp
r501 r581 32 32 bool cxios_is_defined_field_add_offset(field_Ptr field_hdl ) 33 33 { 34 CTimer::get("XIOS").resume(); 35 return field_hdl->add_offset.hasInheritedValue(); 36 CTimer::get("XIOS").suspend(); 34 CTimer::get("XIOS").resume(); 35 bool isDefined = field_hdl->add_offset.hasInheritedValue(); 36 CTimer::get("XIOS").suspend(); 37 return isDefined; 37 38 } 38 39 … … 59 60 bool cxios_is_defined_field_axis_ref(field_Ptr field_hdl ) 60 61 { 61 CTimer::get("XIOS").resume(); 62 return field_hdl->axis_ref.hasInheritedValue(); 63 CTimer::get("XIOS").suspend(); 62 CTimer::get("XIOS").resume(); 63 bool isDefined = field_hdl->axis_ref.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 64 66 } 65 67 … … 81 83 bool cxios_is_defined_field_default_value(field_Ptr field_hdl ) 82 84 { 83 CTimer::get("XIOS").resume(); 84 return field_hdl->default_value.hasInheritedValue(); 85 CTimer::get("XIOS").suspend(); 85 CTimer::get("XIOS").resume(); 86 bool isDefined = field_hdl->default_value.hasInheritedValue(); 87 CTimer::get("XIOS").suspend(); 88 return isDefined; 86 89 } 87 90 … … 103 106 bool cxios_is_defined_field_detect_missing_value(field_Ptr field_hdl ) 104 107 { 105 CTimer::get("XIOS").resume(); 106 return field_hdl->detect_missing_value.hasInheritedValue(); 107 CTimer::get("XIOS").suspend(); 108 CTimer::get("XIOS").resume(); 109 bool isDefined = field_hdl->detect_missing_value.hasInheritedValue(); 110 CTimer::get("XIOS").suspend(); 111 return isDefined; 108 112 } 109 113 … … 130 134 bool cxios_is_defined_field_domain_ref(field_Ptr field_hdl ) 131 135 { 132 CTimer::get("XIOS").resume(); 133 return field_hdl->domain_ref.hasInheritedValue(); 134 CTimer::get("XIOS").suspend(); 136 CTimer::get("XIOS").resume(); 137 bool isDefined = field_hdl->domain_ref.hasInheritedValue(); 138 CTimer::get("XIOS").suspend(); 139 return isDefined; 135 140 } 136 141 … … 152 157 bool cxios_is_defined_field_enabled(field_Ptr field_hdl ) 153 158 { 154 CTimer::get("XIOS").resume(); 155 return field_hdl->enabled.hasInheritedValue(); 156 CTimer::get("XIOS").suspend(); 159 CTimer::get("XIOS").resume(); 160 bool isDefined = field_hdl->enabled.hasInheritedValue(); 161 CTimer::get("XIOS").suspend(); 162 return isDefined; 157 163 } 158 164 … … 179 185 bool cxios_is_defined_field_field_ref(field_Ptr field_hdl ) 180 186 { 181 CTimer::get("XIOS").resume(); 182 return field_hdl->field_ref.hasInheritedValue(); 183 CTimer::get("XIOS").suspend(); 187 CTimer::get("XIOS").resume(); 188 bool isDefined = field_hdl->field_ref.hasInheritedValue(); 189 CTimer::get("XIOS").suspend(); 190 return isDefined; 184 191 } 185 192 … … 206 213 bool cxios_is_defined_field_freq_offset(field_Ptr field_hdl ) 207 214 { 208 CTimer::get("XIOS").resume(); 209 return field_hdl->freq_offset.hasInheritedValue(); 210 CTimer::get("XIOS").suspend(); 215 CTimer::get("XIOS").resume(); 216 bool isDefined = field_hdl->freq_offset.hasInheritedValue(); 217 CTimer::get("XIOS").suspend(); 218 return isDefined; 211 219 } 212 220 … … 233 241 bool cxios_is_defined_field_freq_op(field_Ptr field_hdl ) 234 242 { 235 CTimer::get("XIOS").resume(); 236 return field_hdl->freq_op.hasInheritedValue(); 237 CTimer::get("XIOS").suspend(); 243 CTimer::get("XIOS").resume(); 244 bool isDefined = field_hdl->freq_op.hasInheritedValue(); 245 CTimer::get("XIOS").suspend(); 246 return isDefined; 238 247 } 239 248 … … 260 269 bool cxios_is_defined_field_grid_ref(field_Ptr field_hdl ) 261 270 { 262 CTimer::get("XIOS").resume(); 263 return field_hdl->grid_ref.hasInheritedValue(); 264 CTimer::get("XIOS").suspend(); 271 CTimer::get("XIOS").resume(); 272 bool isDefined = field_hdl->grid_ref.hasInheritedValue(); 273 CTimer::get("XIOS").suspend(); 274 return isDefined; 265 275 } 266 276 … … 282 292 bool cxios_is_defined_field_level(field_Ptr field_hdl ) 283 293 { 284 CTimer::get("XIOS").resume(); 285 return field_hdl->level.hasInheritedValue(); 286 CTimer::get("XIOS").suspend(); 294 CTimer::get("XIOS").resume(); 295 bool isDefined = field_hdl->level.hasInheritedValue(); 296 CTimer::get("XIOS").suspend(); 297 return isDefined; 287 298 } 288 299 … … 309 320 bool cxios_is_defined_field_long_name(field_Ptr field_hdl ) 310 321 { 311 CTimer::get("XIOS").resume(); 312 return field_hdl->long_name.hasInheritedValue(); 313 CTimer::get("XIOS").suspend(); 322 CTimer::get("XIOS").resume(); 323 bool isDefined = field_hdl->long_name.hasInheritedValue(); 324 CTimer::get("XIOS").suspend(); 325 return isDefined; 314 326 } 315 327 … … 336 348 bool cxios_is_defined_field_name(field_Ptr field_hdl ) 337 349 { 338 CTimer::get("XIOS").resume(); 339 return field_hdl->name.hasInheritedValue(); 340 CTimer::get("XIOS").suspend(); 350 CTimer::get("XIOS").resume(); 351 bool isDefined = field_hdl->name.hasInheritedValue(); 352 CTimer::get("XIOS").suspend(); 353 return isDefined; 341 354 } 342 355 … … 363 376 bool cxios_is_defined_field_operation(field_Ptr field_hdl ) 364 377 { 365 CTimer::get("XIOS").resume(); 366 return field_hdl->operation.hasInheritedValue(); 367 CTimer::get("XIOS").suspend(); 378 CTimer::get("XIOS").resume(); 379 bool isDefined = field_hdl->operation.hasInheritedValue(); 380 CTimer::get("XIOS").suspend(); 381 return isDefined; 368 382 } 369 383 … … 385 399 bool cxios_is_defined_field_prec(field_Ptr field_hdl ) 386 400 { 387 CTimer::get("XIOS").resume(); 388 return field_hdl->prec.hasInheritedValue(); 389 CTimer::get("XIOS").suspend(); 401 CTimer::get("XIOS").resume(); 402 bool isDefined = field_hdl->prec.hasInheritedValue(); 403 CTimer::get("XIOS").suspend(); 404 return isDefined; 390 405 } 391 406 … … 407 422 bool cxios_is_defined_field_scale_factor(field_Ptr field_hdl ) 408 423 { 409 CTimer::get("XIOS").resume(); 410 return field_hdl->scale_factor.hasInheritedValue(); 411 CTimer::get("XIOS").suspend(); 424 CTimer::get("XIOS").resume(); 425 bool isDefined = field_hdl->scale_factor.hasInheritedValue(); 426 CTimer::get("XIOS").suspend(); 427 return isDefined; 412 428 } 413 429 … … 434 450 bool cxios_is_defined_field_standard_name(field_Ptr field_hdl ) 435 451 { 436 CTimer::get("XIOS").resume(); 437 return field_hdl->standard_name.hasInheritedValue(); 438 CTimer::get("XIOS").suspend(); 452 CTimer::get("XIOS").resume(); 453 bool isDefined = field_hdl->standard_name.hasInheritedValue(); 454 CTimer::get("XIOS").suspend(); 455 return isDefined; 439 456 } 440 457 … … 461 478 bool cxios_is_defined_field_unit(field_Ptr field_hdl ) 462 479 { 463 CTimer::get("XIOS").resume(); 464 return field_hdl->unit.hasInheritedValue(); 465 CTimer::get("XIOS").suspend(); 480 CTimer::get("XIOS").resume(); 481 bool isDefined = field_hdl->unit.hasInheritedValue(); 482 CTimer::get("XIOS").suspend(); 483 return isDefined; 466 484 } 467 485 … … 483 501 bool cxios_is_defined_field_valid_max(field_Ptr field_hdl ) 484 502 { 485 CTimer::get("XIOS").resume(); 486 return field_hdl->valid_max.hasInheritedValue(); 487 CTimer::get("XIOS").suspend(); 503 CTimer::get("XIOS").resume(); 504 bool isDefined = field_hdl->valid_max.hasInheritedValue(); 505 CTimer::get("XIOS").suspend(); 506 return isDefined; 488 507 } 489 508 … … 505 524 bool cxios_is_defined_field_valid_min(field_Ptr field_hdl ) 506 525 { 507 CTimer::get("XIOS").resume(); 508 return field_hdl->valid_min.hasInheritedValue(); 509 CTimer::get("XIOS").suspend(); 526 CTimer::get("XIOS").resume(); 527 bool isDefined = field_hdl->valid_min.hasInheritedValue(); 528 CTimer::get("XIOS").suspend(); 529 return isDefined; 510 530 } 511 531 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icfieldgroup_attr.cpp
r501 r581 32 32 bool cxios_is_defined_fieldgroup_add_offset(fieldgroup_Ptr fieldgroup_hdl ) 33 33 { 34 CTimer::get("XIOS").resume(); 35 return fieldgroup_hdl->add_offset.hasInheritedValue(); 36 CTimer::get("XIOS").suspend(); 34 CTimer::get("XIOS").resume(); 35 bool isDefined = fieldgroup_hdl->add_offset.hasInheritedValue(); 36 CTimer::get("XIOS").suspend(); 37 return isDefined; 37 38 } 38 39 … … 59 60 bool cxios_is_defined_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl ) 60 61 { 61 CTimer::get("XIOS").resume(); 62 return fieldgroup_hdl->axis_ref.hasInheritedValue(); 63 CTimer::get("XIOS").suspend(); 62 CTimer::get("XIOS").resume(); 63 bool isDefined = fieldgroup_hdl->axis_ref.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 64 66 } 65 67 … … 81 83 bool cxios_is_defined_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl ) 82 84 { 83 CTimer::get("XIOS").resume(); 84 return fieldgroup_hdl->default_value.hasInheritedValue(); 85 CTimer::get("XIOS").suspend(); 85 CTimer::get("XIOS").resume(); 86 bool isDefined = fieldgroup_hdl->default_value.hasInheritedValue(); 87 CTimer::get("XIOS").suspend(); 88 return isDefined; 86 89 } 87 90 … … 103 106 bool cxios_is_defined_fieldgroup_detect_missing_value(fieldgroup_Ptr fieldgroup_hdl ) 104 107 { 105 CTimer::get("XIOS").resume(); 106 return fieldgroup_hdl->detect_missing_value.hasInheritedValue(); 107 CTimer::get("XIOS").suspend(); 108 CTimer::get("XIOS").resume(); 109 bool isDefined = fieldgroup_hdl->detect_missing_value.hasInheritedValue(); 110 CTimer::get("XIOS").suspend(); 111 return isDefined; 108 112 } 109 113 … … 130 134 bool cxios_is_defined_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl ) 131 135 { 132 CTimer::get("XIOS").resume(); 133 return fieldgroup_hdl->domain_ref.hasInheritedValue(); 134 CTimer::get("XIOS").suspend(); 136 CTimer::get("XIOS").resume(); 137 bool isDefined = fieldgroup_hdl->domain_ref.hasInheritedValue(); 138 CTimer::get("XIOS").suspend(); 139 return isDefined; 135 140 } 136 141 … … 152 157 bool cxios_is_defined_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl ) 153 158 { 154 CTimer::get("XIOS").resume(); 155 return fieldgroup_hdl->enabled.hasInheritedValue(); 156 CTimer::get("XIOS").suspend(); 159 CTimer::get("XIOS").resume(); 160 bool isDefined = fieldgroup_hdl->enabled.hasInheritedValue(); 161 CTimer::get("XIOS").suspend(); 162 return isDefined; 157 163 } 158 164 … … 179 185 bool cxios_is_defined_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl ) 180 186 { 181 CTimer::get("XIOS").resume(); 182 return fieldgroup_hdl->field_ref.hasInheritedValue(); 183 CTimer::get("XIOS").suspend(); 187 CTimer::get("XIOS").resume(); 188 bool isDefined = fieldgroup_hdl->field_ref.hasInheritedValue(); 189 CTimer::get("XIOS").suspend(); 190 return isDefined; 184 191 } 185 192 … … 206 213 bool cxios_is_defined_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl ) 207 214 { 208 CTimer::get("XIOS").resume(); 209 return fieldgroup_hdl->freq_offset.hasInheritedValue(); 210 CTimer::get("XIOS").suspend(); 215 CTimer::get("XIOS").resume(); 216 bool isDefined = fieldgroup_hdl->freq_offset.hasInheritedValue(); 217 CTimer::get("XIOS").suspend(); 218 return isDefined; 211 219 } 212 220 … … 233 241 bool cxios_is_defined_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl ) 234 242 { 235 CTimer::get("XIOS").resume(); 236 return fieldgroup_hdl->freq_op.hasInheritedValue(); 237 CTimer::get("XIOS").suspend(); 243 CTimer::get("XIOS").resume(); 244 bool isDefined = fieldgroup_hdl->freq_op.hasInheritedValue(); 245 CTimer::get("XIOS").suspend(); 246 return isDefined; 238 247 } 239 248 … … 260 269 bool cxios_is_defined_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl ) 261 270 { 262 CTimer::get("XIOS").resume(); 263 return fieldgroup_hdl->grid_ref.hasInheritedValue(); 264 CTimer::get("XIOS").suspend(); 271 CTimer::get("XIOS").resume(); 272 bool isDefined = fieldgroup_hdl->grid_ref.hasInheritedValue(); 273 CTimer::get("XIOS").suspend(); 274 return isDefined; 265 275 } 266 276 … … 287 297 bool cxios_is_defined_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl ) 288 298 { 289 CTimer::get("XIOS").resume(); 290 return fieldgroup_hdl->group_ref.hasInheritedValue(); 291 CTimer::get("XIOS").suspend(); 299 CTimer::get("XIOS").resume(); 300 bool isDefined = fieldgroup_hdl->group_ref.hasInheritedValue(); 301 CTimer::get("XIOS").suspend(); 302 return isDefined; 292 303 } 293 304 … … 309 320 bool cxios_is_defined_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl ) 310 321 { 311 CTimer::get("XIOS").resume(); 312 return fieldgroup_hdl->level.hasInheritedValue(); 313 CTimer::get("XIOS").suspend(); 322 CTimer::get("XIOS").resume(); 323 bool isDefined = fieldgroup_hdl->level.hasInheritedValue(); 324 CTimer::get("XIOS").suspend(); 325 return isDefined; 314 326 } 315 327 … … 336 348 bool cxios_is_defined_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl ) 337 349 { 338 CTimer::get("XIOS").resume(); 339 return fieldgroup_hdl->long_name.hasInheritedValue(); 340 CTimer::get("XIOS").suspend(); 350 CTimer::get("XIOS").resume(); 351 bool isDefined = fieldgroup_hdl->long_name.hasInheritedValue(); 352 CTimer::get("XIOS").suspend(); 353 return isDefined; 341 354 } 342 355 … … 363 376 bool cxios_is_defined_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl ) 364 377 { 365 CTimer::get("XIOS").resume(); 366 return fieldgroup_hdl->name.hasInheritedValue(); 367 CTimer::get("XIOS").suspend(); 378 CTimer::get("XIOS").resume(); 379 bool isDefined = fieldgroup_hdl->name.hasInheritedValue(); 380 CTimer::get("XIOS").suspend(); 381 return isDefined; 368 382 } 369 383 … … 390 404 bool cxios_is_defined_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl ) 391 405 { 392 CTimer::get("XIOS").resume(); 393 return fieldgroup_hdl->operation.hasInheritedValue(); 394 CTimer::get("XIOS").suspend(); 406 CTimer::get("XIOS").resume(); 407 bool isDefined = fieldgroup_hdl->operation.hasInheritedValue(); 408 CTimer::get("XIOS").suspend(); 409 return isDefined; 395 410 } 396 411 … … 412 427 bool cxios_is_defined_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl ) 413 428 { 414 CTimer::get("XIOS").resume(); 415 return fieldgroup_hdl->prec.hasInheritedValue(); 416 CTimer::get("XIOS").suspend(); 429 CTimer::get("XIOS").resume(); 430 bool isDefined = fieldgroup_hdl->prec.hasInheritedValue(); 431 CTimer::get("XIOS").suspend(); 432 return isDefined; 417 433 } 418 434 … … 434 450 bool cxios_is_defined_fieldgroup_scale_factor(fieldgroup_Ptr fieldgroup_hdl ) 435 451 { 436 CTimer::get("XIOS").resume(); 437 return fieldgroup_hdl->scale_factor.hasInheritedValue(); 438 CTimer::get("XIOS").suspend(); 452 CTimer::get("XIOS").resume(); 453 bool isDefined = fieldgroup_hdl->scale_factor.hasInheritedValue(); 454 CTimer::get("XIOS").suspend(); 455 return isDefined; 439 456 } 440 457 … … 461 478 bool cxios_is_defined_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl ) 462 479 { 463 CTimer::get("XIOS").resume(); 464 return fieldgroup_hdl->standard_name.hasInheritedValue(); 465 CTimer::get("XIOS").suspend(); 480 CTimer::get("XIOS").resume(); 481 bool isDefined = fieldgroup_hdl->standard_name.hasInheritedValue(); 482 CTimer::get("XIOS").suspend(); 483 return isDefined; 466 484 } 467 485 … … 488 506 bool cxios_is_defined_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl ) 489 507 { 490 CTimer::get("XIOS").resume(); 491 return fieldgroup_hdl->unit.hasInheritedValue(); 492 CTimer::get("XIOS").suspend(); 508 CTimer::get("XIOS").resume(); 509 bool isDefined = fieldgroup_hdl->unit.hasInheritedValue(); 510 CTimer::get("XIOS").suspend(); 511 return isDefined; 493 512 } 494 513 … … 510 529 bool cxios_is_defined_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl ) 511 530 { 512 CTimer::get("XIOS").resume(); 513 return fieldgroup_hdl->valid_max.hasInheritedValue(); 514 CTimer::get("XIOS").suspend(); 531 CTimer::get("XIOS").resume(); 532 bool isDefined = fieldgroup_hdl->valid_max.hasInheritedValue(); 533 CTimer::get("XIOS").suspend(); 534 return isDefined; 515 535 } 516 536 … … 532 552 bool cxios_is_defined_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl ) 533 553 { 534 CTimer::get("XIOS").resume(); 535 return fieldgroup_hdl->valid_min.hasInheritedValue(); 536 CTimer::get("XIOS").suspend(); 554 CTimer::get("XIOS").resume(); 555 bool isDefined = fieldgroup_hdl->valid_min.hasInheritedValue(); 556 CTimer::get("XIOS").suspend(); 557 return isDefined; 537 558 } 538 559 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icfile_attr.cpp
r501 r581 37 37 bool cxios_is_defined_file_description(file_Ptr file_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return file_hdl->description.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = file_hdl->description.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 59 60 bool cxios_is_defined_file_enabled(file_Ptr file_hdl ) 60 61 { 61 CTimer::get("XIOS").resume(); 62 return file_hdl->enabled.hasInheritedValue(); 63 CTimer::get("XIOS").suspend(); 62 CTimer::get("XIOS").resume(); 63 bool isDefined = file_hdl->enabled.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 64 66 } 65 67 … … 81 83 bool cxios_is_defined_file_min_digits(file_Ptr file_hdl ) 82 84 { 83 CTimer::get("XIOS").resume(); 84 return file_hdl->min_digits.hasInheritedValue(); 85 CTimer::get("XIOS").suspend(); 85 CTimer::get("XIOS").resume(); 86 bool isDefined = file_hdl->min_digits.hasInheritedValue(); 87 CTimer::get("XIOS").suspend(); 88 return isDefined; 86 89 } 87 90 … … 108 111 bool cxios_is_defined_file_name(file_Ptr file_hdl ) 109 112 { 110 CTimer::get("XIOS").resume(); 111 return file_hdl->name.hasInheritedValue(); 112 CTimer::get("XIOS").suspend(); 113 CTimer::get("XIOS").resume(); 114 bool isDefined = file_hdl->name.hasInheritedValue(); 115 CTimer::get("XIOS").suspend(); 116 return isDefined; 113 117 } 114 118 … … 135 139 bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl ) 136 140 { 137 CTimer::get("XIOS").resume(); 138 return file_hdl->name_suffix.hasInheritedValue(); 139 CTimer::get("XIOS").suspend(); 141 CTimer::get("XIOS").resume(); 142 bool isDefined = file_hdl->name_suffix.hasInheritedValue(); 143 CTimer::get("XIOS").suspend(); 144 return isDefined; 140 145 } 141 146 … … 162 167 bool cxios_is_defined_file_output_freq(file_Ptr file_hdl ) 163 168 { 164 CTimer::get("XIOS").resume(); 165 return file_hdl->output_freq.hasInheritedValue(); 166 CTimer::get("XIOS").suspend(); 169 CTimer::get("XIOS").resume(); 170 bool isDefined = file_hdl->output_freq.hasInheritedValue(); 171 CTimer::get("XIOS").suspend(); 172 return isDefined; 167 173 } 168 174 … … 184 190 bool cxios_is_defined_file_output_level(file_Ptr file_hdl ) 185 191 { 186 CTimer::get("XIOS").resume(); 187 return file_hdl->output_level.hasInheritedValue(); 188 CTimer::get("XIOS").suspend(); 192 CTimer::get("XIOS").resume(); 193 bool isDefined = file_hdl->output_level.hasInheritedValue(); 194 CTimer::get("XIOS").suspend(); 195 return isDefined; 189 196 } 190 197 … … 211 218 bool cxios_is_defined_file_par_access(file_Ptr file_hdl ) 212 219 { 213 CTimer::get("XIOS").resume(); 214 return file_hdl->par_access.hasInheritedValue(); 215 CTimer::get("XIOS").suspend(); 220 CTimer::get("XIOS").resume(); 221 bool isDefined = file_hdl->par_access.hasInheritedValue(); 222 CTimer::get("XIOS").suspend(); 223 return isDefined; 216 224 } 217 225 … … 238 246 bool cxios_is_defined_file_split_freq(file_Ptr file_hdl ) 239 247 { 240 CTimer::get("XIOS").resume(); 241 return file_hdl->split_freq.hasInheritedValue(); 242 CTimer::get("XIOS").suspend(); 248 CTimer::get("XIOS").resume(); 249 bool isDefined = file_hdl->split_freq.hasInheritedValue(); 250 CTimer::get("XIOS").suspend(); 251 return isDefined; 243 252 } 244 253 … … 265 274 bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl ) 266 275 { 267 CTimer::get("XIOS").resume(); 268 return file_hdl->split_freq_format.hasInheritedValue(); 269 CTimer::get("XIOS").suspend(); 276 CTimer::get("XIOS").resume(); 277 bool isDefined = file_hdl->split_freq_format.hasInheritedValue(); 278 CTimer::get("XIOS").suspend(); 279 return isDefined; 270 280 } 271 281 … … 292 302 bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl ) 293 303 { 294 CTimer::get("XIOS").resume(); 295 return file_hdl->sync_freq.hasInheritedValue(); 296 CTimer::get("XIOS").suspend(); 304 CTimer::get("XIOS").resume(); 305 bool isDefined = file_hdl->sync_freq.hasInheritedValue(); 306 CTimer::get("XIOS").suspend(); 307 return isDefined; 297 308 } 298 309 … … 319 330 bool cxios_is_defined_file_type(file_Ptr file_hdl ) 320 331 { 321 CTimer::get("XIOS").resume(); 322 return file_hdl->type.hasInheritedValue(); 323 CTimer::get("XIOS").suspend(); 332 CTimer::get("XIOS").resume(); 333 bool isDefined = file_hdl->type.hasInheritedValue(); 334 CTimer::get("XIOS").suspend(); 335 return isDefined; 324 336 } 325 337 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icfilegroup_attr.cpp
r501 r581 37 37 bool cxios_is_defined_filegroup_description(filegroup_Ptr filegroup_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return filegroup_hdl->description.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = filegroup_hdl->description.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 59 60 bool cxios_is_defined_filegroup_enabled(filegroup_Ptr filegroup_hdl ) 60 61 { 61 CTimer::get("XIOS").resume(); 62 return filegroup_hdl->enabled.hasInheritedValue(); 63 CTimer::get("XIOS").suspend(); 62 CTimer::get("XIOS").resume(); 63 bool isDefined = filegroup_hdl->enabled.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 64 66 } 65 67 … … 86 88 bool cxios_is_defined_filegroup_group_ref(filegroup_Ptr filegroup_hdl ) 87 89 { 88 CTimer::get("XIOS").resume(); 89 return filegroup_hdl->group_ref.hasInheritedValue(); 90 CTimer::get("XIOS").suspend(); 90 CTimer::get("XIOS").resume(); 91 bool isDefined = filegroup_hdl->group_ref.hasInheritedValue(); 92 CTimer::get("XIOS").suspend(); 93 return isDefined; 91 94 } 92 95 … … 108 111 bool cxios_is_defined_filegroup_min_digits(filegroup_Ptr filegroup_hdl ) 109 112 { 110 CTimer::get("XIOS").resume(); 111 return filegroup_hdl->min_digits.hasInheritedValue(); 112 CTimer::get("XIOS").suspend(); 113 CTimer::get("XIOS").resume(); 114 bool isDefined = filegroup_hdl->min_digits.hasInheritedValue(); 115 CTimer::get("XIOS").suspend(); 116 return isDefined; 113 117 } 114 118 … … 135 139 bool cxios_is_defined_filegroup_name(filegroup_Ptr filegroup_hdl ) 136 140 { 137 CTimer::get("XIOS").resume(); 138 return filegroup_hdl->name.hasInheritedValue(); 139 CTimer::get("XIOS").suspend(); 141 CTimer::get("XIOS").resume(); 142 bool isDefined = filegroup_hdl->name.hasInheritedValue(); 143 CTimer::get("XIOS").suspend(); 144 return isDefined; 140 145 } 141 146 … … 162 167 bool cxios_is_defined_filegroup_name_suffix(filegroup_Ptr filegroup_hdl ) 163 168 { 164 CTimer::get("XIOS").resume(); 165 return filegroup_hdl->name_suffix.hasInheritedValue(); 166 CTimer::get("XIOS").suspend(); 169 CTimer::get("XIOS").resume(); 170 bool isDefined = filegroup_hdl->name_suffix.hasInheritedValue(); 171 CTimer::get("XIOS").suspend(); 172 return isDefined; 167 173 } 168 174 … … 189 195 bool cxios_is_defined_filegroup_output_freq(filegroup_Ptr filegroup_hdl ) 190 196 { 191 CTimer::get("XIOS").resume(); 192 return filegroup_hdl->output_freq.hasInheritedValue(); 193 CTimer::get("XIOS").suspend(); 197 CTimer::get("XIOS").resume(); 198 bool isDefined = filegroup_hdl->output_freq.hasInheritedValue(); 199 CTimer::get("XIOS").suspend(); 200 return isDefined; 194 201 } 195 202 … … 211 218 bool cxios_is_defined_filegroup_output_level(filegroup_Ptr filegroup_hdl ) 212 219 { 213 CTimer::get("XIOS").resume(); 214 return filegroup_hdl->output_level.hasInheritedValue(); 215 CTimer::get("XIOS").suspend(); 220 CTimer::get("XIOS").resume(); 221 bool isDefined = filegroup_hdl->output_level.hasInheritedValue(); 222 CTimer::get("XIOS").suspend(); 223 return isDefined; 216 224 } 217 225 … … 238 246 bool cxios_is_defined_filegroup_par_access(filegroup_Ptr filegroup_hdl ) 239 247 { 240 CTimer::get("XIOS").resume(); 241 return filegroup_hdl->par_access.hasInheritedValue(); 242 CTimer::get("XIOS").suspend(); 248 CTimer::get("XIOS").resume(); 249 bool isDefined = filegroup_hdl->par_access.hasInheritedValue(); 250 CTimer::get("XIOS").suspend(); 251 return isDefined; 243 252 } 244 253 … … 265 274 bool cxios_is_defined_filegroup_split_freq(filegroup_Ptr filegroup_hdl ) 266 275 { 267 CTimer::get("XIOS").resume(); 268 return filegroup_hdl->split_freq.hasInheritedValue(); 269 CTimer::get("XIOS").suspend(); 276 CTimer::get("XIOS").resume(); 277 bool isDefined = filegroup_hdl->split_freq.hasInheritedValue(); 278 CTimer::get("XIOS").suspend(); 279 return isDefined; 270 280 } 271 281 … … 292 302 bool cxios_is_defined_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl ) 293 303 { 294 CTimer::get("XIOS").resume(); 295 return filegroup_hdl->split_freq_format.hasInheritedValue(); 296 CTimer::get("XIOS").suspend(); 304 CTimer::get("XIOS").resume(); 305 bool isDefined = filegroup_hdl->split_freq_format.hasInheritedValue(); 306 CTimer::get("XIOS").suspend(); 307 return isDefined; 297 308 } 298 309 … … 319 330 bool cxios_is_defined_filegroup_sync_freq(filegroup_Ptr filegroup_hdl ) 320 331 { 321 CTimer::get("XIOS").resume(); 322 return filegroup_hdl->sync_freq.hasInheritedValue(); 323 CTimer::get("XIOS").suspend(); 332 CTimer::get("XIOS").resume(); 333 bool isDefined = filegroup_hdl->sync_freq.hasInheritedValue(); 334 CTimer::get("XIOS").suspend(); 335 return isDefined; 324 336 } 325 337 … … 346 358 bool cxios_is_defined_filegroup_type(filegroup_Ptr filegroup_hdl ) 347 359 { 348 CTimer::get("XIOS").resume(); 349 return filegroup_hdl->type.hasInheritedValue(); 350 CTimer::get("XIOS").suspend(); 360 CTimer::get("XIOS").resume(); 361 bool isDefined = filegroup_hdl->type.hasInheritedValue(); 362 CTimer::get("XIOS").suspend(); 363 return isDefined; 351 364 } 352 365 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icgrid_attr.cpp
r501 r581 37 37 bool cxios_is_defined_grid_axis_ref(grid_Ptr grid_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return grid_hdl->axis_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = grid_hdl->axis_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 64 65 bool cxios_is_defined_grid_description(grid_Ptr grid_hdl ) 65 66 { 66 CTimer::get("XIOS").resume(); 67 return grid_hdl->description.hasInheritedValue(); 68 CTimer::get("XIOS").suspend(); 67 CTimer::get("XIOS").resume(); 68 bool isDefined = grid_hdl->description.hasInheritedValue(); 69 CTimer::get("XIOS").suspend(); 70 return isDefined; 69 71 } 70 72 … … 91 93 bool cxios_is_defined_grid_domain_ref(grid_Ptr grid_hdl ) 92 94 { 93 CTimer::get("XIOS").resume(); 94 return grid_hdl->domain_ref.hasInheritedValue(); 95 CTimer::get("XIOS").suspend(); 95 CTimer::get("XIOS").resume(); 96 bool isDefined = grid_hdl->domain_ref.hasInheritedValue(); 97 CTimer::get("XIOS").suspend(); 98 return isDefined; 96 99 } 97 100 … … 117 120 bool cxios_is_defined_grid_mask(grid_Ptr grid_hdl ) 118 121 { 119 CTimer::get("XIOS").resume(); 120 return grid_hdl->mask.hasInheritedValue(); 121 CTimer::get("XIOS").suspend(); 122 CTimer::get("XIOS").resume(); 123 bool isDefined = grid_hdl->mask.hasInheritedValue(); 124 CTimer::get("XIOS").suspend(); 125 return isDefined; 122 126 } 123 127 … … 144 148 bool cxios_is_defined_grid_name(grid_Ptr grid_hdl ) 145 149 { 146 CTimer::get("XIOS").resume(); 147 return grid_hdl->name.hasInheritedValue(); 148 CTimer::get("XIOS").suspend(); 150 CTimer::get("XIOS").resume(); 151 bool isDefined = grid_hdl->name.hasInheritedValue(); 152 CTimer::get("XIOS").suspend(); 153 return isDefined; 149 154 } 150 155 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icgridgroup_attr.cpp
r501 r581 37 37 bool cxios_is_defined_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return gridgroup_hdl->axis_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = gridgroup_hdl->axis_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 64 65 bool cxios_is_defined_gridgroup_description(gridgroup_Ptr gridgroup_hdl ) 65 66 { 66 CTimer::get("XIOS").resume(); 67 return gridgroup_hdl->description.hasInheritedValue(); 68 CTimer::get("XIOS").suspend(); 67 CTimer::get("XIOS").resume(); 68 bool isDefined = gridgroup_hdl->description.hasInheritedValue(); 69 CTimer::get("XIOS").suspend(); 70 return isDefined; 69 71 } 70 72 … … 91 93 bool cxios_is_defined_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl ) 92 94 { 93 CTimer::get("XIOS").resume(); 94 return gridgroup_hdl->domain_ref.hasInheritedValue(); 95 CTimer::get("XIOS").suspend(); 95 CTimer::get("XIOS").resume(); 96 bool isDefined = gridgroup_hdl->domain_ref.hasInheritedValue(); 97 CTimer::get("XIOS").suspend(); 98 return isDefined; 96 99 } 97 100 … … 118 121 bool cxios_is_defined_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl ) 119 122 { 120 CTimer::get("XIOS").resume(); 121 return gridgroup_hdl->group_ref.hasInheritedValue(); 122 CTimer::get("XIOS").suspend(); 123 CTimer::get("XIOS").resume(); 124 bool isDefined = gridgroup_hdl->group_ref.hasInheritedValue(); 125 CTimer::get("XIOS").suspend(); 126 return isDefined; 123 127 } 124 128 … … 144 148 bool cxios_is_defined_gridgroup_mask(gridgroup_Ptr gridgroup_hdl ) 145 149 { 146 CTimer::get("XIOS").resume(); 147 return gridgroup_hdl->mask.hasInheritedValue(); 148 CTimer::get("XIOS").suspend(); 150 CTimer::get("XIOS").resume(); 151 bool isDefined = gridgroup_hdl->mask.hasInheritedValue(); 152 CTimer::get("XIOS").suspend(); 153 return isDefined; 149 154 } 150 155 … … 171 176 bool cxios_is_defined_gridgroup_name(gridgroup_Ptr gridgroup_hdl ) 172 177 { 173 CTimer::get("XIOS").resume(); 174 return gridgroup_hdl->name.hasInheritedValue(); 175 CTimer::get("XIOS").suspend(); 178 CTimer::get("XIOS").resume(); 179 bool isDefined = gridgroup_hdl->name.hasInheritedValue(); 180 CTimer::get("XIOS").suspend(); 181 return isDefined; 176 182 } 177 183 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icvariable_attr.cpp
r501 r581 37 37 bool cxios_is_defined_variable_name(variable_Ptr variable_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return variable_hdl->name.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = variable_hdl->name.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 64 65 bool cxios_is_defined_variable_type(variable_Ptr variable_hdl ) 65 66 { 66 CTimer::get("XIOS").resume(); 67 return variable_hdl->type.hasInheritedValue(); 68 CTimer::get("XIOS").suspend(); 67 CTimer::get("XIOS").resume(); 68 bool isDefined = variable_hdl->type.hasInheritedValue(); 69 CTimer::get("XIOS").suspend(); 70 return isDefined; 69 71 } 70 72 -
XIOS/branchs/xios-1.0/src/interface/c_attr/icvariablegroup_attr.cpp
r501 r581 37 37 bool cxios_is_defined_variablegroup_group_ref(variablegroup_Ptr variablegroup_hdl ) 38 38 { 39 CTimer::get("XIOS").resume(); 40 return variablegroup_hdl->group_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 39 CTimer::get("XIOS").resume(); 40 bool isDefined = variablegroup_hdl->group_ref.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 42 43 } 43 44 … … 64 65 bool cxios_is_defined_variablegroup_name(variablegroup_Ptr variablegroup_hdl ) 65 66 { 66 CTimer::get("XIOS").resume(); 67 return variablegroup_hdl->name.hasInheritedValue(); 68 CTimer::get("XIOS").suspend(); 67 CTimer::get("XIOS").resume(); 68 bool isDefined = variablegroup_hdl->name.hasInheritedValue(); 69 CTimer::get("XIOS").suspend(); 70 return isDefined; 69 71 } 70 72 … … 91 93 bool cxios_is_defined_variablegroup_type(variablegroup_Ptr variablegroup_hdl ) 92 94 { 93 CTimer::get("XIOS").resume(); 94 return variablegroup_hdl->type.hasInheritedValue(); 95 CTimer::get("XIOS").suspend(); 95 CTimer::get("XIOS").resume(); 96 bool isDefined = variablegroup_hdl->type.hasInheritedValue(); 97 CTimer::get("XIOS").suspend(); 98 return isDefined; 96 99 } 97 100 -
XIOS/trunk/src/attribute_map.cpp
r509 r581 5 5 { 6 6 /// ////////////////////// Définitions ////////////////////// /// 7 CAttributeMap 7 CAttributeMap* CAttributeMap::Current = NULL; 8 8 9 9 CAttributeMap::CAttributeMap(void) … … 22 22 for (; it != end; it++) 23 23 { 24 const StdStrAttPair 24 const StdStrAttPair& att = *it; 25 25 att.second->reset(); 26 26 } … … 29 29 //--------------------------------------------------------------- 30 30 31 bool CAttributeMap::hasAttribute(const StdString 31 bool CAttributeMap::hasAttribute(const StdString& key) const 32 32 { 33 33 return (this->find(key) != this->end()); … … 41 41 //--------------------------------------------------------------- 42 42 43 void CAttributeMap::setAttribute(const StdString & key, CAttribute* const attr)43 void CAttributeMap::setAttribute(const StdString& key, CAttribute* const attr) 44 44 { 45 45 if (!this->hasAttribute(key)) … … 49 49 ERROR("CAttributeMap::setAttribute(key, attr)", 50 50 << "[ key = " << key << "] attr is null !"); 51 this->find(key)->second->set(*attr) 52 // 53 } 54 55 //--------------------------------------------------------------- 56 57 CAttribute * CAttributeMap::operator[](const StdString& key)51 this->find(key)->second->set(*attr); 52 // this->find(key)->second->setAnyValue(attr->getAnyValue()); 53 } 54 55 //--------------------------------------------------------------- 56 57 CAttribute* CAttributeMap::operator[](const StdString& key) 58 58 { 59 59 if (!this->hasAttribute(key)) 60 ERROR("CAttributeMap::operator[](const StdString 60 ERROR("CAttributeMap::operator[](const StdString& key)", 61 61 << "[ key = " << key << "] key not found !"); 62 return (SuperClassMap::operator[](key));62 return SuperClassMap::operator[](key); 63 63 } 64 64 … … 73 73 for (; it != end; it++) 74 74 { 75 const StdStrAttPair 75 const StdStrAttPair& att = *it; 76 76 if (!att.second->isEmpty()) 77 77 oss << *att.second << " "; 78 78 } 79 return (oss.str());80 } 81 82 //--------------------------------------------------------------- 83 84 void CAttributeMap::fromString(const StdString 85 { 86 ERROR("CAttributeMap::fromString(const StdString 79 return oss.str(); 80 } 81 82 //--------------------------------------------------------------- 83 84 void CAttributeMap::fromString(const StdString& str) 85 { 86 ERROR("CAttributeMap::fromString(const StdString& str)", 87 87 << "[ str = " << str << "] Not implemented yet !"); 88 88 } … … 90 90 //--------------------------------------------------------------- 91 91 92 //StdOStream & operator << (StdOStream & os, const CAttributeMap& attributmap)92 //StdOStream& operator << (StdOStream& os, const CAttributeMap& attributmap) 93 93 //{ os << attributmap.toString(); return (os); } 94 94 95 95 //--------------------------------------------------------------- 96 96 97 void CAttributeMap::setAttributes(const xml::THashAttributes 97 void CAttributeMap::setAttributes(const xml::THashAttributes& attributes) 98 98 { 99 99 for (xml::THashAttributes::const_iterator it = attributes.begin(); 100 100 it != attributes.end(); 101 it ++) 102 { 103 if ((*it).first.compare(StdString("id")) != 0 && 104 (*it).first.compare(StdString("src"))!= 0) 101 it++) 102 { 103 if ((*it).first.compare(StdString("id")) != 0 && (*it).first.compare(StdString("src")) != 0) 105 104 { 106 105 //if (CAttributeMap::operator[]((*it).first)->isEmpty()) … … 121 120 or filled in in case of emptyp (true) 122 121 */ 123 void CAttributeMap::setAttributes(const CAttributeMap 122 void CAttributeMap::setAttributes(const CAttributeMap* const _parent, bool apply) 124 123 { 125 124 typedef std::pair<StdString, CAttribute*> StdStrAttPair; … … 128 127 for (; it != end; it++) 129 128 { 130 const StdStrAttPair 129 const StdStrAttPair& el = *it; 131 130 if (this->hasAttribute(el.first)) 132 131 { 133 CAttribute 134 CAttribute * parentAtt = el.second;132 CAttribute* currentAtt = CAttributeMap::operator[](el.first); 133 CAttribute* parentAtt = el.second; 135 134 if (apply) 136 135 { … … 140 139 } 141 140 } 142 else currentAtt->setInheritedValue(*parentAtt) 141 else currentAtt->setInheritedValue(*parentAtt); 143 142 } 144 143 } … … 147 146 //--------------------------------------------------------------- 148 147 /* 149 void CAttributeMap::toBinary(StdOStream 148 void CAttributeMap::toBinary(StdOStream& os) const 150 149 { 151 150 typedef std::pair<StdString, CAttribute*> StdStrAttPair; … … 157 156 for (; it != end; it++) 158 157 { 159 const StdString 158 const StdString& key = it->first; 160 159 const CAttribute* value = it->second; 161 160 const StdSize size = key.size(); 162 161 163 162 os.write (reinterpret_cast<const char*>(&size) , sizeof(StdSize)); 164 os.write (key.data(), size 163 os.write (key.data(), size* sizeof(char)); 165 164 166 165 if (!value->isEmpty()) … … 180 179 //--------------------------------------------------------------- 181 180 182 void CAttributeMap::fromBinary(StdIStream 181 void CAttributeMap::fromBinary(StdIStream& is) 183 182 { 184 183 StdSize nbatt = 0; … … 191 190 is.read (reinterpret_cast<char*>(&size), sizeof(StdSize)); 192 191 StdString key(size, ' '); 193 is.read (const_cast<char *>(key.data()), size 192 is.read (const_cast<char *>(key.data()), size* sizeof(char)); 194 193 195 194 if (!this->hasAttribute(key)) 196 ERROR("CAttributeMap::fromBinary(StdIStream 195 ERROR("CAttributeMap::fromBinary(StdIStream& is)", 197 196 << "[ key = " << key << "] key not found !"); 198 197 … … 209 208 for (; it != end; it++) 210 209 { 211 it->second->generateCInterface(oss,className) ; 212 it->second->generateCInterfaceIsDefined(oss,className) ; 213 oss<<iendl<<iendl ; 210 oss << std::endl << iendl; 211 it->second->generateCInterface(oss, className); 212 oss << iendl; 213 it->second->generateCInterfaceIsDefined(oss, className); 214 214 } 215 215 } … … 220 220 for (; it != end; it++) 221 221 { 222 it->second->generateFortran2003Interface(oss,className);223 it->second->generateFortran2003Interface IsDefined(oss,className);224 225 oss<<iendl<<iendl;222 oss << std::endl << iendl; 223 it->second->generateFortran2003Interface(oss, className); 224 oss << iendl; 225 it->second->generateFortran2003InterfaceIsDefined(oss, className); 226 226 } 227 227 } … … 231 231 void CAttributeMap::generateFortranInterface_hdl_(ostream& oss, const string& className) 232 232 { 233 oss<<"SUBROUTINE xios(set_"<<className<<"_attr_hdl_) &"<<iendl++ ; 234 ostringstream* oss2 ; 235 SuperClassMap::const_iterator it ; 236 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 237 238 oss2=new ostringstream ; 239 240 *oss2<<"( "<<className<<"_hdl" ; 241 242 for ( it=begin ; it != end; it++) 243 { 244 *oss2<<", "<<it->second->getName()<<"_" ; 245 if (oss2->str().size()>90) 246 { 247 oss<<oss2->str()<<" &"<<iendl ; 248 delete oss2 ; 249 oss2=new ostringstream ; 250 } 251 } 252 *oss2<<" )" ; 253 oss<<oss2->str()<<iendl ; 254 oss<<iendl ; 255 delete oss2 ; 256 257 oss<<"IMPLICIT NONE"<<iendl++ ; 258 oss<<"TYPE(txios("<<className<<")) , INTENT(IN) :: "<<className<<"_hdl"<<iendl ; 259 260 for (it=begin; it != end; it++) 261 { 262 it->second->generateFortranInterfaceDeclaration_(oss,className) ; 263 } 264 265 oss<<iendl ; 266 267 for (it=begin; it != end; it++) 268 { 269 it->second->generateFortranInterfaceBody_(oss,className) ; 270 oss<<iendl ; 271 } 272 273 oss<<iendl--<<iendl-- ; 274 oss<<"END SUBROUTINE xios(set_"<<className<<"_attr_hdl_)"<<iendl ; 275 233 oss << "SUBROUTINE xios(set_" << className << "_attr_hdl_) &" << iendl++; 234 ostringstream* oss2; 235 SuperClassMap::const_iterator it; 236 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 237 238 oss2 = new ostringstream; 239 240 *oss2 << "( " << className << "_hdl" ; 241 242 for (it = begin; it != end; it++) 243 { 244 *oss2 << ", " << it->second->getName() << "_"; 245 if (oss2->str().size() > 90) 246 { 247 oss << oss2->str() << " &" << iendl; 248 delete oss2; 249 oss2 = new ostringstream; 250 } 251 } 252 *oss2 << " )"; 253 oss << oss2->str() << std::endl; 254 oss << iendl; 255 delete oss2; 256 257 oss << "IMPLICIT NONE" << iendl++; 258 oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl"; 259 260 for (it = begin; it != end; it++) 261 { 262 oss << iendl; 263 it->second->generateFortranInterfaceDeclaration_(oss, className); 264 } 265 266 for (it = begin; it != end; it++) 267 { 268 oss << std::endl << iendl; 269 it->second->generateFortranInterfaceBody_(oss, className); 270 } 271 272 oss << std::endl << (iendl -= 2); 273 oss << "END SUBROUTINE xios(set_" << className << "_attr_hdl_)" << std::endl; 276 274 } 277 275 278 276 void CAttributeMap::generateFortranInterfaceGet_hdl_(ostream& oss, const string& className) 279 277 { 280 oss<<"SUBROUTINE xios(get_"<<className<<"_attr_hdl_) &"<<iendl++ ; 281 ostringstream* oss2 ; 282 SuperClassMap::const_iterator it ; 283 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 284 285 oss2=new ostringstream ; 286 287 *oss2<<"( "<<className<<"_hdl" ; 288 289 for ( it=begin ; it != end; it++) 290 { 291 *oss2<<", "<<it->second->getName()<<"_" ; 292 if (oss2->str().size()>90) 293 { 294 oss<<oss2->str()<<" &"<<iendl ; 295 delete oss2 ; 296 oss2=new ostringstream ; 297 } 298 } 299 *oss2<<" )" ; 300 oss<<oss2->str()<<iendl ; 301 oss<<iendl ; 302 delete oss2 ; 303 304 oss<<"IMPLICIT NONE"<<iendl++ ; 305 oss<<"TYPE(txios("<<className<<")) , INTENT(IN) :: "<<className<<"_hdl"<<iendl ; 306 307 for (it=begin; it != end; it++) 308 { 309 it->second->generateFortranInterfaceGetDeclaration_(oss,className) ; 310 } 311 312 oss<<iendl ; 313 314 for (it=begin; it != end; it++) 315 { 316 it->second->generateFortranInterfaceGetBody_(oss,className) ; 317 oss<<iendl ; 318 } 319 320 oss<<iendl--<<iendl-- ; 321 oss<<"END SUBROUTINE xios(get_"<<className<<"_attr_hdl_)"<<iendl ; 322 323 } 324 278 oss << "SUBROUTINE xios(get_" << className << "_attr_hdl_) &" << iendl++; 279 ostringstream* oss2; 280 SuperClassMap::const_iterator it; 281 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 282 283 oss2 = new ostringstream; 284 285 *oss2 << "( " << className << "_hdl" ; 286 287 for (it = begin; it != end; it++) 288 { 289 *oss2 << ", " << it->second->getName() << "_"; 290 if (oss2->str().size() > 90) 291 { 292 oss << oss2->str() << " &" << iendl; 293 delete oss2; 294 oss2 = new ostringstream; 295 } 296 } 297 *oss2 << " )"; 298 oss << oss2->str() << std::endl; 299 oss << iendl; 300 delete oss2; 301 302 oss << "IMPLICIT NONE" << iendl++; 303 oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl"; 304 305 for (it = begin; it != end; it++) 306 { 307 oss << iendl; 308 it->second->generateFortranInterfaceGetDeclaration_(oss, className); 309 } 310 311 for (it = begin; it != end; it++) 312 { 313 oss << std::endl << iendl; 314 it->second->generateFortranInterfaceGetBody_(oss, className); 315 } 316 317 oss << std::endl << (iendl -= 2); 318 oss << "END SUBROUTINE xios(get_" << className << "_attr_hdl_)" << std::endl; 319 } 325 320 326 321 void CAttributeMap::generateFortranInterfaceIsDefined_hdl_(ostream& oss, const string& className) 327 322 { 328 oss<<"SUBROUTINE xios(is_defined_"<<className<<"_attr_hdl_) &"<<iendl++ ; 329 ostringstream* oss2 ; 330 SuperClassMap::const_iterator it ; 331 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 332 333 oss2=new ostringstream ; 334 335 *oss2<<"( "<<className<<"_hdl" ; 336 337 for ( it=begin ; it != end; it++) 338 { 339 *oss2<<", "<<it->second->getName()<<"_" ; 340 if (oss2->str().size()>90) 341 { 342 oss<<oss2->str()<<" &"<<iendl ; 343 delete oss2 ; 344 oss2=new ostringstream ; 345 } 346 } 347 *oss2<<" )" ; 348 oss<<oss2->str()<<iendl ; 349 oss<<iendl ; 350 delete oss2 ; 351 352 oss<<"IMPLICIT NONE"<<iendl++ ; 353 oss<<"TYPE(txios("<<className<<")) , INTENT(IN) :: "<<className<<"_hdl"<<iendl ; 354 355 for (it=begin; it != end; it++) 356 { 357 it->second->generateFortranInterfaceIsDefinedDeclaration_(oss,className) ; 358 } 359 360 oss<<iendl ; 361 362 for (it=begin; it != end; it++) 363 { 364 it->second->generateFortranInterfaceIsDefinedBody_(oss,className) ; 365 oss<<iendl ; 366 } 367 368 oss<<iendl--<<iendl-- ; 369 oss<<"END SUBROUTINE xios(is_defined_"<<className<<"_attr_hdl_)"<<iendl ; 370 371 } 372 323 oss << "SUBROUTINE xios(is_defined_" << className << "_attr_hdl_) &" << iendl++; 324 ostringstream* oss2; 325 SuperClassMap::const_iterator it; 326 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 327 328 oss2 = new ostringstream; 329 330 *oss2 << "( " << className << "_hdl" ; 331 332 for (it = begin; it != end; it++) 333 { 334 *oss2 << ", " << it->second->getName() << "_"; 335 if (oss2->str().size() > 90) 336 { 337 oss << oss2->str() << " &" << iendl; 338 delete oss2; 339 oss2 = new ostringstream; 340 } 341 } 342 *oss2 << " )"; 343 oss << oss2->str() << std::endl; 344 oss << iendl; 345 delete oss2; 346 347 oss << "IMPLICIT NONE" << iendl++; 348 oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl"; 349 350 for (it = begin; it != end; it++) 351 { 352 oss << iendl; 353 it->second->generateFortranInterfaceIsDefinedDeclaration_(oss, className); 354 } 355 356 for (it = begin; it != end; it++) 357 { 358 oss << std::endl << iendl; 359 it->second->generateFortranInterfaceIsDefinedBody_(oss, className); 360 } 361 362 oss << std::endl << (iendl -= 2); 363 oss << "END SUBROUTINE xios(is_defined_" << className << "_attr_hdl_)" << std::endl; 364 } 373 365 374 366 void CAttributeMap::generateFortranInterface_hdl(ostream& oss, const string& className) 375 367 { 376 oss <<"SUBROUTINE xios(set_"<<className<<"_attr_hdl) &"<<iendl++;377 ostringstream* oss2 378 SuperClassMap::const_iterator it 379 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 380 381 oss2 =new ostringstream;382 *oss2 <<"( "<<className<<"_hdl";383 for ( it=begin; it != end; it++)384 { 385 *oss2 <<", "<<it->second->getName();386 if (oss2->str().size() >90)387 { 388 oss <<oss2->str()<<" &"<<iendl;389 delete oss2 390 oss2 =new ostringstream;391 } 392 } 393 *oss2 <<" )";394 oss <<oss2->str()<<iendl;395 oss <<iendl;396 delete oss2 397 oss2 =new ostringstream;398 399 oss <<"IMPLICIT NONE"<<iendl++;400 oss <<"TYPE(txios("<<className<<")) , INTENT(IN) :: "<<className<<"_hdl"<<iendl;401 402 for (it =begin; it != end; it++)403 { 404 it->second->generateFortranInterfaceDeclaration(oss,className);405 }406 407 oss<<iendl ; 408 409 oss<<"CALL xios(set_"<<className<<"_attr_hdl_) &"<<iendl ; 410 411 *oss2<<"( "<<className<<"_hdl" ; 412 for ( it=begin ; it != end; it++)413 {414 *oss2<<", "<<it->second->getName() ;415 if (oss2->str().size()>90)416 {417 oss<<oss2->str()<<" &"<<iendl ;418 delete oss2;419 oss2=new ostringstream;420 }421 }422 *oss2<<" )" ;423 oss<<oss2->str();424 delete oss2;425 426 oss<<iendl--<<iendl-- ; 427 oss <<"END SUBROUTINE xios(set_"<<className<<"_attr_hdl)"<<iendl;428 }429 368 oss << "SUBROUTINE xios(set_" << className << "_attr_hdl) &" << iendl++; 369 ostringstream* oss2; 370 SuperClassMap::const_iterator it; 371 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 372 373 oss2 = new ostringstream; 374 *oss2 << "( " << className << "_hdl" ; 375 for (it = begin; it != end; it++) 376 { 377 *oss2 << ", " << it->second->getName(); 378 if (oss2->str().size() > 90) 379 { 380 oss << oss2->str() << " &" << iendl; 381 delete oss2; 382 oss2 = new ostringstream; 383 } 384 } 385 *oss2 << " )"; 386 oss << oss2->str() << std::endl; 387 oss << iendl; 388 delete oss2; 389 oss2 = new ostringstream; 390 391 oss << "IMPLICIT NONE" << iendl++; 392 oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl"; 393 394 for (it = begin; it != end; it++) 395 { 396 oss << iendl; 397 it->second->generateFortranInterfaceDeclaration(oss, className); 398 } 399 400 oss << std::endl << iendl; 401 402 oss << "CALL xios(set_" << className << "_attr_hdl_) &" << iendl; 403 404 *oss2 << "( " << className << "_hdl" ; 405 for (it = begin; it != end; it++) 406 { 407 *oss2 << ", " << it->second->getName(); 408 if (oss2->str().size() > 90) 409 { 410 oss << oss2->str() << " &" << iendl; 411 delete oss2; 412 oss2 = new ostringstream; 413 } 414 } 415 *oss2 << " )"; 416 oss << oss2->str(); 417 delete oss2; 418 419 oss << std::endl << (iendl -= 2); 420 oss << "END SUBROUTINE xios(set_" << className << "_attr_hdl)" << std::endl; 421 } 430 422 431 423 void CAttributeMap::generateFortranInterfaceGet_hdl(ostream& oss, const string& className) 432 424 { 433 oss <<"SUBROUTINE xios(get_"<<className<<"_attr_hdl) &"<<iendl++;434 ostringstream* oss2 435 SuperClassMap::const_iterator it 436 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 437 438 oss2 =new ostringstream;439 *oss2 <<"( "<<className<<"_hdl";440 for ( it=begin; it != end; it++)441 { 442 *oss2 <<", "<<it->second->getName();443 if (oss2->str().size() >90)444 { 445 oss <<oss2->str()<<" &"<<iendl;446 delete oss2 447 oss2 =new ostringstream;448 } 449 } 450 *oss2 <<" )";451 oss <<oss2->str()<<iendl;452 oss <<iendl;453 delete oss2 454 oss2 =new ostringstream;455 456 oss <<"IMPLICIT NONE"<<iendl++;457 oss <<"TYPE(txios("<<className<<")) , INTENT(IN) :: "<<className<<"_hdl"<<iendl;458 459 for (it =begin; it != end; it++)460 { 461 it->second->generateFortranInterfaceGetDeclaration(oss,className);462 }463 464 oss<<iendl ; 465 466 oss<<"CALL xios(get_"<<className<<"_attr_hdl_) &"<<iendl ; 467 468 *oss2<<"( "<<className<<"_hdl" ; 469 for ( it=begin ; it != end; it++)470 {471 *oss2<<", "<<it->second->getName() ;472 if (oss2->str().size()>90)473 {474 oss<<oss2->str()<<" &"<<iendl ;475 delete oss2;476 oss2=new ostringstream;477 }478 }479 *oss2<<" )" ;480 oss<<oss2->str();481 delete oss2;482 483 oss<<iendl--<<iendl-- ; 484 oss <<"END SUBROUTINE xios(get_"<<className<<"_attr_hdl)"<<iendl;485 }486 425 oss << "SUBROUTINE xios(get_" << className << "_attr_hdl) &" << iendl++; 426 ostringstream* oss2; 427 SuperClassMap::const_iterator it; 428 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 429 430 oss2 = new ostringstream; 431 *oss2 << "( " << className << "_hdl" ; 432 for (it = begin; it != end; it++) 433 { 434 *oss2 << ", " << it->second->getName(); 435 if (oss2->str().size() > 90) 436 { 437 oss << oss2->str() << " &" << iendl; 438 delete oss2; 439 oss2 = new ostringstream; 440 } 441 } 442 *oss2 << " )"; 443 oss << oss2->str() << std::endl; 444 oss << iendl; 445 delete oss2; 446 oss2 = new ostringstream; 447 448 oss << "IMPLICIT NONE" << iendl++; 449 oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl"; 450 451 for (it = begin; it != end; it++) 452 { 453 oss << iendl; 454 it->second->generateFortranInterfaceGetDeclaration(oss, className); 455 } 456 457 oss << std::endl << iendl; 458 459 oss << "CALL xios(get_" << className << "_attr_hdl_) &" << iendl; 460 461 *oss2 << "( " << className << "_hdl" ; 462 for (it = begin; it != end; it++) 463 { 464 *oss2 << ", " << it->second->getName(); 465 if (oss2->str().size() > 90) 466 { 467 oss << oss2->str() << " &" << iendl; 468 delete oss2; 469 oss2 = new ostringstream; 470 } 471 } 472 *oss2 << " )"; 473 oss << oss2->str(); 474 delete oss2; 475 476 oss << std::endl << (iendl -= 2); 477 oss << "END SUBROUTINE xios(get_" << className << "_attr_hdl)" << std::endl; 478 } 487 479 488 480 void CAttributeMap::generateFortranInterfaceIsDefined_hdl(ostream& oss, const string& className) 489 481 { 490 oss <<"SUBROUTINE xios(is_defined_"<<className<<"_attr_hdl) &"<<iendl++;491 ostringstream* oss2 492 SuperClassMap::const_iterator it 493 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 494 495 oss2 =new ostringstream;496 *oss2 <<"( "<<className<<"_hdl";497 for ( it=begin; it != end; it++)498 { 499 *oss2 <<", "<<it->second->getName();500 if (oss2->str().size() >90)501 { 502 oss <<oss2->str()<<" &"<<iendl;503 delete oss2 504 oss2 =new ostringstream;505 } 506 } 507 *oss2 <<" )";508 oss <<oss2->str()<<iendl;509 oss <<iendl;510 delete oss2 511 oss2 =new ostringstream;512 513 oss <<"IMPLICIT NONE"<<iendl++;514 oss <<"TYPE(txios("<<className<<")) , INTENT(IN) :: "<<className<<"_hdl"<<iendl;515 516 for (it =begin; it != end; it++)517 { 518 it->second->generateFortranInterfaceIsDefinedDeclaration(oss,className);519 }520 521 oss<<iendl ; 522 523 oss<<"CALL xios(is_defined_"<<className<<"_attr_hdl_) &"<<iendl ; 524 525 *oss2<<"( "<<className<<"_hdl" ; 526 for ( it=begin ; it != end; it++)527 {528 *oss2<<", "<<it->second->getName() ;529 if (oss2->str().size()>90)530 {531 oss<<oss2->str()<<" &"<<iendl ;532 delete oss2;533 oss2=new ostringstream;534 }535 }536 *oss2<<" )" ;537 oss<<oss2->str();538 delete oss2;539 540 oss<<iendl--<<iendl-- ; 541 oss <<"END SUBROUTINE xios(is_defined_"<<className<<"_attr_hdl)"<<iendl;542 }543 482 oss << "SUBROUTINE xios(is_defined_" << className << "_attr_hdl) &" << iendl++; 483 ostringstream* oss2; 484 SuperClassMap::const_iterator it; 485 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 486 487 oss2 = new ostringstream; 488 *oss2 << "( " << className << "_hdl" ; 489 for (it = begin; it != end; it++) 490 { 491 *oss2 << ", " << it->second->getName(); 492 if (oss2->str().size() > 90) 493 { 494 oss << oss2->str() << " &" << iendl; 495 delete oss2; 496 oss2 = new ostringstream; 497 } 498 } 499 *oss2 << " )"; 500 oss << oss2->str() << std::endl; 501 oss << iendl; 502 delete oss2; 503 oss2 = new ostringstream; 504 505 oss << "IMPLICIT NONE" << iendl++; 506 oss << "TYPE(txios(" << className << ")) , INTENT(IN) :: " << className << "_hdl"; 507 508 for (it = begin; it != end; it++) 509 { 510 oss << iendl; 511 it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className); 512 } 513 514 oss << std::endl << iendl; 515 516 oss << "CALL xios(is_defined_" << className << "_attr_hdl_) &" << iendl; 517 518 *oss2 << "( " << className << "_hdl" ; 519 for (it = begin; it != end; it++) 520 { 521 *oss2 << ", " << it->second->getName(); 522 if (oss2->str().size() > 90) 523 { 524 oss << oss2->str() << " &" << iendl; 525 delete oss2; 526 oss2 = new ostringstream; 527 } 528 } 529 *oss2 << " )"; 530 oss << oss2->str(); 531 delete oss2; 532 533 oss << std::endl << (iendl -= 2); 534 oss << "END SUBROUTINE xios(is_defined_" << className << "_attr_hdl)" << std::endl; 535 } 544 536 545 537 void CAttributeMap::generateFortranInterface_id(ostream& oss, const string& className) 546 538 { 547 oss <<"SUBROUTINE xios(set_"<<className<<"_attr) &"<<iendl++;548 ostringstream* oss2 549 SuperClassMap::const_iterator it 550 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 551 552 oss2 =new ostringstream;553 *oss2 <<"( "<<className<<"_id";554 for ( it=begin; it != end; it++)555 { 556 *oss2 <<", "<<it->second->getName();557 if (oss2->str().size() >90)558 { 559 oss <<oss2->str()<<" &"<<iendl;560 delete oss2 561 oss2 =new ostringstream;562 } 563 } 564 *oss2 <<" )";565 oss <<oss2->str()<<iendl;566 oss <<iendl;567 delete oss2 568 oss2 =new ostringstream;569 570 oss <<"IMPLICIT NONE"<<iendl++;571 572 oss <<"TYPE(txios("<<className<<")) :: "<<className<<"_hdl"<<iendl;573 oss <<"CHARACTER(LEN=*), INTENT(IN) ::"<<className<<"_id"<<iendl;574 575 for (it =begin; it != end; it++)576 { 577 it->second->generateFortranInterfaceDeclaration(oss,className);578 }579 580 oss<<iendl ; 581 oss <<"CALL xios(get_"<<className<<"_handle)("<<className<<"_id,"<<className<<"_hdl)"<<iendl;582 oss <<"CALL xios(set_"<<className<<"_attr_hdl_) &"<<iendl;583 *oss2<<"( "<<className<<"_hdl";584 for ( it=begin ; it != end; it++)585 {586 *oss2<<", "<<it->second->getName() ;587 if (oss2->str().size()>90)588 {589 oss<<oss2->str()<<" &"<<iendl ;590 delete oss2;591 oss2=new ostringstream;592 }593 }594 *oss2<<" )" ;595 oss<<oss2->str();596 delete oss2;597 598 oss<<iendl--<<iendl-- ; 599 oss <<"END SUBROUTINE xios(set_"<<className<<"_attr)"<<iendl;600 539 oss << "SUBROUTINE xios(set_" << className << "_attr) &" << iendl++; 540 ostringstream* oss2; 541 SuperClassMap::const_iterator it; 542 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 543 544 oss2 = new ostringstream; 545 *oss2 << "( " << className << "_id" ; 546 for (it = begin; it != end; it++) 547 { 548 *oss2 << ", " << it->second->getName(); 549 if (oss2->str().size() > 90) 550 { 551 oss << oss2->str() << " &" << iendl; 552 delete oss2; 553 oss2 = new ostringstream; 554 } 555 } 556 *oss2 << " )"; 557 oss << oss2->str() << std::endl; 558 oss << iendl; 559 delete oss2; 560 oss2 = new ostringstream; 561 562 oss << "IMPLICIT NONE" << iendl++; 563 564 oss << "TYPE(txios(" << className << ")) :: " << className << "_hdl" << iendl; 565 oss << "CHARACTER(LEN=*), INTENT(IN) ::" << className << "_id"; 566 567 for (it = begin; it != end; it++) 568 { 569 oss << iendl; 570 it->second->generateFortranInterfaceDeclaration(oss, className); 571 } 572 573 oss << std::endl << iendl; 574 oss << "CALL xios(get_" << className << "_handle)(" << className << "_id," << className << "_hdl)" << iendl; 575 oss << "CALL xios(set_" << className << "_attr_hdl_) &" << iendl; 576 *oss2 << "( " << className << "_hdl" ; 577 for (it = begin; it != end; it++) 578 { 579 *oss2 << ", " << it->second->getName(); 580 if (oss2->str().size() > 90) 581 { 582 oss << oss2->str() << " &" << iendl; 583 delete oss2; 584 oss2 = new ostringstream; 585 } 586 } 587 *oss2 << " )"; 588 oss << oss2->str(); 589 delete oss2; 590 591 oss << std::endl << (iendl -= 2); 592 oss << "END SUBROUTINE xios(set_" << className << "_attr)" << std::endl; 601 593 } 602 594 603 595 void CAttributeMap::generateFortranInterfaceGet_id(ostream& oss, const string& className) 604 596 { 605 oss <<"SUBROUTINE xios(get_"<<className<<"_attr) &"<<iendl++;606 ostringstream* oss2 607 SuperClassMap::const_iterator it 608 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 609 610 oss2 =new ostringstream;611 *oss2 <<"( "<<className<<"_id";612 for ( it=begin; it != end; it++)613 { 614 *oss2 <<", "<<it->second->getName();615 if (oss2->str().size() >90)616 { 617 oss <<oss2->str()<<" &"<<iendl;618 delete oss2 619 oss2 =new ostringstream;620 } 621 } 622 *oss2 <<" )";623 oss <<oss2->str()<<iendl;624 oss <<iendl;625 delete oss2 626 oss2 =new ostringstream;627 628 oss <<"IMPLICIT NONE"<<iendl++;629 630 oss <<"TYPE(txios("<<className<<")) :: "<<className<<"_hdl"<<iendl;631 oss <<"CHARACTER(LEN=*), INTENT(IN) ::"<<className<<"_id"<<iendl;632 633 for (it =begin; it != end; it++)634 { 635 it->second->generateFortranInterfaceGetDeclaration(oss,className);636 }637 638 oss<<iendl ; 639 oss <<"CALL xios(get_"<<className<<"_handle)("<<className<<"_id,"<<className<<"_hdl)"<<iendl;640 oss <<"CALL xios(get_"<<className<<"_attr_hdl_) &"<<iendl;641 *oss2<<"( "<<className<<"_hdl";642 for ( it=begin ; it != end; it++)643 {644 *oss2<<", "<<it->second->getName() ;645 if (oss2->str().size()>90)646 {647 oss<<oss2->str()<<" &"<<iendl ;648 delete oss2;649 oss2=new ostringstream;650 }651 }652 *oss2<<" )" ;653 oss<<oss2->str();654 delete oss2;655 656 oss<<iendl--<<iendl-- ; 657 oss <<"END SUBROUTINE xios(get_"<<className<<"_attr)"<<iendl;658 597 oss << "SUBROUTINE xios(get_" << className << "_attr) &" << iendl++; 598 ostringstream* oss2; 599 SuperClassMap::const_iterator it; 600 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 601 602 oss2 = new ostringstream; 603 *oss2 << "( " << className << "_id" ; 604 for (it = begin; it != end; it++) 605 { 606 *oss2 << ", " << it->second->getName(); 607 if (oss2->str().size() > 90) 608 { 609 oss << oss2->str() << " &" << iendl; 610 delete oss2; 611 oss2 = new ostringstream; 612 } 613 } 614 *oss2 << " )"; 615 oss << oss2->str() << std::endl; 616 oss << iendl; 617 delete oss2; 618 oss2 = new ostringstream; 619 620 oss << "IMPLICIT NONE" << iendl++; 621 622 oss << "TYPE(txios(" << className << ")) :: " << className << "_hdl" << iendl; 623 oss << "CHARACTER(LEN=*), INTENT(IN) ::" << className << "_id"; 624 625 for (it = begin; it != end; it++) 626 { 627 oss << iendl; 628 it->second->generateFortranInterfaceGetDeclaration(oss, className); 629 } 630 631 oss << std::endl << iendl; 632 oss << "CALL xios(get_" << className << "_handle)(" << className << "_id," << className << "_hdl)" << iendl; 633 oss << "CALL xios(get_" << className << "_attr_hdl_) &" << iendl; 634 *oss2 << "( " << className << "_hdl" ; 635 for (it = begin; it != end; it++) 636 { 637 *oss2 << ", " << it->second->getName(); 638 if (oss2->str().size() > 90) 639 { 640 oss << oss2->str() << " &" << iendl; 641 delete oss2; 642 oss2 = new ostringstream; 643 } 644 } 645 *oss2 << " )"; 646 oss << oss2->str(); 647 delete oss2; 648 649 oss << std::endl << (iendl -= 2); 650 oss << "END SUBROUTINE xios(get_" << className << "_attr)" << std::endl; 659 651 } 660 652 661 653 void CAttributeMap::generateFortranInterfaceIsDefined_id(ostream& oss, const string& className) 662 654 { 663 oss<<"SUBROUTINE xios(is_defined_"<<className<<"_attr) &"<<iendl++ ; 664 ostringstream* oss2 ; 665 SuperClassMap::const_iterator it ; 666 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 667 668 oss2=new ostringstream ; 669 *oss2<<"( "<<className<<"_id" ; 670 for ( it=begin ; it != end; it++) 671 { 672 *oss2<<", "<<it->second->getName() ; 673 if (oss2->str().size()>90) 674 { 675 oss<<oss2->str()<<" &"<<iendl ; 676 delete oss2 ; 677 oss2=new ostringstream ; 678 } 679 } 680 *oss2<<" )" ; 681 oss<<oss2->str()<<iendl ; 682 oss<<iendl ; 683 delete oss2 ; 684 oss2=new ostringstream ; 685 686 oss<<"IMPLICIT NONE"<<iendl++ ; 687 688 oss<<"TYPE(txios("<<className<<")) :: "<<className<<"_hdl"<<iendl ; 689 oss<<"CHARACTER(LEN=*), INTENT(IN) ::"<<className<<"_id"<<iendl ; 690 691 for (it=begin; it != end; it++) 692 { 693 it->second->generateFortranInterfaceIsDefinedDeclaration(oss,className) ; 694 } 695 696 oss<<iendl ; 697 oss<<"CALL xios(get_"<<className<<"_handle)("<<className<<"_id,"<<className<<"_hdl)"<<iendl ; 698 oss<<"CALL xios(is_defined_"<<className<<"_attr_hdl_) &"<<iendl ; 699 *oss2<<"( "<<className<<"_hdl" ; 700 for ( it=begin ; it != end; it++) 701 { 702 *oss2<<", "<<it->second->getName() ; 703 if (oss2->str().size()>90) 704 { 705 oss<<oss2->str()<<" &"<<iendl ; 706 delete oss2 ; 707 oss2=new ostringstream ; 708 } 709 } 710 *oss2<<" )" ; 711 oss<<oss2->str() ; 712 delete oss2 ; 713 714 oss<<iendl--<<iendl-- ; 715 oss<<"END SUBROUTINE xios(is_defined_"<<className<<"_attr)"<<iendl ; 716 717 } 718 ///-------------------------------------------------------------- 719 720 655 oss << "SUBROUTINE xios(is_defined_" << className << "_attr) &" << iendl++; 656 ostringstream* oss2; 657 SuperClassMap::const_iterator it; 658 SuperClassMap::const_iterator begin = SuperClassMap::begin(), end = SuperClassMap::end(); 659 660 oss2 = new ostringstream; 661 *oss2 << "( " << className << "_id" ; 662 for (it = begin; it != end; it++) 663 { 664 *oss2 << ", " << it->second->getName(); 665 if (oss2->str().size() > 90) 666 { 667 oss << oss2->str() << " &" << iendl; 668 delete oss2; 669 oss2 = new ostringstream; 670 } 671 } 672 *oss2 << " )"; 673 oss << oss2->str() << std::endl; 674 oss << iendl; 675 delete oss2; 676 oss2 = new ostringstream; 677 678 oss << "IMPLICIT NONE" << iendl++; 679 680 oss << "TYPE(txios(" << className << ")) :: " << className << "_hdl" << iendl; 681 oss << "CHARACTER(LEN=*), INTENT(IN) ::" << className << "_id"; 682 683 for (it = begin; it != end; it++) 684 { 685 oss << iendl; 686 it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className); 687 } 688 689 oss << std::endl << iendl; 690 oss << "CALL xios(get_" << className << "_handle)(" << className << "_id," << className << "_hdl)" << iendl; 691 oss << "CALL xios(is_defined_" << className << "_attr_hdl_) &" << iendl; 692 *oss2 << "( " << className << "_hdl" ; 693 for (it = begin; it != end; it++) 694 { 695 *oss2 << ", " << it->second->getName(); 696 if (oss2->str().size() > 90) 697 { 698 oss << oss2->str() << " &" << iendl; 699 delete oss2; 700 oss2 = new ostringstream; 701 } 702 } 703 *oss2 << " )"; 704 oss << oss2->str(); 705 delete oss2; 706 707 oss << std::endl << (iendl -= 2); 708 oss << "END SUBROUTINE xios(is_defined_" << className << "_attr)" << std::endl; 709 } 721 710 } // namespace xmlioser -
XIOS/trunk/src/generate_interface_impl.hpp
r556 r581 12 12 namespace xios 13 13 { 14 template<> string CInterface::getStrFortranType<int>(void) { return string("INTEGER") ;}15 template<> string CInterface::getStrFortranType<bool>(void) { return string("LOGICAL") ;}16 template<> string CInterface::getStrFortranType<double>(void) { return string("REAL") ;}17 template<> string CInterface::getStrFortranType<float>(void) { return string("REAL") ;}18 template<> string CInterface::getStrFortranType<CDate>(void) { return string("TYPE(txios(date))") ;}19 template<> string CInterface::getStrFortranType<CDuration>(void) { return string("TYPE(txios(duration))") ;}20 21 template<> string CInterface::getStrFortranKind<int>(void) { return string("") ;}22 template<> string CInterface::getStrFortranKind<bool>(void) { return string("") ;}23 template<> string CInterface::getStrFortranKind<double>(void) { return string("(KIND=8)") ;}24 template<> string CInterface::getStrFortranKind<float>(void) { return string("(KIND=4)") ;}25 template<> string CInterface::getStrFortranKind<CDate>(void) { return string("") ;}26 template<> string CInterface::getStrFortranKind<CDuration>(void) { return string("") ;}27 28 template<> string CInterface::getStrFortranKindC<int>(void) { return string("(KIND=C_INT)") ;}29 template<> string CInterface::getStrFortranKindC<bool>(void) { return string("(KIND=C_BOOL)") ;}30 template<> string CInterface::getStrFortranKindC<double>(void) { return string("(KIND=C_DOUBLE)") ;}31 template<> string CInterface::getStrFortranKindC<float>(void) { return string("(KIND=C_FLOAT)") ;}32 template<> string CInterface::getStrFortranKindC<CDate>(void) { return string("") ;}33 template<> string CInterface::getStrFortranKindC<CDuration>(void) { return string("") ;}34 35 template<> bool CInterface::matchingTypeCFortran<int>(void) { return true 36 template<> bool CInterface::matchingTypeCFortran<bool>(void) { return false ;}14 template<> string CInterface::getStrFortranType<int>(void) { return string("INTEGER"); } 15 template<> string CInterface::getStrFortranType<bool>(void) { return string("LOGICAL"); } 16 template<> string CInterface::getStrFortranType<double>(void) { return string("REAL"); } 17 template<> string CInterface::getStrFortranType<float>(void) { return string("REAL"); } 18 template<> string CInterface::getStrFortranType<CDate>(void) { return string("TYPE(txios(date))"); } 19 template<> string CInterface::getStrFortranType<CDuration>(void) { return string("TYPE(txios(duration))"); } 20 21 template<> string CInterface::getStrFortranKind<int>(void) { return string(""); } 22 template<> string CInterface::getStrFortranKind<bool>(void) { return string(""); } 23 template<> string CInterface::getStrFortranKind<double>(void) { return string("(KIND=8)"); } 24 template<> string CInterface::getStrFortranKind<float>(void) { return string("(KIND=4)"); } 25 template<> string CInterface::getStrFortranKind<CDate>(void) { return string(""); } 26 template<> string CInterface::getStrFortranKind<CDuration>(void) { return string(""); } 27 28 template<> string CInterface::getStrFortranKindC<int>(void) { return string("(KIND=C_INT)"); } 29 template<> string CInterface::getStrFortranKindC<bool>(void) { return string("(KIND=C_BOOL)"); } 30 template<> string CInterface::getStrFortranKindC<double>(void) { return string("(KIND=C_DOUBLE)"); } 31 template<> string CInterface::getStrFortranKindC<float>(void) { return string("(KIND=C_FLOAT)"); } 32 template<> string CInterface::getStrFortranKindC<CDate>(void) { return string(""); } 33 template<> string CInterface::getStrFortranKindC<CDuration>(void) { return string(""); } 34 35 template<> bool CInterface::matchingTypeCFortran<int>(void) { return true; } 36 template<> bool CInterface::matchingTypeCFortran<bool>(void) { return false; } 37 37 template<> bool CInterface::matchingTypeCFortran<double>(void) { return true; } 38 38 template<> bool CInterface::matchingTypeCFortran<float>(void) { return true; } … … 40 40 template<> bool CInterface::matchingTypeCFortran<CDuration>(void) { return true; } 41 41 42 43 42 // ///////////////////////////////////////////////// 44 43 // // C Interface // 45 44 // ///////////////////////////////////////////////// 46 45 47 48 void CInterface::AttributeIsDefinedCInterface(ostream& oss, const string& className,const string& name) 46 void CInterface::AttributeIsDefinedCInterface(ostream& oss, const string& className, const string& name) 49 47 { 50 oss <<"bool cxios_is_defined_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl )"<<iendl;51 oss <<"{"<<iendl;52 oss <<" CTimer::get(\"XIOS\").resume();"<<iendl;53 oss <<" return "<<className<<"_hdl->"<<name<<".hasInheritedValue();"<<iendl;54 oss <<" CTimer::get(\"XIOS\").suspend();"<<iendl;55 oss <<"}"<<iendl;56 oss <<iendl;48 oss << "bool cxios_is_defined_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl)" << iendl; 49 oss << "{" << iendl; 50 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 51 oss << " bool isDefined = " << className << "_hdl->" << name << ".hasInheritedValue();" << iendl; 52 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 53 oss << " return isDefined;" << iendl; 54 oss << "}" << std::endl; 57 55 } 58 56 59 57 template <class T> 60 void CInterface::AttributeCInterface(ostream& oss, const string& className, const string& name)58 void CInterface::AttributeCInterface(ostream& oss, const string& className, const string& name) 61 59 { 62 string typeName=getStrType<T>() ; 63 64 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<" "<<name<<")"<<iendl ; 65 oss<<"{"<<iendl ; 66 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 67 oss<<" "<<className<<"_hdl->"<<name<<".setValue("<<name<<");"<<iendl ; 68 // oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ; 69 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 70 oss<<"}"<<iendl ; 71 72 oss<<iendl ; 73 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<")"<<iendl ; 74 oss<<"{"<<iendl; 75 oss<<" *"<<name<<" = "<<className<<"_hdl->"<<name<<".getInheritedValue();"<<iendl ; 76 oss<<"}"<<iendl ; 77 oss<<iendl ; 60 string typeName = getStrType<T>(); 61 62 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << " " << name << ")" << iendl; 63 oss << "{" << iendl; 64 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 65 oss << " " << className << "_hdl->" << name << ".setValue(" << name << ");" << iendl; 66 // oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl; 67 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 68 oss << "}" << std::endl; 69 70 oss << iendl; 71 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ")" << iendl; 72 oss << "{" << iendl; 73 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 74 oss << " *" << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl; 75 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 76 oss << "}" << std::endl; 78 77 } 79 78 80 81 79 template<> 82 void CInterface::AttributeCInterface<string>(ostream& oss, const string& className, const string& name)80 void CInterface::AttributeCInterface<string>(ostream& oss, const string& className, const string& name) 83 81 { 84 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, const char * "<<name<<", int "<<name<<"_size)"<<iendl ; 85 oss<<"{"<<iendl ; 86 oss<<" std::string "<<name<<"_str;"<<iendl; 87 oss<<" if(!cstr2string("<<name<<", "<<name<<"_size, "<<name<<"_str)) return;"<<iendl ; 88 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 89 oss<<" "<<className<<"_hdl->"<<name<<".setValue("<<name<<"_str);"<<iendl ; 90 // oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ; 91 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 92 oss<<"}"<<iendl ; 93 94 oss<<iendl ; 95 96 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, char * "<<name<<", int "<<name<<"_size)"<<iendl ; 97 oss<<"{"<<iendl ; 98 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 99 oss<<" if(!string_copy("<<className<<"_hdl->"<<name<<".getInheritedValue(),"<<name<<" , "<<name<<"_size))"<<iendl ; 100 oss<<" ERROR(\"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, char * "<<name<<", int " 101 <<name<<"_size)\", <<\"Input string is to short\");"<<iendl ; 102 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 103 oss<<"}"<<iendl ; 104 oss<<iendl ; 105 82 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, const char * " << name << ", int " << name << "_size)" << iendl; 83 oss << "{" << iendl; 84 oss << " std::string " << name << "_str;" << iendl; 85 oss << " if (!cstr2string(" << name << ", " << name << "_size, " << name << "_str)) return;" << iendl; 86 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 87 oss << " " << className << "_hdl->" << name << ".setValue(" << name << "_str);" << iendl; 88 // oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl; 89 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 90 oss << "}" << std::endl; 91 92 oss << iendl; 93 94 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int " << name << "_size)" << iendl; 95 oss << "{" << iendl; 96 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 97 oss << " if (!string_copy(" << className << "_hdl->" << name << ".getInheritedValue(), " << name << ", " << name << "_size))" << iendl; 98 oss << " ERROR(\"void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int " 99 << name << "_size)\", << \"Input string is too short\");" << iendl; 100 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 101 oss << "}" << std::endl; 106 102 } 107 103 108 104 template<> 109 void CInterface::AttributeCInterface<CEnumBase>(ostream& oss, const string& className, const string& name)105 void CInterface::AttributeCInterface<CEnumBase>(ostream& oss, const string& className, const string& name) 110 106 { 111 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, const char * "<<name<<", int "<<name<<"_size)"<<iendl ; 112 oss<<"{"<<iendl ; 113 oss<<" std::string "<<name<<"_str;"<<iendl; 114 oss<<" if(!cstr2string("<<name<<", "<<name<<"_size, "<<name<<"_str)) return;"<<iendl ; 115 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 116 oss<<" "<<className<<"_hdl->"<<name<<".fromString("<<name<<"_str);"<<iendl ; 117 // oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ; 118 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 119 oss<<"}"<<iendl ; 120 121 oss<<iendl ; 122 123 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, char * "<<name<<", int "<<name<<"_size)"<<iendl ; 124 oss<<"{"<<iendl ; 125 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; 126 oss<<" if(!string_copy("<<className<<"_hdl->"<<name<<".getInheritedStringValue(),"<<name<<" , "<<name<<"_size))"<<iendl ; 127 oss<<" ERROR(\"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, char * "<<name<<", int " 128 <<name<<"_size)\", <<\"Input string is to short\");"<<iendl ; 129 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ; 130 oss<<"}"<<iendl ; 131 oss<<iendl ; 132 107 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, const char * " << name << ", int " << name << "_size)" << iendl; 108 oss << "{" << iendl; 109 oss << " std::string " << name << "_str;" << iendl; 110 oss << " if (!cstr2string(" << name << ", " << name << "_size, " << name << "_str)) return;" << iendl; 111 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 112 oss << " " << className << "_hdl->" << name << ".fromString(" << name << "_str);" << iendl; 113 // oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl; 114 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 115 oss << "}" << std::endl; 116 117 oss << iendl; 118 119 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int " << name << "_size)" << iendl; 120 oss << "{" << iendl; 121 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 122 oss << " if (!string_copy(" << className << "_hdl->" << name << ".getInheritedStringValue(), " << name << ", " << name << "_size))" << iendl; 123 oss << " ERROR(\"void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, char * " << name << ", int " 124 << name << "_size)\", << \"Input string is too short\");" << iendl; 125 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 126 oss << "}" << std::endl; 133 127 } 134 // if (!array_copy(domain_hdl->mask.getValue(), mask, extent1, extent2))135 // ERROR("cxios_get_domain_mask(XDomainPtr domain_hdl, bool * mask, int extent1, int extent2)",<<"Output array size is not conform to array size attribut") ;136 128 137 129 template<> 138 void CInterface::AttributeCInterface<CDate>(ostream& oss, const string& className, const string& name)130 void CInterface::AttributeCInterface<CDate>(ostream& oss, const string& className, const string& name) 139 131 { 140 132 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, cxios_date " << name << "_c)" << iendl; … … 142 134 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 143 135 oss << " " << className << "_hdl->" << name << ".allocate();" << iendl; 144 oss << " CDate& " << name << " = " << className << "_hdl->" << name << ".get();" << iendl;136 oss << " CDate& " << name << " = " << className << "_hdl->" << name << ".get();" << iendl; 145 137 oss << " " << name << ".setDate(" << name << "_c.year," << iendl; 146 138 oss << " " << name << "_c.month," << iendl; … … 152 144 oss << " " << name << ".checkDate();" << iendl; 153 145 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 154 oss << "}" << iendl;146 oss << "}" << std::endl; 155 147 156 148 oss << iendl; … … 159 151 oss << "{" << iendl; 160 152 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 161 oss << " CDate " << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl;153 oss << " CDate " << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl; 162 154 oss << " " << name << "_c->year = " << name << ".getYear();" << iendl; 163 155 oss << " " << name << "_c->month = " << name << ".getMonth();" << iendl; … … 167 159 oss << " " << name << "_c->second = " << name << ".getSecond();" << iendl; 168 160 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 169 oss << "}" << iendl; 170 oss << iendl; 161 oss << "}" << std::endl; 171 162 } 172 163 173 164 template<> 174 void CInterface::AttributeCInterface<CDuration>(ostream& oss, const string& className, const string& name)165 void CInterface::AttributeCInterface<CDuration>(ostream& oss, const string& className, const string& name) 175 166 { 176 167 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, cxios_duration " << name << "_c)" << iendl; … … 178 169 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 179 170 oss << " " << className << "_hdl->" << name << ".allocate();" << iendl; 180 oss << " CDuration& " << name << " = " << className << "_hdl->" << name << ".get();" << iendl;171 oss << " CDuration& " << name << " = " << className << "_hdl->" << name << ".get();" << iendl; 181 172 oss << " " << name << ".year = " << name << "_c.year;" << iendl; 182 173 oss << " " << name << ".month = " << name << "_c.month;" << iendl; … … 187 178 oss << " " << name << ".timestep = " << name << "_c.timestep;" << iendl; 188 179 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 189 oss << "}" << iendl;180 oss << "}" << std::endl; 190 181 191 182 oss << iendl; … … 194 185 oss << "{" << iendl; 195 186 oss << " CTimer::get(\"XIOS\").resume();" << iendl; 196 oss << " CDuration " << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl;187 oss << " CDuration " << name << " = " << className << "_hdl->" << name << ".getInheritedValue();" << iendl; 197 188 oss << " " << name << "_c->year = " << name << ".year;" << iendl; 198 189 oss << " " << name << "_c->month = " << name << ".month;" << iendl; … … 203 194 oss << " " << name << "_c->timestep = " << name << ".timestep;" << iendl; 204 195 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; 205 oss << "}" << iendl; 206 oss << iendl; 196 oss << "}" << std::endl; 207 197 } 208 198 209 199 /* 210 200 #define macro(T) \ 211 template <> \212 void CInterface::AttributeCInterface<ARRAY(T,1)>(ostream& oss, const string& className, const string& name)\213 { \214 string typeName=getStrType<T>() ;\201 template <> \ 202 void CInterface::AttributeCInterface<ARRAY(T,1)>(ostream& oss, const string& className, const string& name) \ 203 { \ 204 string typeName=getStrType<T>(); \ 215 205 \ 216 oss <<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1)"<<iendl ;\217 oss <<"{"<<iendl ;\218 oss <<" CTimer::get(\"XIOS\").resume();"<<iendl; \219 oss <<" ARRAY("<<typeName<<",1) array_tmp(new CArray<"<<typeName<<",1>(boost::extents[extent1]));"<<iendl ;\220 oss <<" std::copy("<<name<<", &("<<name<<"[array_tmp->num_elements()]), array_tmp->data());"<<iendl ;\221 oss <<" "<<className<<"_hdl->"<<name<<".setValue(array_tmp);"<<iendl ;\222 // oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;\223 oss <<"}"<<iendl ;\224 oss <<iendl; \225 oss <<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1)"<<iendl ;\226 oss <<"{"<<iendl; \227 oss <<" if (!array_copy("<<className<<"_hdl->"<<name<<".getValue(), "<<name<<", extent1))"<<iendl; \228 oss <<" ERROR(\"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1)\",<<" \229 << "\"Output array size is not conform to array size attribute\") ;"<<iendl; \230 oss <<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\231 oss <<"}"<<iendl ;\232 } \206 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1)" << iendl; \ 207 oss << "{" << iendl; \ 208 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 209 oss << " ARRAY(" << typeName << ",1) array_tmp(new CArray<" << typeName << ",1>(boost::extents[extent1]));" << iendl; \ 210 oss << " std::copy(" << name << ", &(" << name << "[array_tmp->num_elements()]), array_tmp->data());" << iendl; \ 211 oss << " " << className << "_hdl->" << name << ".setValue(array_tmp);" << iendl; \ 212 // oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl; \ 213 oss << "}" << std::endl; \ 214 oss << iendl; \ 215 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1)" << iendl; \ 216 oss << "{" << iendl; \ 217 oss << " if (!array_copy(" << className << "_hdl->" << name << ".getValue(), " << name << ", extent1))" << iendl; \ 218 oss << " ERROR(\"void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1)\", << " \ 219 << "\"Output array size is not conform to array size attribute\");" << iendl; \ 220 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 221 oss << "}" << std::endl; \ 222 } \ 233 223 \ 234 224 template <> \ 235 void CInterface::AttributeCInterface<ARRAY(T,2)>(ostream& oss, const string& className, const string& name)\236 { \237 string typeName=getStrType<T>() ;\225 void CInterface::AttributeCInterface<ARRAY(T,2)>(ostream& oss, const string& className, const string& name) \ 226 { \ 227 string typeName=getStrType<T>(); \ 238 228 \ 239 oss <<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2)"<<iendl ;\240 oss <<"{"<<iendl ;\241 oss <<" CTimer::get(\"XIOS\").resume();"<<iendl; \242 oss <<" ARRAY("<<typeName<<",2) array_tmp(new CArray<"<<typeName<<",2>(boost::extents[extent1][extent2]));"<<iendl ;\243 oss <<" std::copy("<<name<<", &("<<name<<"[array_tmp->num_elements()]), array_tmp->data());"<<iendl ;\244 oss <<" "<<className<<"_hdl->"<<name<<".setValue(array_tmp);"<<iendl ;\245 // oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;\246 oss <<"}"<<iendl ;\247 oss <<iendl; \248 oss <<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2)"<<iendl ;\249 oss <<"{"<<iendl; \250 oss <<" if (!array_copy("<<className<<"_hdl->"<<name<<".getValue(), "<<name<<", extent1, extent2))"<<iendl; \251 oss <<" ERROR(\"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2)\",<<" \252 << "\"Output array size is not conform to array size attribute\") ;"<<iendl; \253 oss <<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\254 oss <<"}"<<iendl ;\255 } \229 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2)" << iendl; \ 230 oss << "{" << iendl; \ 231 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 232 oss << " ARRAY(" << typeName << ",2) array_tmp(new CArray<" << typeName << ",2>(boost::extents[extent1][extent2]));" << iendl; \ 233 oss << " std::copy(" << name << ", &(" << name << "[array_tmp->num_elements()]), array_tmp->data());" << iendl; \ 234 oss << " " << className << "_hdl->" << name << ".setValue(array_tmp);" << iendl; \ 235 // oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl; \ 236 oss << "}" << std::endl; \ 237 oss << iendl; \ 238 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2)" << iendl; \ 239 oss << "{" << iendl; \ 240 oss << " if (!array_copy(" << className << "_hdl->" << name << ".getValue(), " << name << ", extent1, extent2))" << iendl; \ 241 oss << " ERROR(\"void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2)\", << " \ 242 << "\"Output array size is not conform to array size attribute\");" << iendl; \ 243 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 244 oss << "}" << std::endl; \ 245 } \ 256 246 \ 257 template <> \258 void CInterface::AttributeCInterface<ARRAY(T,3)>(ostream& oss, const string& className, const string& name)\259 { \260 string typeName=getStrType<T>() ;\247 template <> \ 248 void CInterface::AttributeCInterface<ARRAY(T,3)>(ostream& oss, const string& className, const string& name) \ 249 { \ 250 string typeName=getStrType<T>(); \ 261 251 \ 262 oss <<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)"<<iendl ;\263 oss <<"{"<<iendl ;\264 oss <<" CTimer::get(\"XIOS\").resume();"<<iendl; \265 oss <<" ARRAY("<<typeName<<",3) array_tmp(new CArray<"<<typeName<<",3>(boost::extents[extent1][extent2][extent3]));"<<iendl ;\266 oss <<" std::copy("<<name<<", &("<<name<<"[array_tmp->num_elements()]), array_tmp->data());"<<iendl ;\267 oss <<" "<<className<<"_hdl->"<<name<<".setValue(array_tmp);"<<iendl ;\268 // oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;\269 oss <<"}"<<iendl ;\270 oss <<iendl; \271 oss <<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)"<<iendl ;\272 oss <<"{"<<iendl; \273 oss <<" if (!array_copy("<<className<<"_hdl->"<<name<<".getValue(), "<<name<<", extent1))"<<iendl; \274 oss <<" ERROR(\"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)\",<<" \275 << "\"Output array size is not conform to array size attribute\") ;"<<iendl; \276 oss <<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\277 oss <<"}"<<iendl ;\252 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2, int extent3)" << iendl; \ 253 oss << "{" << iendl; \ 254 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 255 oss << " ARRAY(" << typeName << ",3) array_tmp(new CArray<" << typeName << ",3>(boost::extents[extent1][extent2][extent3]));" << iendl; \ 256 oss << " std::copy(" << name << ", &(" << name << "[array_tmp->num_elements()]), array_tmp->data());" << iendl; \ 257 oss << " " << className << "_hdl->" << name << ".setValue(array_tmp);" << iendl; \ 258 // oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl; \ 259 oss << "}" << std::endl; \ 260 oss << iendl; \ 261 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2, int extent3)" << iendl; \ 262 oss << "{" << iendl; \ 263 oss << " if (!array_copy(" << className << "_hdl->" << name << ".getValue(), " << name << ", extent1))" << iendl; \ 264 oss << " ERROR(\"void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2, int extent3)\", << " \ 265 << "\"Output array size is not conform to array size attribute\");" << iendl; \ 266 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 267 oss << "}" << std::endl; \ 278 268 } 279 269 … … 288 278 // // Fortran 2003 Interface // 289 279 // ///////////////////////////////////////////////// 290 void CInterface::AttributeIsDefinedFortran2003Interface(ostream& oss, const string& className,const string& name)291 { 292 oss <<"FUNCTION cxios_is_defined_"<<className<<"_"<<name<<"("<<className<<"_hdl ) BIND(C)"<<iendl;293 oss <<" USE ISO_C_BINDING"<<iendl;294 oss <<" LOGICAL(kind=C_BOOL) :: cxios_is_defined_"<<className<<"_"<<name<<iendl;295 oss <<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl;296 oss <<"END FUNCTION cxios_is_defined_"<<className<<"_"<<name<<iendl;280 void CInterface::AttributeIsDefinedFortran2003Interface(ostream& oss, const string& className, const string& name) 281 { 282 oss << "FUNCTION cxios_is_defined_" << className << "_" << name << "(" << className << "_hdl) BIND(C)" << iendl; 283 oss << " USE ISO_C_BINDING" << iendl; 284 oss << " LOGICAL(kind=C_BOOL) :: cxios_is_defined_" << className << "_" << name << iendl; 285 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 286 oss << "END FUNCTION cxios_is_defined_" << className << "_" << name << std::endl; 297 287 } 298 288 299 289 template <class T> 300 void CInterface::AttributeFortran2003Interface(ostream& oss,const string& className,const string& name) 301 { 302 string fortranType=getStrFortranType<T>() ; 303 string fortranKindC=getStrFortranKindC<T>() ; 304 305 oss<<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<") BIND(C)"<<iendl ; 306 oss<<" USE ISO_C_BINDING"<<iendl ; 307 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; 308 oss<<" "<<fortranType<<" "<<fortranKindC<<" , VALUE :: "<<name<<iendl ; 309 oss<<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl ; 310 oss<<iendl ; 311 oss<<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<") BIND(C)"<<iendl ; 312 oss<<" USE ISO_C_BINDING"<<iendl ; 313 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; 314 oss<<" "<<fortranType<<" "<<fortranKindC<<" :: "<<name<<iendl ; 315 oss<<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl ; 316 oss<<iendl ; 317 } 318 290 void CInterface::AttributeFortran2003Interface(ostream& oss, const string& className, const string& name) 291 { 292 string fortranType=getStrFortranType<T>(); 293 string fortranKindC=getStrFortranKindC<T>(); 294 295 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl; 296 oss << " USE ISO_C_BINDING" << iendl; 297 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 298 oss << " " << fortranType << " " << fortranKindC << " , VALUE :: " << name << iendl; 299 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; 300 oss << iendl; 301 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl; 302 oss << " USE ISO_C_BINDING" << iendl; 303 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 304 oss << " " << fortranType << " " << fortranKindC << " :: " << name << iendl; 305 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; 306 } 319 307 320 308 template <> 321 void CInterface::AttributeFortran2003Interface<string>(ostream& oss,const string& className,const string& name) 322 { 323 324 oss<<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", "<<name<<"_size) BIND(C)"<<iendl ; 325 oss<<" USE ISO_C_BINDING"<<iendl ; 326 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; 327 oss<<" CHARACTER(kind = C_CHAR) , DIMENSION(*) :: "<<name<<iendl ; 328 oss<<" INTEGER (kind = C_INT) , VALUE :: "<<name<<"_size"<<iendl ; 329 oss<<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl ; 330 oss<<iendl ; 331 oss<<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", "<<name<<"_size) BIND(C)"<<iendl ; 332 oss<<" USE ISO_C_BINDING"<<iendl ; 333 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; 334 oss<<" CHARACTER(kind = C_CHAR) , DIMENSION(*) :: "<<name<<iendl ; 335 oss<<" INTEGER (kind = C_INT) , VALUE :: "<<name<<"_size"<<iendl ; 336 oss<<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl ; 337 oss<<iendl ; 309 void CInterface::AttributeFortran2003Interface<string>(ostream& oss, const string& className, const string& name) 310 { 311 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", " << name << "_size) BIND(C)" << iendl; 312 oss << " USE ISO_C_BINDING" << iendl; 313 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 314 oss << " CHARACTER(kind = C_CHAR) , DIMENSION(*) :: " << name << iendl; 315 oss << " INTEGER (kind = C_INT) , VALUE :: " << name << "_size" << iendl; 316 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; 317 oss << iendl; 318 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", " << name << "_size) BIND(C)" << iendl; 319 oss << " USE ISO_C_BINDING" << iendl; 320 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 321 oss << " CHARACTER(kind = C_CHAR) , DIMENSION(*) :: " << name << iendl; 322 oss << " INTEGER (kind = C_INT) , VALUE :: " << name << "_size" << iendl; 323 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; 338 324 } 339 325 … … 346 332 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 347 333 oss << " TYPE(txios(date)), VALUE :: " << name << iendl; 348 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << iendl;334 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; 349 335 oss << iendl; 350 336 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl; … … 353 339 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 354 340 oss << " TYPE(txios(date)) :: " << name << iendl; 355 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << iendl; 356 oss << iendl; 341 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; 357 342 } 358 343 … … 365 350 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 366 351 oss << " TYPE(txios(duration)), VALUE :: " << name << iendl; 367 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << iendl;352 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; 368 353 oss << iendl; 369 354 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ") BIND(C)" << iendl; … … 372 357 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; 373 358 oss << " TYPE(txios(duration)) :: " << name << iendl; 374 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << iendl; 375 oss << iendl; 359 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; 376 360 } 377 361 378 362 /* 379 #define macro(T) \380 template <> \381 void CInterface::AttributeFortran2003Interface<ARRAY(T,1)>(ostream& oss, const string& className,const string& name) \382 { \ 383 string fortranType=getStrFortranType<T>() 384 string fortranKindC=getStrFortranKindC<T>() 385 \ 386 oss <<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1) BIND(C)"<<iendl; \387 oss <<" USE ISO_C_BINDING"<<iendl; \388 oss <<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl; \389 oss <<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl; \390 oss <<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl; \391 oss <<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl; \392 oss <<iendl; \393 oss <<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1) BIND(C)"<<iendl; \394 oss <<" USE ISO_C_BINDING"<<iendl; \395 oss <<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl; \396 oss <<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl; \397 oss <<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl; \398 oss <<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl; \399 } \ 400 \ 401 template <> \ 402 void CInterface::AttributeFortran2003Interface<ARRAY(T,2)>(ostream& oss, const string& className,const string& name) \403 { \ 404 string fortranType=getStrFortranType<T>() 405 string fortranKindC=getStrFortranKindC<T>() 406 \ 407 oss <<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2) BIND(C)"<<iendl; \408 oss <<" USE ISO_C_BINDING"<<iendl; \409 oss <<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl; \410 oss <<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl; \411 oss <<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl; \412 oss <<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl; \413 oss <<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl; \414 oss <<iendl; \415 oss <<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2) BIND(C)"<<iendl; \416 oss <<" USE ISO_C_BINDING"<<iendl; \417 oss <<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl; \418 oss <<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl; \419 oss <<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl; \420 oss <<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl; \421 oss <<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl; \363 #define macro(T) \ 364 template <> \ 365 void CInterface::AttributeFortran2003Interface<ARRAY(T,1)>(ostream& oss, const string& className, const string& name) \ 366 { \ 367 string fortranType=getStrFortranType<T>(); \ 368 string fortranKindC=getStrFortranKindC<T>(); \ 369 \ 370 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1) BIND(C)" << iendl; \ 371 oss << " USE ISO_C_BINDING" << iendl; \ 372 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 373 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 374 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 375 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ 376 oss << iendl; \ 377 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1) BIND(C)" << iendl; \ 378 oss << " USE ISO_C_BINDING" << iendl; \ 379 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 380 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 381 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 382 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ 383 } \ 384 \ 385 template <> \ 386 void CInterface::AttributeFortran2003Interface<ARRAY(T,2)>(ostream& oss, const string& className, const string& name) \ 387 { \ 388 string fortranType=getStrFortranType<T>(); \ 389 string fortranKindC=getStrFortranKindC<T>(); \ 390 \ 391 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2) BIND(C)" << iendl; \ 392 oss << " USE ISO_C_BINDING" << iendl; \ 393 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 394 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 395 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 396 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 397 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ 398 oss << iendl; \ 399 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2) BIND(C)" << iendl; \ 400 oss << " USE ISO_C_BINDING" << iendl; \ 401 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 402 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 403 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 404 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 405 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ 422 406 } \ 423 407 \ 424 408 template <> \ 425 void CInterface::AttributeFortran2003Interface<ARRAY(T,3)>(ostream& oss, const string& className,const string& name) \426 { \ 427 string fortranType=getStrFortranType<T>() 428 string fortranKindC=getStrFortranKindC<T>() 429 \ 430 oss <<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2, extent3) BIND(C)"<<iendl; \431 oss <<" USE ISO_C_BINDING"<<iendl; \432 oss <<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl; \433 oss <<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl; \434 oss <<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl; \435 oss <<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl; \436 oss <<" INTEGER (kind = C_INT), VALUE :: extent3"<<iendl; \437 oss <<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl; \438 oss <<iendl ;\439 oss <<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2, extent3) BIND(C)"<<iendl; \440 oss <<" USE ISO_C_BINDING"<<iendl; \441 oss <<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl; \442 oss <<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl; \443 oss <<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl; \444 oss <<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl; \445 oss <<" INTEGER (kind = C_INT), VALUE :: extent3"<<iendl; \446 oss <<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl; \409 void CInterface::AttributeFortran2003Interface<ARRAY(T,3)>(ostream& oss, const string& className, const string& name) \ 410 { \ 411 string fortranType=getStrFortranType<T>(); \ 412 string fortranKindC=getStrFortranKindC<T>(); \ 413 \ 414 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2, extent3) BIND(C)" << iendl; \ 415 oss << " USE ISO_C_BINDING" << iendl; \ 416 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 417 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 418 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 419 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 420 oss << " INTEGER (kind = C_INT), VALUE :: extent3" << iendl; \ 421 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ 422 oss << iendl; \ 423 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2, extent3) BIND(C)" << iendl; \ 424 oss << " USE ISO_C_BINDING" << iendl; \ 425 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 426 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 427 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 428 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 429 oss << " INTEGER (kind = C_INT), VALUE :: extent3" << iendl; \ 430 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ 447 431 } 448 432 … … 454 438 */ 455 439 template <class T> 456 void CInterface::AttributeFortranInterfaceDeclaration(ostream& oss, const string& className,const string& name)457 { 458 oss <<getStrFortranType<T>()<<" "<< getStrFortranKind<T>() <<" , OPTIONAL, INTENT(IN) :: "<<name<<iendl;459 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>()<<" :: "<<name<<"_tmp"<<iendl;440 void CInterface::AttributeFortranInterfaceDeclaration(ostream& oss, const string& className, const string& name) 441 { 442 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name; 443 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " :: " << name << "_tmp"; 460 444 } 461 445 462 446 template <class T> 463 void CInterface::AttributeFortranInterfaceGetDeclaration(ostream& oss, const string& className,const string& name)464 { 465 oss <<getStrFortranType<T>()<<" "<< getStrFortranKind<T>() <<" , OPTIONAL, INTENT(OUT) :: "<<name<<iendl;466 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>()<<" :: "<<name<<"_tmp"<<iendl;467 } 468 469 void CInterface::AttributeFortranInterfaceIsDefinedDeclaration(ostream& oss, const string& className,const string& name)470 { 471 oss <<"LOGICAL, OPTIONAL, INTENT(OUT) :: "<<name<<iendl;472 oss <<"LOGICAL(KIND=C_BOOL) :: "<<name<<"_tmp"<<iendl;447 void CInterface::AttributeFortranInterfaceGetDeclaration(ostream& oss, const string& className, const string& name) 448 { 449 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name; 450 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " :: " << name << "_tmp"; 451 } 452 453 void CInterface::AttributeFortranInterfaceIsDefinedDeclaration(ostream& oss, const string& className, const string& name) 454 { 455 oss << "LOGICAL, OPTIONAL, INTENT(OUT) :: " << name << iendl; 456 oss << "LOGICAL(KIND=C_BOOL) :: " << name << "_tmp"; 473 457 } 474 458 475 459 template <> 476 void CInterface::AttributeFortranInterfaceDeclaration<string>(ostream& oss, const string& className,const string& name)477 { 478 oss <<"CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: "<<name<<iendl;460 void CInterface::AttributeFortranInterfaceDeclaration<string>(ostream& oss, const string& className, const string& name) 461 { 462 oss << "CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: " << name; 479 463 } 480 464 481 465 template <> 482 void CInterface::AttributeFortranInterfaceGetDeclaration<string>(ostream& oss, const string& className,const string& name)483 { 484 oss <<"CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: "<<name<<iendl;466 void CInterface::AttributeFortranInterfaceGetDeclaration<string>(ostream& oss, const string& className, const string& name) 467 { 468 oss << "CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: " << name; 485 469 } 486 470 487 471 /* 488 #define macro(T) \489 template <> \ 490 void CInterface::AttributeFortranInterfaceDeclaration<ARRAY(T,1)>(ostream& oss, const string& className,const string& name) \491 { \ 492 oss <<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(IN) :: "<<name<<"(:)"<<iendl; \493 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:)"<<iendl; \494 } \ 495 template <> \ 496 void CInterface::AttributeFortranInterfaceGetDeclaration<ARRAY(T,1)>(ostream& oss, const string& className,const string& name) \497 { \ 498 oss <<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(OUT) :: "<<name<<"(:)"<<iendl; \499 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:)"<<iendl; \500 } \ 501 \ 502 template <> \ 503 void CInterface::AttributeFortranInterfaceDeclaration<ARRAY(T,2)>(ostream& oss, const string& className,const string& name) \504 { \ 505 oss <<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(IN) :: "<<name<<"(:,:)"<<iendl; \506 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:)"<<iendl; \507 } \ 508 \ 509 template <> \ 510 void CInterface::AttributeFortranInterfaceGetDeclaration<ARRAY(T,2)>(ostream& oss, const string& className,const string& name) \511 { \ 512 oss <<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(OUT) :: "<<name<<"(:,:)"<<iendl; \513 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:)"<<iendl; \514 } \ 515 \ 516 template <> \ 517 void CInterface::AttributeFortranInterfaceDeclaration<ARRAY(T,3)>(ostream& oss, const string& className,const string& name) \518 { \ 519 oss <<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(IN) :: "<<name<<"(:,:,:)"<<iendl; \520 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:,:)"<<iendl; \521 } \522 \ 523 template <> \ 524 void CInterface::AttributeFortranInterfaceGetDeclaration<ARRAY(T,3)>(ostream& oss, const string& className,const string& name) \525 { \ 526 oss <<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(OUT) :: "<<name<<"(:,:,:)"<<iendl; \527 if (!matchingTypeCFortran<T>()) oss <<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:,:)"<<iendl; \472 #define macro(T) \ 473 template <> \ 474 void CInterface::AttributeFortranInterfaceDeclaration<ARRAY(T,1)>(ostream& oss, const string& className, const string& name) \ 475 { \ 476 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:)"; \ 477 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:)"; \ 478 } \ 479 template <> \ 480 void CInterface::AttributeFortranInterfaceGetDeclaration<ARRAY(T,1)>(ostream& oss, const string& className, const string& name) \ 481 { \ 482 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:)"; \ 483 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:)"; \ 484 } \ 485 \ 486 template <> \ 487 void CInterface::AttributeFortranInterfaceDeclaration<ARRAY(T,2)>(ostream& oss, const string& className, const string& name) \ 488 { \ 489 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:)"; \ 490 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:)"; \ 491 } \ 492 \ 493 template <> \ 494 void CInterface::AttributeFortranInterfaceGetDeclaration<ARRAY(T,2)>(ostream& oss, const string& className, const string& name) \ 495 { \ 496 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:)"; \ 497 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:)"; \ 498 } \ 499 \ 500 template <> \ 501 void CInterface::AttributeFortranInterfaceDeclaration<ARRAY(T,3)>(ostream& oss, const string& className, const string& name) \ 502 { \ 503 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:,:)"; \ 504 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:)"; \ 505 } \ 506 \ 507 template <> \ 508 void CInterface::AttributeFortranInterfaceGetDeclaration<ARRAY(T,3)>(ostream& oss, const string& className, const string& name) \ 509 { \ 510 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:,:)"; \ 511 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:)"; \ 528 512 } 529 513 … … 536 520 537 521 template <class T> 538 void CInterface::AttributeFortranInterfaceBody(ostream& oss, const string& className,const string& name)539 { 540 string name_tmp=name+"__tmp" 541 542 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl;522 void CInterface::AttributeFortranInterfaceBody(ostream& oss, const string& className, const string& name) 523 { 524 string name_tmp=name+"__tmp"; 525 526 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 543 527 if (!matchingTypeCFortran<T>()) 544 528 { 545 oss <<" "<<name_tmp<<"="<<name<<"_"<<iendl;546 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<")"<<iendl;529 oss << " " << name_tmp << " = " << name << "_" << iendl; 530 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl; 547 531 } 548 else oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_)"<<iendl;549 oss <<"ENDIF"<<iendl;532 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; 533 oss << "ENDIF"; 550 534 } 551 535 552 536 template <class T> 553 void CInterface::AttributeFortranInterfaceGetBody(ostream& oss, const string& className,const string& name)554 { 555 string name_tmp=name+"__tmp" 556 557 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl;537 void CInterface::AttributeFortranInterfaceGetBody(ostream& oss, const string& className, const string& name) 538 { 539 string name_tmp=name+"__tmp"; 540 541 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 558 542 if (!matchingTypeCFortran<T>()) 559 543 { 560 oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<")"<<iendl;561 oss <<" "<<name<<"_="<<name_tmp<<iendl;544 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ")" << iendl; 545 oss << " " << name << "_ = " << name_tmp << iendl; 562 546 } 563 else oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_)"<<iendl;564 oss <<"ENDIF"<<iendl;565 } 566 567 void CInterface::AttributeFortranInterfaceIsDefinedBody(ostream& oss, const string& className,const string& name)568 { 569 string name_tmp=name+"__tmp" 570 571 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl;572 oss <<" "<<name<<"__tmp=cxios_is_defined_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr)"<<iendl;573 oss <<" "<<name<<"_="<<name_tmp<<iendl;574 oss <<"ENDIF"<<iendl;547 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_)" << iendl; 548 oss << "ENDIF"; 549 } 550 551 void CInterface::AttributeFortranInterfaceIsDefinedBody(ostream& oss, const string& className, const string& name) 552 { 553 string name_tmp=name+"__tmp"; 554 555 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 556 oss << " " << name << "__tmp = cxios_is_defined_" << className << "_" << name << "(" << className << "_hdl%daddr)" << iendl; 557 oss << " " << name << "_ = " << name_tmp << iendl; 558 oss << "ENDIF"; 575 559 } 576 560 577 561 template <> 578 void CInterface::AttributeFortranInterfaceBody<string>(ostream& oss, const string& className,const string& name)579 { 580 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl;581 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_, len("<<name<<"_))"<<iendl;582 oss <<"ENDIF"<<iendl;562 void CInterface::AttributeFortranInterfaceBody<string>(ostream& oss, const string& className, const string& name) 563 { 564 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 565 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl; 566 oss << "ENDIF"; 583 567 } 584 568 585 569 template <> 586 void CInterface::AttributeFortranInterfaceGetBody<string>(ostream& oss, const string& className,const string& name)587 { 588 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl;589 oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_, len("<<name<<"_))"<<iendl;590 oss <<"ENDIF"<<iendl;570 void CInterface::AttributeFortranInterfaceGetBody<string>(ostream& oss, const string& className, const string& name) 571 { 572 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; 573 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, len(" << name << "_))" << iendl; 574 oss << "ENDIF"; 591 575 } 592 576 … … 594 578 #define macro(T) \ 595 579 template <> \ 596 void CInterface::AttributeFortranInterfaceBody< ARRAY(T,1) >(ostream& oss, const string& className,const string& name) \597 { \ 598 string name_tmp=name+"__tmp" 599 \ 600 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \601 if (!matchingTypeCFortran<T>()) \ 602 { \ 603 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1)))"<<iendl; \604 oss <<" "<<name_tmp<<"="<<name<<"_"<<iendl; \605 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1))"<<iendl; \580 void CInterface::AttributeFortranInterfaceBody< ARRAY(T,1) >(ostream& oss, const string& className, const string& name) \ 581 { \ 582 string name_tmp=name+"__tmp"; \ 583 \ 584 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 585 if (!matchingTypeCFortran<T>()) \ 586 { \ 587 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1)))" << iendl; \ 588 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 589 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1))" << iendl; \ 606 590 } \ 607 else oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1))"<<iendl; \608 oss <<"ENDIF"<<iendl; \609 } \ 610 \ 611 template <> \ 612 void CInterface::AttributeFortranInterfaceBody< ARRAY(T,2) >(ostream& oss, const string& className,const string& name) \613 { \ 614 string name_tmp=name+"__tmp" 615 \ 616 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \617 if (!matchingTypeCFortran<T>()) \ 618 { \ 619 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1),size("<<name<<"_,2)))"<<iendl; \620 oss <<" "<<name_tmp<<"="<<name<<"_"<<iendl; \621 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1),size("<<name<<"_,2))"<<iendl; \591 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1))" << iendl; \ 592 oss << "ENDIF"; \ 593 } \ 594 \ 595 template <> \ 596 void CInterface::AttributeFortranInterfaceBody< ARRAY(T,2) >(ostream& oss, const string& className, const string& name) \ 597 { \ 598 string name_tmp=name+"__tmp"; \ 599 \ 600 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 601 if (!matchingTypeCFortran<T>()) \ 602 { \ 603 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1), size(" << name << "_,2)))" << iendl; \ 604 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 605 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1), size(" << name << "_,2))" << iendl; \ 622 606 } \ 623 else oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1),size("<<name<<"_,2))"<<iendl; \624 oss <<"ENDIF"<<iendl; \607 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1), size(" << name << "_,2))" << iendl; \ 608 oss << "ENDIF"; \ 625 609 } \ 626 610 \ 627 611 template <> \ 628 void CInterface::AttributeFortranInterfaceBody< ARRAY(T,3) >(ostream& oss, const string& className,const string& name) \629 { \ 630 string name_tmp=name+"__tmp" 631 \ 632 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \633 if (!matchingTypeCFortran<T>()) \ 634 { \ 635 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3)))"<<iendl; \636 oss <<" "<<name_tmp<<"="<<name<<"_"<<iendl; \637 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3))"<<iendl; \612 void CInterface::AttributeFortranInterfaceBody< ARRAY(T,3) >(ostream& oss, const string& className, const string& name) \ 613 { \ 614 string name_tmp=name+"__tmp"; \ 615 \ 616 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 617 if (!matchingTypeCFortran<T>()) \ 618 { \ 619 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3)))" << iendl; \ 620 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 621 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3))" << iendl; \ 638 622 } \ 639 else oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3))"<<iendl; \640 oss <<"ENDIF"<<iendl; \623 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3))" << iendl; \ 624 oss << "ENDIF"; \ 641 625 } 642 626 … … 651 635 #define macro(T) \ 652 636 template <> \ 653 void CInterface::AttributeFortranInterfaceGetBody< ARRAY(T,1) >(ostream& oss, const string& className,const string& name) \654 { \ 655 string name_tmp=name+"__tmp" 656 \ 657 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \658 if (!matchingTypeCFortran<T>()) \ 659 { \ 660 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1)))"<<iendl; \661 oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1))"<<iendl; \662 oss <<" "<<name<<"_="<<name_tmp<<iendl; \637 void CInterface::AttributeFortranInterfaceGetBody< ARRAY(T,1) >(ostream& oss, const string& className, const string& name) \ 638 { \ 639 string name_tmp=name+"__tmp"; \ 640 \ 641 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 642 if (!matchingTypeCFortran<T>()) \ 643 { \ 644 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1)))" << iendl; \ 645 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1))" << iendl; \ 646 oss << " " << name << "_ = " << name_tmp << iendl; \ 663 647 } \ 664 else oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1))"<<iendl; \665 oss <<"ENDIF"<<iendl; \666 } \ 667 \ 668 template <> \ 669 void CInterface::AttributeFortranInterfaceGetBody< ARRAY(T,2) >(ostream& oss, const string& className,const string& name) \670 { \ 671 string name_tmp=name+"__tmp" 672 \ 673 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \674 if (!matchingTypeCFortran<T>()) \ 675 { \ 676 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1),size("<<name<<"_,2)))"<<iendl; \677 oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1),size("<<name<<"_,2))"<<iendl; \678 oss <<" "<<name<<"_="<<name_tmp<<iendl; \648 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1))" << iendl; \ 649 oss << "ENDIF"; \ 650 } \ 651 \ 652 template <> \ 653 void CInterface::AttributeFortranInterfaceGetBody< ARRAY(T,2) >(ostream& oss, const string& className, const string& name) \ 654 { \ 655 string name_tmp=name+"__tmp"; \ 656 \ 657 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 658 if (!matchingTypeCFortran<T>()) \ 659 { \ 660 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1), size(" << name << "_,2)))" << iendl; \ 661 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1), size(" << name << "_,2))" << iendl; \ 662 oss << " " << name << "_ = " << name_tmp << iendl; \ 679 663 } \ 680 else oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1),size("<<name<<"_,2))"<<iendl; \681 oss <<"ENDIF"<<iendl; \664 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1), size(" << name << "_,2))" << iendl; \ 665 oss << "ENDIF"; \ 682 666 } \ 683 667 \ 684 668 template <> \ 685 void CInterface::AttributeFortranInterfaceGetBody< ARRAY(T,3) >(ostream& oss, const string& className,const string& name) \686 { \ 687 string name_tmp=name+"__tmp" 688 \ 689 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \690 if (!matchingTypeCFortran<T>()) \ 691 { \ 692 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3)))"<<iendl; \693 oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3))"<<iendl; \694 oss <<" "<<name<<"_="<<name_tmp<<iendl; \669 void CInterface::AttributeFortranInterfaceGetBody< ARRAY(T,3) >(ostream& oss, const string& className, const string& name) \ 670 { \ 671 string name_tmp=name+"__tmp"; \ 672 \ 673 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 674 if (!matchingTypeCFortran<T>()) \ 675 { \ 676 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3)))" << iendl; \ 677 oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3))" << iendl; \ 678 oss << " " << name << "_ = " << name_tmp << iendl; \ 695 679 } \ 696 else oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3))"<<iendl; \697 oss <<"ENDIF"<<iendl; \680 else oss << " CALL cxios_get_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3))" << iendl; \ 681 oss << "ENDIF"; \ 698 682 } 699 683 … … 707 691 // declaration for CArray 708 692 709 710 711 712 693 #define macro(T) \ 713 template <> \714 void CInterface::AttributeCInterface<CArray<T,1> >(ostream& oss, const string& className, const string& name)\715 { \716 string typeName=getStrType<T>() ;\694 template <> \ 695 void CInterface::AttributeCInterface<CArray<T,1> >(ostream& oss, const string& className, const string& name) \ 696 { \ 697 string typeName=getStrType<T>(); \ 717 698 \ 718 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1)"<<iendl ;\ 719 oss<<"{"<<iendl ;\ 720 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 721 oss<<" CArray<"<<typeName<<",1> tmp("<<name<<",shape(extent1),neverDeleteData) ;"<<iendl ;\ 722 oss<<" "<<className<<"_hdl->"<<name<<".reference(tmp.copy());"<<iendl ;\ 723 /* oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;*/\ 724 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 725 oss<<"}"<<iendl ;\ 726 oss<<iendl; \ 727 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1)"<<iendl ;\ 728 oss<<"{"<<iendl; \ 729 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 730 oss<<" CArray<"<<typeName<<",1> tmp("<<name<<",shape(extent1),neverDeleteData) ;"<<iendl ;\ 731 oss<<" tmp="<<className<<"_hdl->"<<name<<".getInheritedValue() ;"<<iendl ;\ 732 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 733 oss<<"}"<<iendl ;\ 734 oss<<iendl ;\ 735 }\ 699 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1)" << iendl; \ 700 oss << "{" << iendl; \ 701 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 702 oss << " CArray<" << typeName << ",1> tmp(" << name << ", shape(extent1), neverDeleteData);" << iendl; \ 703 oss << " " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \ 704 /*oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \ 705 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 706 oss << "}" << std::endl; \ 707 oss << iendl; \ 708 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1)" << iendl; \ 709 oss << "{" << iendl; \ 710 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 711 oss << " CArray<" << typeName << ",1> tmp(" << name << ", shape(extent1), neverDeleteData);" << iendl; \ 712 oss << " tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \ 713 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 714 oss << "}" << std::endl; \ 715 } \ 736 716 \ 737 717 template <> \ 738 void CInterface::AttributeCInterface<CArray<T,2> >(ostream& oss, const string& className, const string& name)\739 { \740 string typeName=getStrType<T>() ;\718 void CInterface::AttributeCInterface<CArray<T,2> >(ostream& oss, const string& className, const string& name) \ 719 { \ 720 string typeName=getStrType<T>(); \ 741 721 \ 742 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2)"<<iendl ;\ 743 oss<<"{"<<iendl ;\ 744 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 745 oss<<" CArray<"<<typeName<<",2> tmp("<<name<<",shape(extent1,extent2),neverDeleteData) ;"<<iendl ;\ 746 oss<<" "<<className<<"_hdl->"<<name<<".reference(tmp.copy());"<<iendl ;\ 747 /*oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;*/\ 748 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 749 oss<<"}"<<iendl ;\ 750 oss<<iendl; \ 751 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2)"<<iendl ;\ 752 oss<<"{"<<iendl; \ 753 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 754 oss<<" CArray<"<<typeName<<",2> tmp("<<name<<",shape(extent1,extent2),neverDeleteData) ;"<<iendl ;\ 755 oss<<" tmp="<<className<<"_hdl->"<<name<<".getInheritedValue() ;"<<iendl ;\ 756 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 757 oss<<"}"<<iendl ;\ 758 oss<<iendl ;\ 759 }\ 722 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2)" << iendl; \ 723 oss << "{" << iendl; \ 724 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 725 oss << " CArray<" << typeName << ",2> tmp(" << name << ", shape(extent1, extent2), neverDeleteData);" << iendl; \ 726 oss << " " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \ 727 /*oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \ 728 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 729 oss << "}" << std::endl; \ 730 oss << iendl; \ 731 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2)" << iendl; \ 732 oss << "{" << iendl; \ 733 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 734 oss << " CArray<" << typeName << ",2> tmp(" << name << ", shape(extent1, extent2), neverDeleteData);" << iendl; \ 735 oss << " tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \ 736 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 737 oss << "}" << std::endl; \ 738 } \ 760 739 \ 761 template <> \762 void CInterface::AttributeCInterface<CArray<T,3> >(ostream& oss, const string& className, const string& name)\763 { \764 string typeName=getStrType<T>() ;\740 template <> \ 741 void CInterface::AttributeCInterface<CArray<T,3> >(ostream& oss, const string& className, const string& name) \ 742 { \ 743 string typeName=getStrType<T>(); \ 765 744 \ 766 oss<<"void cxios_set_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)"<<iendl ;\ 767 oss<<"{"<<iendl ;\ 768 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 769 oss<<" CArray<"<<typeName<<",3> tmp("<<name<<",shape(extent1,extent2,extent3),neverDeleteData) ;"<<iendl ;\ 770 oss<<" "<<className<<"_hdl->"<<name<<".reference(tmp.copy());"<<iendl ;\ 771 /*oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;*/\ 772 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 773 oss<<"}"<<iendl ;\ 774 oss<<iendl; \ 775 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)"<<iendl ;\ 776 oss<<"{"<<iendl; \ 777 oss<<" CTimer::get(\"XIOS\").resume();"<<iendl ; \ 778 oss<<" CArray<"<<typeName<<",3> tmp("<<name<<",shape(extent1,extent2,extent3),neverDeleteData) ;"<<iendl ;\ 779 oss<<" tmp="<<className<<"_hdl->"<<name<<".getInheritedValue() ;"<<iendl ;\ 780 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 781 oss<<"}"<<iendl ;\ 782 oss<<iendl ;\ 745 oss << "void cxios_set_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2, int extent3)" << iendl; \ 746 oss << "{" << iendl; \ 747 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 748 oss << " CArray<" << typeName << ",3> tmp(" << name << ", shape(extent1, extent2, extent3), neverDeleteData);" << iendl; \ 749 oss << " " << className << "_hdl->" << name << ".reference(tmp.copy());" << iendl; \ 750 /*oss << " " << className << "_hdl->sendAttributToServer(" << className << "_hdl->" << name << ");" << iendl;*/ \ 751 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 752 oss << "}" << std::endl; \ 753 oss << iendl; \ 754 oss << "void cxios_get_" << className << "_" << name << "(" << className << "_Ptr " << className << "_hdl, " << typeName << "* " << name << ", int extent1, int extent2, int extent3)" << iendl; \ 755 oss << "{" << iendl; \ 756 oss << " CTimer::get(\"XIOS\").resume();" << iendl; \ 757 oss << " CArray<" << typeName << ",3> tmp(" << name << ", shape(extent1, extent2, extent3), neverDeleteData);" << iendl; \ 758 oss << " tmp=" << className << "_hdl->" << name << ".getInheritedValue();" << iendl; \ 759 oss << " CTimer::get(\"XIOS\").suspend();" << iendl; \ 760 oss << "}" << std::endl; \ 783 761 } 784 762 … … 793 771 // ///////////////////////////////////////////////// 794 772 795 796 797 #define macro(T)\ 798 template <>\ 799 void CInterface::AttributeFortran2003Interface<CArray<T,1> >(ostream& oss,const string& className,const string& name) \ 800 { \ 801 string fortranType=getStrFortranType<T>() ; \ 802 string fortranKindC=getStrFortranKindC<T>() ; \ 803 \ 804 oss<<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1) BIND(C)"<<iendl ; \ 805 oss<<" USE ISO_C_BINDING"<<iendl ; \ 806 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; \ 807 oss<<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl ; \ 808 oss<<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl ; \ 809 oss<<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl ; \ 810 oss<<iendl; \ 811 oss<<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1) BIND(C)"<<iendl ; \ 812 oss<<" USE ISO_C_BINDING"<<iendl ; \ 813 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; \ 814 oss<<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl ; \ 815 oss<<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl ; \ 816 oss<<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl ; \ 817 oss<<iendl ;\ 818 } \ 819 \ 820 template <> \ 821 void CInterface::AttributeFortran2003Interface<CArray<T,2> >(ostream& oss,const string& className,const string& name) \ 822 { \ 823 string fortranType=getStrFortranType<T>() ; \ 824 string fortranKindC=getStrFortranKindC<T>() ; \ 825 \ 826 oss<<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2) BIND(C)"<<iendl ; \ 827 oss<<" USE ISO_C_BINDING"<<iendl ; \ 828 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; \ 829 oss<<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl ; \ 830 oss<<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl ; \ 831 oss<<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl ; \ 832 oss<<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl ; \ 833 oss<<iendl ; \ 834 oss<<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2) BIND(C)"<<iendl ; \ 835 oss<<" USE ISO_C_BINDING"<<iendl ; \ 836 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; \ 837 oss<<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl ; \ 838 oss<<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl ; \ 839 oss<<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl ; \ 840 oss<<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl ; \ 841 oss<<iendl ;\ 773 #define macro(T) \ 774 template <> \ 775 void CInterface::AttributeFortran2003Interface<CArray<T,1> >(ostream& oss, const string& className, const string& name) \ 776 { \ 777 string fortranType=getStrFortranType<T>(); \ 778 string fortranKindC=getStrFortranKindC<T>(); \ 779 \ 780 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1) BIND(C)" << iendl; \ 781 oss << " USE ISO_C_BINDING" << iendl; \ 782 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 783 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 784 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 785 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ 786 oss << iendl; \ 787 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1) BIND(C)" << iendl; \ 788 oss << " USE ISO_C_BINDING" << iendl; \ 789 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 790 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 791 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 792 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ 793 } \ 794 \ 795 template <> \ 796 void CInterface::AttributeFortran2003Interface<CArray<T,2> >(ostream& oss, const string& className, const string& name) \ 797 { \ 798 string fortranType=getStrFortranType<T>(); \ 799 string fortranKindC=getStrFortranKindC<T>(); \ 800 \ 801 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2) BIND(C)" << iendl; \ 802 oss << " USE ISO_C_BINDING" << iendl; \ 803 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 804 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 805 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 806 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 807 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ 808 oss << iendl; \ 809 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2) BIND(C)" << iendl; \ 810 oss << " USE ISO_C_BINDING" << iendl; \ 811 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 812 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 813 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 814 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 815 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ 842 816 } \ 843 817 \ 844 818 template <> \ 845 void CInterface::AttributeFortran2003Interface<CArray<T,3> >(ostream& oss,const string& className,const string& name) \ 846 { \ 847 string fortranType=getStrFortranType<T>() ; \ 848 string fortranKindC=getStrFortranKindC<T>() ; \ 849 \ 850 oss<<"SUBROUTINE cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2, extent3) BIND(C)"<<iendl ; \ 851 oss<<" USE ISO_C_BINDING"<<iendl ; \ 852 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; \ 853 oss<<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl ; \ 854 oss<<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl ; \ 855 oss<<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl ; \ 856 oss<<" INTEGER (kind = C_INT), VALUE :: extent3"<<iendl ; \ 857 oss<<"END SUBROUTINE cxios_set_"<<className<<"_"<<name<<iendl ; \ 858 oss<<iendl ;\ 859 oss<<"SUBROUTINE cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl, "<<name<<", extent1, extent2, extent3) BIND(C)"<<iendl ; \ 860 oss<<" USE ISO_C_BINDING"<<iendl ; \ 861 oss<<" INTEGER (kind = C_INTPTR_T), VALUE :: "<<className<<"_hdl"<<iendl ; \ 862 oss<<" "<<fortranType<<" "<<fortranKindC<<" , DIMENSION(*) :: "<<name<<iendl ; \ 863 oss<<" INTEGER (kind = C_INT), VALUE :: extent1"<<iendl ; \ 864 oss<<" INTEGER (kind = C_INT), VALUE :: extent2"<<iendl ; \ 865 oss<<" INTEGER (kind = C_INT), VALUE :: extent3"<<iendl ; \ 866 oss<<"END SUBROUTINE cxios_get_"<<className<<"_"<<name<<iendl ; \ 867 oss<<iendl ;\ 819 void CInterface::AttributeFortran2003Interface<CArray<T,3> >(ostream& oss, const string& className, const string& name) \ 820 { \ 821 string fortranType=getStrFortranType<T>(); \ 822 string fortranKindC=getStrFortranKindC<T>(); \ 823 \ 824 oss << "SUBROUTINE cxios_set_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2, extent3) BIND(C)" << iendl; \ 825 oss << " USE ISO_C_BINDING" << iendl; \ 826 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 827 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 828 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 829 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 830 oss << " INTEGER (kind = C_INT), VALUE :: extent3" << iendl; \ 831 oss << "END SUBROUTINE cxios_set_" << className << "_" << name << std::endl; \ 832 oss << iendl; \ 833 oss << "SUBROUTINE cxios_get_" << className << "_" << name << "(" << className << "_hdl, " << name << ", extent1, extent2, extent3) BIND(C)" << iendl; \ 834 oss << " USE ISO_C_BINDING" << iendl; \ 835 oss << " INTEGER (kind = C_INTPTR_T), VALUE :: " << className << "_hdl" << iendl; \ 836 oss << " " << fortranType << " " << fortranKindC << " , DIMENSION(*) :: " << name << iendl; \ 837 oss << " INTEGER (kind = C_INT), VALUE :: extent1" << iendl; \ 838 oss << " INTEGER (kind = C_INT), VALUE :: extent2" << iendl; \ 839 oss << " INTEGER (kind = C_INT), VALUE :: extent3" << iendl; \ 840 oss << "END SUBROUTINE cxios_get_" << className << "_" << name << std::endl; \ 868 841 } 869 842 … … 874 847 #undef macro 875 848 876 877 #define macro(T)\ 878 template <> \ 879 void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,1> >(ostream& oss,const string& className,const string& name) \ 880 { \ 881 oss<<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(IN) :: "<<name<<"(:)"<<iendl ; \ 882 if (!matchingTypeCFortran<T>()) oss<<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:)"<<iendl ; \ 883 } \ 884 template <> \ 885 void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,1> >(ostream& oss,const string& className,const string& name) \ 886 { \ 887 oss<<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(OUT) :: "<<name<<"(:)"<<iendl ; \ 888 if (!matchingTypeCFortran<T>()) oss<<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:)"<<iendl ; \ 889 } \ 890 \ 891 template <> \ 892 void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,2> >(ostream& oss,const string& className,const string& name) \ 893 { \ 894 oss<<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(IN) :: "<<name<<"(:,:)"<<iendl ; \ 895 if (!matchingTypeCFortran<T>()) oss<<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:)"<<iendl ; \ 896 } \ 897 \ 898 template <> \ 899 void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,2> >(ostream& oss,const string& className,const string& name) \ 900 { \ 901 oss<<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(OUT) :: "<<name<<"(:,:)"<<iendl ; \ 902 if (!matchingTypeCFortran<T>()) oss<<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:)"<<iendl ; \ 903 } \ 904 \ 905 template <> \ 906 void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,3> >(ostream& oss,const string& className,const string& name) \ 907 { \ 908 oss<<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(IN) :: "<<name<<"(:,:,:)"<<iendl ; \ 909 if (!matchingTypeCFortran<T>()) oss<<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:,:)"<<iendl ; \ 910 }\ 911 \ 912 template <> \ 913 void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,3> >(ostream& oss,const string& className,const string& name) \ 914 { \ 915 oss<<getStrFortranType<T>()<<" "<<getStrFortranKind<T>() <<" , OPTIONAL, INTENT(OUT) :: "<<name<<"(:,:,:)"<<iendl ; \ 916 if (!matchingTypeCFortran<T>()) oss<<getStrFortranType<T>()<<" "<<getStrFortranKindC<T>() <<" , ALLOCATABLE :: "<<name<<"_tmp(:,:,:)"<<iendl ; \ 849 #define macro(T) \ 850 template <> \ 851 void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,1> >(ostream& oss, const string& className, const string& name) \ 852 { \ 853 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:)"; \ 854 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:)"; \ 855 } \ 856 template <> \ 857 void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,1> >(ostream& oss, const string& className, const string& name) \ 858 { \ 859 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:)"; \ 860 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:)"; \ 861 } \ 862 \ 863 template <> \ 864 void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,2> >(ostream& oss, const string& className, const string& name) \ 865 { \ 866 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:)"; \ 867 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:)"; \ 868 } \ 869 \ 870 template <> \ 871 void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,2> >(ostream& oss, const string& className, const string& name) \ 872 { \ 873 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:)"; \ 874 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:)"; \ 875 } \ 876 \ 877 template <> \ 878 void CInterface::AttributeFortranInterfaceDeclaration<CArray<T,3> >(ostream& oss, const string& className, const string& name) \ 879 { \ 880 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(IN) :: " << name << "(:,:,:)"; \ 881 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:)"; \ 882 } \ 883 \ 884 template <> \ 885 void CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T,3> >(ostream& oss, const string& className, const string& name) \ 886 { \ 887 oss << getStrFortranType<T>() << " " << getStrFortranKind<T>() << " , OPTIONAL, INTENT(OUT) :: " << name << "(:,:,:)"; \ 888 if (!matchingTypeCFortran<T>()) oss << iendl << getStrFortranType<T>() << " " << getStrFortranKindC<T>() << " , ALLOCATABLE :: " << name << "_tmp(:,:,:)"; \ 917 889 } 918 890 … … 923 895 #undef macro 924 896 925 926 927 897 #define macro(T) \ 928 898 template <> \ 929 void CInterface::AttributeFortranInterfaceBody< CArray<T,1> >(ostream& oss, const string& className,const string& name) \930 { \ 931 string name_tmp=name+"__tmp" 932 \ 933 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \934 if (!matchingTypeCFortran<T>()) \ 935 { \ 936 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1)))"<<iendl; \937 oss <<" "<<name_tmp<<"="<<name<<"_"<<iendl; \938 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1))"<<iendl; \899 void CInterface::AttributeFortranInterfaceBody< CArray<T,1> >(ostream& oss, const string& className, const string& name) \ 900 { \ 901 string name_tmp=name+"__tmp"; \ 902 \ 903 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 904 if (!matchingTypeCFortran<T>()) \ 905 { \ 906 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1)))" << iendl; \ 907 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 908 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1))" << iendl; \ 939 909 } \ 940 else oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1))"<<iendl; \941 oss <<"ENDIF"<<iendl; \942 } \ 943 \ 944 template <> \ 945 void CInterface::AttributeFortranInterfaceBody< CArray<T,2> >(ostream& oss, const string& className,const string& name) \946 { \ 947 string name_tmp=name+"__tmp" 948 \ 949 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \950 if (!matchingTypeCFortran<T>()) \ 951 { \ 952 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1),size("<<name<<"_,2)))"<<iendl; \953 oss <<" "<<name_tmp<<"="<<name<<"_"<<iendl; \954 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1),size("<<name<<"_,2))"<<iendl; \910 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1))" << iendl; \ 911 oss << "ENDIF"; \ 912 } \ 913 \ 914 template <> \ 915 void CInterface::AttributeFortranInterfaceBody< CArray<T,2> >(ostream& oss, const string& className, const string& name) \ 916 { \ 917 string name_tmp=name+"__tmp"; \ 918 \ 919 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 920 if (!matchingTypeCFortran<T>()) \ 921 { \ 922 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1), size(" << name << "_,2)))" << iendl; \ 923 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 924 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1), size(" << name << "_,2))" << iendl; \ 955 925 } \ 956 else oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1),size("<<name<<"_,2))"<<iendl; \957 oss <<"ENDIF"<<iendl; \926 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1), size(" << name << "_,2))" << iendl; \ 927 oss << "ENDIF"; \ 958 928 } \ 959 929 \ 960 930 template <> \ 961 void CInterface::AttributeFortranInterfaceBody< CArray<T,3> >(ostream& oss, const string& className,const string& name) \962 { \ 963 string name_tmp=name+"__tmp" 964 \ 965 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \966 if (!matchingTypeCFortran<T>()) \ 967 { \ 968 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3)))"<<iendl; \969 oss <<" "<<name_tmp<<"="<<name<<"_"<<iendl; \970 oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3))"<<iendl; \931 void CInterface::AttributeFortranInterfaceBody< CArray<T,3> >(ostream& oss, const string& className, const string& name) \ 932 { \ 933 string name_tmp=name+"__tmp"; \ 934 \ 935 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 936 if (!matchingTypeCFortran<T>()) \ 937 { \ 938 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3)))" << iendl; \ 939 oss << " " << name_tmp << " = " << name << "_" << iendl; \ 940 oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name_tmp << ", size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3))" << iendl; \ 971 941 } \ 972 else oss <<" CALL cxios_set_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name<<"_,size("<<name<<"_,1),size("<<name<<"_,2),size("<<name<<"_,3))"<<iendl; \973 oss <<"ENDIF"<<iendl; \942 else oss << " CALL cxios_set_" << className << "_" << name << "(" << className << "_hdl%daddr, " << name << "_, size(" << name << "_,1), size(" << name << "_,2), size(" << name << "_,3))" << iendl; \ 943 oss << "ENDIF"; \ 974 944 } 975 945 … … 982 952 #define macro(T) \ 983 953 template <> \ 984 void CInterface::AttributeFortranInterfaceGetBody< CArray<T,1> >(ostream& oss, const string& className,const string& name) \985 { \ 986 string name_tmp=name+"__tmp" 987 \ 988 oss <<"IF (PRESENT("<<name<<"_)) THEN"<<iendl; \989 if (!matchingTypeCFortran<T>()) \ 990 { \ 991 oss <<" ALLOCATE("<<name_tmp<<"(size("<<name<<"_,1)))"<<iendl; \992 oss <<" CALL cxios_get_"<<className<<"_"<<name<<"("<<className<<"_hdl%daddr, "<<name_tmp<<",size("<<name<<"_,1))"<<iendl; \993 oss <<" "<<name<<"_="<<name_tmp<<iendl; \954 void CInterface::AttributeFortranInterfaceGetBody< CArray<T,1> >(ostream& oss, const string& className, const string& name) \ 955 { \ 956 string name_tmp=name+"__tmp"; \ 957 \ 958 oss << "IF (PRESENT(" << name << "_)) THEN" << iendl; \ 959 if (!matchingTypeCFortran<T>()) \ 960 { \ 961 oss << " ALLOCATE(" << name_tmp << "(size(" << name << "_,1)))" << iendl; \ 962 oss << " CALL cxios_get_" << className << "_" << name << "(" &