- Timestamp:
- 04/24/18 18:03:18 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icdomaingroup_attr.cpp
r1158 r1492 93 93 94 94 95 void cxios_set_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl, const char * bounds_lat_name, int bounds_lat_name_size) 96 { 97 std::string bounds_lat_name_str; 98 if (!cstr2string(bounds_lat_name, bounds_lat_name_size, bounds_lat_name_str)) return; 99 CTimer::get("XIOS").resume(); 100 domaingroup_hdl->bounds_lat_name.setValue(bounds_lat_name_str); 101 CTimer::get("XIOS").suspend(); 102 } 103 104 void cxios_get_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lat_name, int bounds_lat_name_size) 105 { 106 CTimer::get("XIOS").resume(); 107 if (!string_copy(domaingroup_hdl->bounds_lat_name.getInheritedValue(), bounds_lat_name, bounds_lat_name_size)) 108 ERROR("void cxios_get_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lat_name, int bounds_lat_name_size)", << "Input string is too short"); 109 CTimer::get("XIOS").suspend(); 110 } 111 112 bool cxios_is_defined_domaingroup_bounds_lat_name(domaingroup_Ptr domaingroup_hdl) 113 { 114 CTimer::get("XIOS").resume(); 115 bool isDefined = domaingroup_hdl->bounds_lat_name.hasInheritedValue(); 116 CTimer::get("XIOS").suspend(); 117 return isDefined; 118 } 119 120 95 121 void cxios_set_domaingroup_bounds_lon_1d(domaingroup_Ptr domaingroup_hdl, double* bounds_lon_1d, int* extent) 96 122 { … … 143 169 144 170 171 void cxios_set_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl, const char * bounds_lon_name, int bounds_lon_name_size) 172 { 173 std::string bounds_lon_name_str; 174 if (!cstr2string(bounds_lon_name, bounds_lon_name_size, bounds_lon_name_str)) return; 175 CTimer::get("XIOS").resume(); 176 domaingroup_hdl->bounds_lon_name.setValue(bounds_lon_name_str); 177 CTimer::get("XIOS").suspend(); 178 } 179 180 void cxios_get_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lon_name, int bounds_lon_name_size) 181 { 182 CTimer::get("XIOS").resume(); 183 if (!string_copy(domaingroup_hdl->bounds_lon_name.getInheritedValue(), bounds_lon_name, bounds_lon_name_size)) 184 ERROR("void cxios_get_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl, char * bounds_lon_name, int bounds_lon_name_size)", << "Input string is too short"); 185 CTimer::get("XIOS").suspend(); 186 } 187 188 bool cxios_is_defined_domaingroup_bounds_lon_name(domaingroup_Ptr domaingroup_hdl) 189 { 190 CTimer::get("XIOS").resume(); 191 bool isDefined = domaingroup_hdl->bounds_lon_name.hasInheritedValue(); 192 CTimer::get("XIOS").suspend(); 193 return isDefined; 194 } 195 196 197 void cxios_set_domaingroup_comment(domaingroup_Ptr domaingroup_hdl, const char * comment, int comment_size) 198 { 199 std::string comment_str; 200 if (!cstr2string(comment, comment_size, comment_str)) return; 201 CTimer::get("XIOS").resume(); 202 domaingroup_hdl->comment.setValue(comment_str); 203 CTimer::get("XIOS").suspend(); 204 } 205 206 void cxios_get_domaingroup_comment(domaingroup_Ptr domaingroup_hdl, char * comment, int comment_size) 207 { 208 CTimer::get("XIOS").resume(); 209 if (!string_copy(domaingroup_hdl->comment.getInheritedValue(), comment, comment_size)) 210 ERROR("void cxios_get_domaingroup_comment(domaingroup_Ptr domaingroup_hdl, char * comment, int comment_size)", << "Input string is too short"); 211 CTimer::get("XIOS").suspend(); 212 } 213 214 bool cxios_is_defined_domaingroup_comment(domaingroup_Ptr domaingroup_hdl) 215 { 216 CTimer::get("XIOS").resume(); 217 bool isDefined = domaingroup_hdl->comment.hasInheritedValue(); 218 CTimer::get("XIOS").suspend(); 219 return isDefined; 220 } 221 222 145 223 void cxios_set_domaingroup_data_dim(domaingroup_Ptr domaingroup_hdl, int data_dim) 146 224 { … … 308 386 309 387 388 void cxios_set_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl, const char * dim_i_name, int dim_i_name_size) 389 { 390 std::string dim_i_name_str; 391 if (!cstr2string(dim_i_name, dim_i_name_size, dim_i_name_str)) return; 392 CTimer::get("XIOS").resume(); 393 domaingroup_hdl->dim_i_name.setValue(dim_i_name_str); 394 CTimer::get("XIOS").suspend(); 395 } 396 397 void cxios_get_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl, char * dim_i_name, int dim_i_name_size) 398 { 399 CTimer::get("XIOS").resume(); 400 if (!string_copy(domaingroup_hdl->dim_i_name.getInheritedValue(), dim_i_name, dim_i_name_size)) 401 ERROR("void cxios_get_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl, char * dim_i_name, int dim_i_name_size)", << "Input string is too short"); 402 CTimer::get("XIOS").suspend(); 403 } 404 405 bool cxios_is_defined_domaingroup_dim_i_name(domaingroup_Ptr domaingroup_hdl) 406 { 407 CTimer::get("XIOS").resume(); 408 bool isDefined = domaingroup_hdl->dim_i_name.hasInheritedValue(); 409 CTimer::get("XIOS").suspend(); 410 return isDefined; 411 } 412 413 414 void cxios_set_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl, const char * dim_j_name, int dim_j_name_size) 415 { 416 std::string dim_j_name_str; 417 if (!cstr2string(dim_j_name, dim_j_name_size, dim_j_name_str)) return; 418 CTimer::get("XIOS").resume(); 419 domaingroup_hdl->dim_j_name.setValue(dim_j_name_str); 420 CTimer::get("XIOS").suspend(); 421 } 422 423 void cxios_get_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl, char * dim_j_name, int dim_j_name_size) 424 { 425 CTimer::get("XIOS").resume(); 426 if (!string_copy(domaingroup_hdl->dim_j_name.getInheritedValue(), dim_j_name, dim_j_name_size)) 427 ERROR("void cxios_get_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl, char * dim_j_name, int dim_j_name_size)", << "Input string is too short"); 428 CTimer::get("XIOS").suspend(); 429 } 430 431 bool cxios_is_defined_domaingroup_dim_j_name(domaingroup_Ptr domaingroup_hdl) 432 { 433 CTimer::get("XIOS").resume(); 434 bool isDefined = domaingroup_hdl->dim_j_name.hasInheritedValue(); 435 CTimer::get("XIOS").suspend(); 436 return isDefined; 437 } 438 439 310 440 void cxios_set_domaingroup_domain_ref(domaingroup_Ptr domaingroup_hdl, const char * domain_ref, int domain_ref_size) 311 441 { … … 456 586 457 587 588 void cxios_set_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl, const char * lat_name, int lat_name_size) 589 { 590 std::string lat_name_str; 591 if (!cstr2string(lat_name, lat_name_size, lat_name_str)) return; 592 CTimer::get("XIOS").resume(); 593 domaingroup_hdl->lat_name.setValue(lat_name_str); 594 CTimer::get("XIOS").suspend(); 595 } 596 597 void cxios_get_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl, char * lat_name, int lat_name_size) 598 { 599 CTimer::get("XIOS").resume(); 600 if (!string_copy(domaingroup_hdl->lat_name.getInheritedValue(), lat_name, lat_name_size)) 601 ERROR("void cxios_get_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl, char * lat_name, int lat_name_size)", << "Input string is too short"); 602 CTimer::get("XIOS").suspend(); 603 } 604 605 bool cxios_is_defined_domaingroup_lat_name(domaingroup_Ptr domaingroup_hdl) 606 { 607 CTimer::get("XIOS").resume(); 608 bool isDefined = domaingroup_hdl->lat_name.hasInheritedValue(); 609 CTimer::get("XIOS").suspend(); 610 return isDefined; 611 } 612 613 458 614 void cxios_set_domaingroup_latvalue_1d(domaingroup_Ptr domaingroup_hdl, double* latvalue_1d, int* extent) 459 615 { … … 506 662 507 663 664 void cxios_set_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl, const char * lon_name, int lon_name_size) 665 { 666 std::string lon_name_str; 667 if (!cstr2string(lon_name, lon_name_size, lon_name_str)) return; 668 CTimer::get("XIOS").resume(); 669 domaingroup_hdl->lon_name.setValue(lon_name_str); 670 CTimer::get("XIOS").suspend(); 671 } 672 673 void cxios_get_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl, char * lon_name, int lon_name_size) 674 { 675 CTimer::get("XIOS").resume(); 676 if (!string_copy(domaingroup_hdl->lon_name.getInheritedValue(), lon_name, lon_name_size)) 677 ERROR("void cxios_get_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl, char * lon_name, int lon_name_size)", << "Input string is too short"); 678 CTimer::get("XIOS").suspend(); 679 } 680 681 bool cxios_is_defined_domaingroup_lon_name(domaingroup_Ptr domaingroup_hdl) 682 { 683 CTimer::get("XIOS").resume(); 684 bool isDefined = domaingroup_hdl->lon_name.hasInheritedValue(); 685 CTimer::get("XIOS").suspend(); 686 return isDefined; 687 } 688 689 508 690 void cxios_set_domaingroup_long_name(domaingroup_Ptr domaingroup_hdl, const char * long_name, int long_name_size) 509 691 {
Note: See TracChangeset
for help on using the changeset viewer.