Changeset 1492 for XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr
- Timestamp:
- 04/24/18 18:03:18 (6 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr
- Files:
-
- 5 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icaxis_attr.cpp
r1158 r1492 44 44 45 45 46 void cxios_set_axis_axis_type(axis_Ptr axis_hdl, const char * axis_type, int axis_type_size) 47 { 48 std::string axis_type_str; 49 if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return; 50 CTimer::get("XIOS").resume(); 51 axis_hdl->axis_type.fromString(axis_type_str); 52 CTimer::get("XIOS").suspend(); 53 } 54 55 void cxios_get_axis_axis_type(axis_Ptr axis_hdl, char * axis_type, int axis_type_size) 56 { 57 CTimer::get("XIOS").resume(); 58 if (!string_copy(axis_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size)) 59 ERROR("void cxios_get_axis_axis_type(axis_Ptr axis_hdl, char * axis_type, int axis_type_size)", << "Input string is too short"); 60 CTimer::get("XIOS").suspend(); 61 } 62 63 bool cxios_is_defined_axis_axis_type(axis_Ptr axis_hdl) 64 { 65 CTimer::get("XIOS").resume(); 66 bool isDefined = axis_hdl->axis_type.hasInheritedValue(); 67 CTimer::get("XIOS").suspend(); 68 return isDefined; 69 } 70 71 46 72 void cxios_set_axis_begin(axis_Ptr axis_hdl, int begin) 47 73 { … … 92 118 93 119 120 void cxios_set_axis_bounds_name(axis_Ptr axis_hdl, const char * bounds_name, int bounds_name_size) 121 { 122 std::string bounds_name_str; 123 if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return; 124 CTimer::get("XIOS").resume(); 125 axis_hdl->bounds_name.setValue(bounds_name_str); 126 CTimer::get("XIOS").suspend(); 127 } 128 129 void cxios_get_axis_bounds_name(axis_Ptr axis_hdl, char * bounds_name, int bounds_name_size) 130 { 131 CTimer::get("XIOS").resume(); 132 if (!string_copy(axis_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size)) 133 ERROR("void cxios_get_axis_bounds_name(axis_Ptr axis_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short"); 134 CTimer::get("XIOS").suspend(); 135 } 136 137 bool cxios_is_defined_axis_bounds_name(axis_Ptr axis_hdl) 138 { 139 CTimer::get("XIOS").resume(); 140 bool isDefined = axis_hdl->bounds_name.hasInheritedValue(); 141 CTimer::get("XIOS").suspend(); 142 return isDefined; 143 } 144 145 146 void cxios_set_axis_comment(axis_Ptr axis_hdl, const char * comment, int comment_size) 147 { 148 std::string comment_str; 149 if (!cstr2string(comment, comment_size, comment_str)) return; 150 CTimer::get("XIOS").resume(); 151 axis_hdl->comment.setValue(comment_str); 152 CTimer::get("XIOS").suspend(); 153 } 154 155 void cxios_get_axis_comment(axis_Ptr axis_hdl, char * comment, int comment_size) 156 { 157 CTimer::get("XIOS").resume(); 158 if (!string_copy(axis_hdl->comment.getInheritedValue(), comment, comment_size)) 159 ERROR("void cxios_get_axis_comment(axis_Ptr axis_hdl, char * comment, int comment_size)", << "Input string is too short"); 160 CTimer::get("XIOS").suspend(); 161 } 162 163 bool cxios_is_defined_axis_comment(axis_Ptr axis_hdl) 164 { 165 CTimer::get("XIOS").resume(); 166 bool isDefined = axis_hdl->comment.hasInheritedValue(); 167 CTimer::get("XIOS").suspend(); 168 return isDefined; 169 } 170 171 94 172 void cxios_set_axis_data_begin(axis_Ptr axis_hdl, int data_begin) 95 173 { … … 158 236 CTimer::get("XIOS").resume(); 159 237 bool isDefined = axis_hdl->data_n.hasInheritedValue(); 238 CTimer::get("XIOS").suspend(); 239 return isDefined; 240 } 241 242 243 void cxios_set_axis_dim_name(axis_Ptr axis_hdl, const char * dim_name, int dim_name_size) 244 { 245 std::string dim_name_str; 246 if (!cstr2string(dim_name, dim_name_size, dim_name_str)) return; 247 CTimer::get("XIOS").resume(); 248 axis_hdl->dim_name.setValue(dim_name_str); 249 CTimer::get("XIOS").suspend(); 250 } 251 252 void cxios_get_axis_dim_name(axis_Ptr axis_hdl, char * dim_name, int dim_name_size) 253 { 254 CTimer::get("XIOS").resume(); 255 if (!string_copy(axis_hdl->dim_name.getInheritedValue(), dim_name, dim_name_size)) 256 ERROR("void cxios_get_axis_dim_name(axis_Ptr axis_hdl, char * dim_name, int dim_name_size)", << "Input string is too short"); 257 CTimer::get("XIOS").suspend(); 258 } 259 260 bool cxios_is_defined_axis_dim_name(axis_Ptr axis_hdl) 261 { 262 CTimer::get("XIOS").resume(); 263 bool isDefined = axis_hdl->dim_name.hasInheritedValue(); 264 CTimer::get("XIOS").suspend(); 265 return isDefined; 266 } 267 268 269 void cxios_set_axis_formula(axis_Ptr axis_hdl, const char * formula, int formula_size) 270 { 271 std::string formula_str; 272 if (!cstr2string(formula, formula_size, formula_str)) return; 273 CTimer::get("XIOS").resume(); 274 axis_hdl->formula.setValue(formula_str); 275 CTimer::get("XIOS").suspend(); 276 } 277 278 void cxios_get_axis_formula(axis_Ptr axis_hdl, char * formula, int formula_size) 279 { 280 CTimer::get("XIOS").resume(); 281 if (!string_copy(axis_hdl->formula.getInheritedValue(), formula, formula_size)) 282 ERROR("void cxios_get_axis_formula(axis_Ptr axis_hdl, char * formula, int formula_size)", << "Input string is too short"); 283 CTimer::get("XIOS").suspend(); 284 } 285 286 bool cxios_is_defined_axis_formula(axis_Ptr axis_hdl) 287 { 288 CTimer::get("XIOS").resume(); 289 bool isDefined = axis_hdl->formula.hasInheritedValue(); 290 CTimer::get("XIOS").suspend(); 291 return isDefined; 292 } 293 294 295 void cxios_set_axis_formula_bounds(axis_Ptr axis_hdl, const char * formula_bounds, int formula_bounds_size) 296 { 297 std::string formula_bounds_str; 298 if (!cstr2string(formula_bounds, formula_bounds_size, formula_bounds_str)) return; 299 CTimer::get("XIOS").resume(); 300 axis_hdl->formula_bounds.setValue(formula_bounds_str); 301 CTimer::get("XIOS").suspend(); 302 } 303 304 void cxios_get_axis_formula_bounds(axis_Ptr axis_hdl, char * formula_bounds, int formula_bounds_size) 305 { 306 CTimer::get("XIOS").resume(); 307 if (!string_copy(axis_hdl->formula_bounds.getInheritedValue(), formula_bounds, formula_bounds_size)) 308 ERROR("void cxios_get_axis_formula_bounds(axis_Ptr axis_hdl, char * formula_bounds, int formula_bounds_size)", << "Input string is too short"); 309 CTimer::get("XIOS").suspend(); 310 } 311 312 bool cxios_is_defined_axis_formula_bounds(axis_Ptr axis_hdl) 313 { 314 CTimer::get("XIOS").resume(); 315 bool isDefined = axis_hdl->formula_bounds.hasInheritedValue(); 316 CTimer::get("XIOS").suspend(); 317 return isDefined; 318 } 319 320 321 void cxios_set_axis_formula_term(axis_Ptr axis_hdl, const char * formula_term, int formula_term_size) 322 { 323 std::string formula_term_str; 324 if (!cstr2string(formula_term, formula_term_size, formula_term_str)) return; 325 CTimer::get("XIOS").resume(); 326 axis_hdl->formula_term.setValue(formula_term_str); 327 CTimer::get("XIOS").suspend(); 328 } 329 330 void cxios_get_axis_formula_term(axis_Ptr axis_hdl, char * formula_term, int formula_term_size) 331 { 332 CTimer::get("XIOS").resume(); 333 if (!string_copy(axis_hdl->formula_term.getInheritedValue(), formula_term, formula_term_size)) 334 ERROR("void cxios_get_axis_formula_term(axis_Ptr axis_hdl, char * formula_term, int formula_term_size)", << "Input string is too short"); 335 CTimer::get("XIOS").suspend(); 336 } 337 338 bool cxios_is_defined_axis_formula_term(axis_Ptr axis_hdl) 339 { 340 CTimer::get("XIOS").resume(); 341 bool isDefined = axis_hdl->formula_term.hasInheritedValue(); 342 CTimer::get("XIOS").suspend(); 343 return isDefined; 344 } 345 346 347 void cxios_set_axis_formula_term_bounds(axis_Ptr axis_hdl, const char * formula_term_bounds, int formula_term_bounds_size) 348 { 349 std::string formula_term_bounds_str; 350 if (!cstr2string(formula_term_bounds, formula_term_bounds_size, formula_term_bounds_str)) return; 351 CTimer::get("XIOS").resume(); 352 axis_hdl->formula_term_bounds.setValue(formula_term_bounds_str); 353 CTimer::get("XIOS").suspend(); 354 } 355 356 void cxios_get_axis_formula_term_bounds(axis_Ptr axis_hdl, char * formula_term_bounds, int formula_term_bounds_size) 357 { 358 CTimer::get("XIOS").resume(); 359 if (!string_copy(axis_hdl->formula_term_bounds.getInheritedValue(), formula_term_bounds, formula_term_bounds_size)) 360 ERROR("void cxios_get_axis_formula_term_bounds(axis_Ptr axis_hdl, char * formula_term_bounds, int formula_term_bounds_size)", << "Input string is too short"); 361 CTimer::get("XIOS").suspend(); 362 } 363 364 bool cxios_is_defined_axis_formula_term_bounds(axis_Ptr axis_hdl) 365 { 366 CTimer::get("XIOS").resume(); 367 bool isDefined = axis_hdl->formula_term_bounds.hasInheritedValue(); 160 368 CTimer::get("XIOS").suspend(); 161 369 return isDefined; -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icaxisgroup_attr.cpp
r1158 r1492 44 44 45 45 46 void cxios_set_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, const char * axis_type, int axis_type_size) 47 { 48 std::string axis_type_str; 49 if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return; 50 CTimer::get("XIOS").resume(); 51 axisgroup_hdl->axis_type.fromString(axis_type_str); 52 CTimer::get("XIOS").suspend(); 53 } 54 55 void cxios_get_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, char * axis_type, int axis_type_size) 56 { 57 CTimer::get("XIOS").resume(); 58 if (!string_copy(axisgroup_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size)) 59 ERROR("void cxios_get_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, char * axis_type, int axis_type_size)", << "Input string is too short"); 60 CTimer::get("XIOS").suspend(); 61 } 62 63 bool cxios_is_defined_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl) 64 { 65 CTimer::get("XIOS").resume(); 66 bool isDefined = axisgroup_hdl->axis_type.hasInheritedValue(); 67 CTimer::get("XIOS").suspend(); 68 return isDefined; 69 } 70 71 46 72 void cxios_set_axisgroup_begin(axisgroup_Ptr axisgroup_hdl, int begin) 47 73 { … … 92 118 93 119 120 void cxios_set_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, const char * bounds_name, int bounds_name_size) 121 { 122 std::string bounds_name_str; 123 if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return; 124 CTimer::get("XIOS").resume(); 125 axisgroup_hdl->bounds_name.setValue(bounds_name_str); 126 CTimer::get("XIOS").suspend(); 127 } 128 129 void cxios_get_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, char * bounds_name, int bounds_name_size) 130 { 131 CTimer::get("XIOS").resume(); 132 if (!string_copy(axisgroup_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size)) 133 ERROR("void cxios_get_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short"); 134 CTimer::get("XIOS").suspend(); 135 } 136 137 bool cxios_is_defined_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl) 138 { 139 CTimer::get("XIOS").resume(); 140 bool isDefined = axisgroup_hdl->bounds_name.hasInheritedValue(); 141 CTimer::get("XIOS").suspend(); 142 return isDefined; 143 } 144 145 146 void cxios_set_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, const char * comment, int comment_size) 147 { 148 std::string comment_str; 149 if (!cstr2string(comment, comment_size, comment_str)) return; 150 CTimer::get("XIOS").resume(); 151 axisgroup_hdl->comment.setValue(comment_str); 152 CTimer::get("XIOS").suspend(); 153 } 154 155 void cxios_get_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, char * comment, int comment_size) 156 { 157 CTimer::get("XIOS").resume(); 158 if (!string_copy(axisgroup_hdl->comment.getInheritedValue(), comment, comment_size)) 159 ERROR("void cxios_get_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, char * comment, int comment_size)", << "Input string is too short"); 160 CTimer::get("XIOS").suspend(); 161 } 162 163 bool cxios_is_defined_axisgroup_comment(axisgroup_Ptr axisgroup_hdl) 164 { 165 CTimer::get("XIOS").resume(); 166 bool isDefined = axisgroup_hdl->comment.hasInheritedValue(); 167 CTimer::get("XIOS").suspend(); 168 return isDefined; 169 } 170 171 94 172 void cxios_set_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int data_begin) 95 173 { … … 158 236 CTimer::get("XIOS").resume(); 159 237 bool isDefined = axisgroup_hdl->data_n.hasInheritedValue(); 238 CTimer::get("XIOS").suspend(); 239 return isDefined; 240 } 241 242 243 void cxios_set_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, const char * dim_name, int dim_name_size) 244 { 245 std::string dim_name_str; 246 if (!cstr2string(dim_name, dim_name_size, dim_name_str)) return; 247 CTimer::get("XIOS").resume(); 248 axisgroup_hdl->dim_name.setValue(dim_name_str); 249 CTimer::get("XIOS").suspend(); 250 } 251 252 void cxios_get_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, char * dim_name, int dim_name_size) 253 { 254 CTimer::get("XIOS").resume(); 255 if (!string_copy(axisgroup_hdl->dim_name.getInheritedValue(), dim_name, dim_name_size)) 256 ERROR("void cxios_get_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, char * dim_name, int dim_name_size)", << "Input string is too short"); 257 CTimer::get("XIOS").suspend(); 258 } 259 260 bool cxios_is_defined_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl) 261 { 262 CTimer::get("XIOS").resume(); 263 bool isDefined = axisgroup_hdl->dim_name.hasInheritedValue(); 264 CTimer::get("XIOS").suspend(); 265 return isDefined; 266 } 267 268 269 void cxios_set_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, const char * formula, int formula_size) 270 { 271 std::string formula_str; 272 if (!cstr2string(formula, formula_size, formula_str)) return; 273 CTimer::get("XIOS").resume(); 274 axisgroup_hdl->formula.setValue(formula_str); 275 CTimer::get("XIOS").suspend(); 276 } 277 278 void cxios_get_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, char * formula, int formula_size) 279 { 280 CTimer::get("XIOS").resume(); 281 if (!string_copy(axisgroup_hdl->formula.getInheritedValue(), formula, formula_size)) 282 ERROR("void cxios_get_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, char * formula, int formula_size)", << "Input string is too short"); 283 CTimer::get("XIOS").suspend(); 284 } 285 286 bool cxios_is_defined_axisgroup_formula(axisgroup_Ptr axisgroup_hdl) 287 { 288 CTimer::get("XIOS").resume(); 289 bool isDefined = axisgroup_hdl->formula.hasInheritedValue(); 290 CTimer::get("XIOS").suspend(); 291 return isDefined; 292 } 293 294 295 void cxios_set_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, const char * formula_bounds, int formula_bounds_size) 296 { 297 std::string formula_bounds_str; 298 if (!cstr2string(formula_bounds, formula_bounds_size, formula_bounds_str)) return; 299 CTimer::get("XIOS").resume(); 300 axisgroup_hdl->formula_bounds.setValue(formula_bounds_str); 301 CTimer::get("XIOS").suspend(); 302 } 303 304 void cxios_get_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_bounds, int formula_bounds_size) 305 { 306 CTimer::get("XIOS").resume(); 307 if (!string_copy(axisgroup_hdl->formula_bounds.getInheritedValue(), formula_bounds, formula_bounds_size)) 308 ERROR("void cxios_get_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_bounds, int formula_bounds_size)", << "Input string is too short"); 309 CTimer::get("XIOS").suspend(); 310 } 311 312 bool cxios_is_defined_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl) 313 { 314 CTimer::get("XIOS").resume(); 315 bool isDefined = axisgroup_hdl->formula_bounds.hasInheritedValue(); 316 CTimer::get("XIOS").suspend(); 317 return isDefined; 318 } 319 320 321 void cxios_set_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, const char * formula_term, int formula_term_size) 322 { 323 std::string formula_term_str; 324 if (!cstr2string(formula_term, formula_term_size, formula_term_str)) return; 325 CTimer::get("XIOS").resume(); 326 axisgroup_hdl->formula_term.setValue(formula_term_str); 327 CTimer::get("XIOS").suspend(); 328 } 329 330 void cxios_get_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, char * formula_term, int formula_term_size) 331 { 332 CTimer::get("XIOS").resume(); 333 if (!string_copy(axisgroup_hdl->formula_term.getInheritedValue(), formula_term, formula_term_size)) 334 ERROR("void cxios_get_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, char * formula_term, int formula_term_size)", << "Input string is too short"); 335 CTimer::get("XIOS").suspend(); 336 } 337 338 bool cxios_is_defined_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl) 339 { 340 CTimer::get("XIOS").resume(); 341 bool isDefined = axisgroup_hdl->formula_term.hasInheritedValue(); 342 CTimer::get("XIOS").suspend(); 343 return isDefined; 344 } 345 346 347 void cxios_set_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, const char * formula_term_bounds, int formula_term_bounds_size) 348 { 349 std::string formula_term_bounds_str; 350 if (!cstr2string(formula_term_bounds, formula_term_bounds_size, formula_term_bounds_str)) return; 351 CTimer::get("XIOS").resume(); 352 axisgroup_hdl->formula_term_bounds.setValue(formula_term_bounds_str); 353 CTimer::get("XIOS").suspend(); 354 } 355 356 void cxios_get_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_term_bounds, int formula_term_bounds_size) 357 { 358 CTimer::get("XIOS").resume(); 359 if (!string_copy(axisgroup_hdl->formula_term_bounds.getInheritedValue(), formula_term_bounds, formula_term_bounds_size)) 360 ERROR("void cxios_get_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_term_bounds, int formula_term_bounds_size)", << "Input string is too short"); 361 CTimer::get("XIOS").suspend(); 362 } 363 364 bool cxios_is_defined_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl) 365 { 366 CTimer::get("XIOS").resume(); 367 bool isDefined = axisgroup_hdl->formula_term_bounds.hasInheritedValue(); 160 368 CTimer::get("XIOS").suspend(); 161 369 return isDefined; -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/iccalendar_wrapper_attr.cpp
r674 r1492 18 18 typedef xios::CCalendarWrapper* calendar_wrapper_Ptr; 19 19 20 void cxios_set_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * comment, int comment_size) 21 { 22 std::string comment_str; 23 if (!cstr2string(comment, comment_size, comment_str)) return; 24 CTimer::get("XIOS").resume(); 25 calendar_wrapper_hdl->comment.setValue(comment_str); 26 CTimer::get("XIOS").suspend(); 27 } 28 29 void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size) 30 { 31 CTimer::get("XIOS").resume(); 32 if (!string_copy(calendar_wrapper_hdl->comment.getInheritedValue(), comment, comment_size)) 33 ERROR("void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size)", << "Input string is too short"); 34 CTimer::get("XIOS").suspend(); 35 } 36 37 bool cxios_is_defined_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl) 38 { 39 CTimer::get("XIOS").resume(); 40 bool isDefined = calendar_wrapper_hdl->comment.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 43 } 44 45 20 46 void cxios_set_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int day_length) 21 47 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icdomain_attr.cpp
r1158 r1492 93 93 94 94 95 void cxios_set_domain_bounds_lat_name(domain_Ptr domain_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 domain_hdl->bounds_lat_name.setValue(bounds_lat_name_str); 101 CTimer::get("XIOS").suspend(); 102 } 103 104 void cxios_get_domain_bounds_lat_name(domain_Ptr domain_hdl, char * bounds_lat_name, int bounds_lat_name_size) 105 { 106 CTimer::get("XIOS").resume(); 107 if (!string_copy(domain_hdl->bounds_lat_name.getInheritedValue(), bounds_lat_name, bounds_lat_name_size)) 108 ERROR("void cxios_get_domain_bounds_lat_name(domain_Ptr domain_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_domain_bounds_lat_name(domain_Ptr domain_hdl) 113 { 114 CTimer::get("XIOS").resume(); 115 bool isDefined = domain_hdl->bounds_lat_name.hasInheritedValue(); 116 CTimer::get("XIOS").suspend(); 117 return isDefined; 118 } 119 120 95 121 void cxios_set_domain_bounds_lon_1d(domain_Ptr domain_hdl, double* bounds_lon_1d, int* extent) 96 122 { … … 143 169 144 170 171 void cxios_set_domain_bounds_lon_name(domain_Ptr domain_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 domain_hdl->bounds_lon_name.setValue(bounds_lon_name_str); 177 CTimer::get("XIOS").suspend(); 178 } 179 180 void cxios_get_domain_bounds_lon_name(domain_Ptr domain_hdl, char * bounds_lon_name, int bounds_lon_name_size) 181 { 182 CTimer::get("XIOS").resume(); 183 if (!string_copy(domain_hdl->bounds_lon_name.getInheritedValue(), bounds_lon_name, bounds_lon_name_size)) 184 ERROR("void cxios_get_domain_bounds_lon_name(domain_Ptr domain_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_domain_bounds_lon_name(domain_Ptr domain_hdl) 189 { 190 CTimer::get("XIOS").resume(); 191 bool isDefined = domain_hdl->bounds_lon_name.hasInheritedValue(); 192 CTimer::get("XIOS").suspend(); 193 return isDefined; 194 } 195 196 197 void cxios_set_domain_comment(domain_Ptr domain_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 domain_hdl->comment.setValue(comment_str); 203 CTimer::get("XIOS").suspend(); 204 } 205 206 void cxios_get_domain_comment(domain_Ptr domain_hdl, char * comment, int comment_size) 207 { 208 CTimer::get("XIOS").resume(); 209 if (!string_copy(domain_hdl->comment.getInheritedValue(), comment, comment_size)) 210 ERROR("void cxios_get_domain_comment(domain_Ptr domain_hdl, char * comment, int comment_size)", << "Input string is too short"); 211 CTimer::get("XIOS").suspend(); 212 } 213 214 bool cxios_is_defined_domain_comment(domain_Ptr domain_hdl) 215 { 216 CTimer::get("XIOS").resume(); 217 bool isDefined = domain_hdl->comment.hasInheritedValue(); 218 CTimer::get("XIOS").suspend(); 219 return isDefined; 220 } 221 222 145 223 void cxios_set_domain_data_dim(domain_Ptr domain_hdl, int data_dim) 146 224 { … … 308 386 309 387 388 void cxios_set_domain_dim_i_name(domain_Ptr domain_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 domain_hdl->dim_i_name.setValue(dim_i_name_str); 394 CTimer::get("XIOS").suspend(); 395 } 396 397 void cxios_get_domain_dim_i_name(domain_Ptr domain_hdl, char * dim_i_name, int dim_i_name_size) 398 { 399 CTimer::get("XIOS").resume(); 400 if (!string_copy(domain_hdl->dim_i_name.getInheritedValue(), dim_i_name, dim_i_name_size)) 401 ERROR("void cxios_get_domain_dim_i_name(domain_Ptr domain_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_domain_dim_i_name(domain_Ptr domain_hdl) 406 { 407 CTimer::get("XIOS").resume(); 408 bool isDefined = domain_hdl->dim_i_name.hasInheritedValue(); 409 CTimer::get("XIOS").suspend(); 410 return isDefined; 411 } 412 413 414 void cxios_set_domain_dim_j_name(domain_Ptr domain_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 domain_hdl->dim_j_name.setValue(dim_j_name_str); 420 CTimer::get("XIOS").suspend(); 421 } 422 423 void cxios_get_domain_dim_j_name(domain_Ptr domain_hdl, char * dim_j_name, int dim_j_name_size) 424 { 425 CTimer::get("XIOS").resume(); 426 if (!string_copy(domain_hdl->dim_j_name.getInheritedValue(), dim_j_name, dim_j_name_size)) 427 ERROR("void cxios_get_domain_dim_j_name(domain_Ptr domain_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_domain_dim_j_name(domain_Ptr domain_hdl) 432 { 433 CTimer::get("XIOS").resume(); 434 bool isDefined = domain_hdl->dim_j_name.hasInheritedValue(); 435 CTimer::get("XIOS").suspend(); 436 return isDefined; 437 } 438 439 310 440 void cxios_set_domain_domain_ref(domain_Ptr domain_hdl, const char * domain_ref, int domain_ref_size) 311 441 { … … 430 560 431 561 562 void cxios_set_domain_lat_name(domain_Ptr domain_hdl, const char * lat_name, int lat_name_size) 563 { 564 std::string lat_name_str; 565 if (!cstr2string(lat_name, lat_name_size, lat_name_str)) return; 566 CTimer::get("XIOS").resume(); 567 domain_hdl->lat_name.setValue(lat_name_str); 568 CTimer::get("XIOS").suspend(); 569 } 570 571 void cxios_get_domain_lat_name(domain_Ptr domain_hdl, char * lat_name, int lat_name_size) 572 { 573 CTimer::get("XIOS").resume(); 574 if (!string_copy(domain_hdl->lat_name.getInheritedValue(), lat_name, lat_name_size)) 575 ERROR("void cxios_get_domain_lat_name(domain_Ptr domain_hdl, char * lat_name, int lat_name_size)", << "Input string is too short"); 576 CTimer::get("XIOS").suspend(); 577 } 578 579 bool cxios_is_defined_domain_lat_name(domain_Ptr domain_hdl) 580 { 581 CTimer::get("XIOS").resume(); 582 bool isDefined = domain_hdl->lat_name.hasInheritedValue(); 583 CTimer::get("XIOS").suspend(); 584 return isDefined; 585 } 586 587 432 588 void cxios_set_domain_latvalue_1d(domain_Ptr domain_hdl, double* latvalue_1d, int* extent) 433 589 { … … 480 636 481 637 638 void cxios_set_domain_lon_name(domain_Ptr domain_hdl, const char * lon_name, int lon_name_size) 639 { 640 std::string lon_name_str; 641 if (!cstr2string(lon_name, lon_name_size, lon_name_str)) return; 642 CTimer::get("XIOS").resume(); 643 domain_hdl->lon_name.setValue(lon_name_str); 644 CTimer::get("XIOS").suspend(); 645 } 646 647 void cxios_get_domain_lon_name(domain_Ptr domain_hdl, char * lon_name, int lon_name_size) 648 { 649 CTimer::get("XIOS").resume(); 650 if (!string_copy(domain_hdl->lon_name.getInheritedValue(), lon_name, lon_name_size)) 651 ERROR("void cxios_get_domain_lon_name(domain_Ptr domain_hdl, char * lon_name, int lon_name_size)", << "Input string is too short"); 652 CTimer::get("XIOS").suspend(); 653 } 654 655 bool cxios_is_defined_domain_lon_name(domain_Ptr domain_hdl) 656 { 657 CTimer::get("XIOS").resume(); 658 bool isDefined = domain_hdl->lon_name.hasInheritedValue(); 659 CTimer::get("XIOS").suspend(); 660 return isDefined; 661 } 662 663 482 664 void cxios_set_domain_long_name(domain_Ptr domain_hdl, const char * long_name, int long_name_size) 483 665 { -
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 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icfield_attr.cpp
r1201 r1492 142 142 143 143 144 void cxios_set_field_comment(field_Ptr field_hdl, const char * comment, int comment_size) 145 { 146 std::string comment_str; 147 if (!cstr2string(comment, comment_size, comment_str)) return; 148 CTimer::get("XIOS").resume(); 149 field_hdl->comment.setValue(comment_str); 150 CTimer::get("XIOS").suspend(); 151 } 152 153 void cxios_get_field_comment(field_Ptr field_hdl, char * comment, int comment_size) 154 { 155 CTimer::get("XIOS").resume(); 156 if (!string_copy(field_hdl->comment.getInheritedValue(), comment, comment_size)) 157 ERROR("void cxios_get_field_comment(field_Ptr field_hdl, char * comment, int comment_size)", << "Input string is too short"); 158 CTimer::get("XIOS").suspend(); 159 } 160 161 bool cxios_is_defined_field_comment(field_Ptr field_hdl) 162 { 163 CTimer::get("XIOS").resume(); 164 bool isDefined = field_hdl->comment.hasInheritedValue(); 165 CTimer::get("XIOS").suspend(); 166 return isDefined; 167 } 168 169 144 170 void cxios_set_field_compression_level(field_Ptr field_hdl, int compression_level) 145 171 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icfieldgroup_attr.cpp
r1201 r1492 142 142 143 143 144 void cxios_set_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, const char * comment, int comment_size) 145 { 146 std::string comment_str; 147 if (!cstr2string(comment, comment_size, comment_str)) return; 148 CTimer::get("XIOS").resume(); 149 fieldgroup_hdl->comment.setValue(comment_str); 150 CTimer::get("XIOS").suspend(); 151 } 152 153 void cxios_get_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, char * comment, int comment_size) 154 { 155 CTimer::get("XIOS").resume(); 156 if (!string_copy(fieldgroup_hdl->comment.getInheritedValue(), comment, comment_size)) 157 ERROR("void cxios_get_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, char * comment, int comment_size)", << "Input string is too short"); 158 CTimer::get("XIOS").suspend(); 159 } 160 161 bool cxios_is_defined_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl) 162 { 163 CTimer::get("XIOS").resume(); 164 bool isDefined = fieldgroup_hdl->comment.hasInheritedValue(); 165 CTimer::get("XIOS").suspend(); 166 return isDefined; 167 } 168 169 144 170 void cxios_set_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int compression_level) 145 171 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icfile_attr.cpp
r1201 r1492 41 41 42 42 43 void cxios_set_file_comment(file_Ptr file_hdl, const char * comment, int comment_size) 44 { 45 std::string comment_str; 46 if (!cstr2string(comment, comment_size, comment_str)) return; 47 CTimer::get("XIOS").resume(); 48 file_hdl->comment.setValue(comment_str); 49 CTimer::get("XIOS").suspend(); 50 } 51 52 void cxios_get_file_comment(file_Ptr file_hdl, char * comment, int comment_size) 53 { 54 CTimer::get("XIOS").resume(); 55 if (!string_copy(file_hdl->comment.getInheritedValue(), comment, comment_size)) 56 ERROR("void cxios_get_file_comment(file_Ptr file_hdl, char * comment, int comment_size)", << "Input string is too short"); 57 CTimer::get("XIOS").suspend(); 58 } 59 60 bool cxios_is_defined_file_comment(file_Ptr file_hdl) 61 { 62 CTimer::get("XIOS").resume(); 63 bool isDefined = file_hdl->comment.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 66 } 67 68 43 69 void cxios_set_file_compression_level(file_Ptr file_hdl, int compression_level) 44 70 { … … 402 428 403 429 430 void cxios_set_file_read_metadata_par(file_Ptr file_hdl, bool read_metadata_par) 431 { 432 CTimer::get("XIOS").resume(); 433 file_hdl->read_metadata_par.setValue(read_metadata_par); 434 CTimer::get("XIOS").suspend(); 435 } 436 437 void cxios_get_file_read_metadata_par(file_Ptr file_hdl, bool* read_metadata_par) 438 { 439 CTimer::get("XIOS").resume(); 440 *read_metadata_par = file_hdl->read_metadata_par.getInheritedValue(); 441 CTimer::get("XIOS").suspend(); 442 } 443 444 bool cxios_is_defined_file_read_metadata_par(file_Ptr file_hdl) 445 { 446 CTimer::get("XIOS").resume(); 447 bool isDefined = file_hdl->read_metadata_par.hasInheritedValue(); 448 CTimer::get("XIOS").suspend(); 449 return isDefined; 450 } 451 452 404 453 void cxios_set_file_record_offset(file_Ptr file_hdl, int record_offset) 405 454 { … … 420 469 CTimer::get("XIOS").resume(); 421 470 bool isDefined = file_hdl->record_offset.hasInheritedValue(); 471 CTimer::get("XIOS").suspend(); 472 return isDefined; 473 } 474 475 476 void cxios_set_file_split_end_offset(file_Ptr file_hdl, cxios_duration split_end_offset_c) 477 { 478 CTimer::get("XIOS").resume(); 479 file_hdl->split_end_offset.allocate(); 480 CDuration& split_end_offset = file_hdl->split_end_offset.get(); 481 split_end_offset.year = split_end_offset_c.year; 482 split_end_offset.month = split_end_offset_c.month; 483 split_end_offset.day = split_end_offset_c.day; 484 split_end_offset.hour = split_end_offset_c.hour; 485 split_end_offset.minute = split_end_offset_c.minute; 486 split_end_offset.second = split_end_offset_c.second; 487 split_end_offset.timestep = split_end_offset_c.timestep; 488 CTimer::get("XIOS").suspend(); 489 } 490 491 void cxios_get_file_split_end_offset(file_Ptr file_hdl, cxios_duration* split_end_offset_c) 492 { 493 CTimer::get("XIOS").resume(); 494 CDuration split_end_offset = file_hdl->split_end_offset.getInheritedValue(); 495 split_end_offset_c->year = split_end_offset.year; 496 split_end_offset_c->month = split_end_offset.month; 497 split_end_offset_c->day = split_end_offset.day; 498 split_end_offset_c->hour = split_end_offset.hour; 499 split_end_offset_c->minute = split_end_offset.minute; 500 split_end_offset_c->second = split_end_offset.second; 501 split_end_offset_c->timestep = split_end_offset.timestep; 502 CTimer::get("XIOS").suspend(); 503 } 504 505 bool cxios_is_defined_file_split_end_offset(file_Ptr file_hdl) 506 { 507 CTimer::get("XIOS").resume(); 508 bool isDefined = file_hdl->split_end_offset.hasInheritedValue(); 422 509 CTimer::get("XIOS").suspend(); 423 510 return isDefined; … … 489 576 490 577 578 void cxios_set_file_split_last_date(file_Ptr file_hdl, const char * split_last_date, int split_last_date_size) 579 { 580 std::string split_last_date_str; 581 if (!cstr2string(split_last_date, split_last_date_size, split_last_date_str)) return; 582 CTimer::get("XIOS").resume(); 583 file_hdl->split_last_date.setValue(split_last_date_str); 584 CTimer::get("XIOS").suspend(); 585 } 586 587 void cxios_get_file_split_last_date(file_Ptr file_hdl, char * split_last_date, int split_last_date_size) 588 { 589 CTimer::get("XIOS").resume(); 590 if (!string_copy(file_hdl->split_last_date.getInheritedValue(), split_last_date, split_last_date_size)) 591 ERROR("void cxios_get_file_split_last_date(file_Ptr file_hdl, char * split_last_date, int split_last_date_size)", << "Input string is too short"); 592 CTimer::get("XIOS").suspend(); 593 } 594 595 bool cxios_is_defined_file_split_last_date(file_Ptr file_hdl) 596 { 597 CTimer::get("XIOS").resume(); 598 bool isDefined = file_hdl->split_last_date.hasInheritedValue(); 599 CTimer::get("XIOS").suspend(); 600 return isDefined; 601 } 602 603 604 void cxios_set_file_split_start_offset(file_Ptr file_hdl, cxios_duration split_start_offset_c) 605 { 606 CTimer::get("XIOS").resume(); 607 file_hdl->split_start_offset.allocate(); 608 CDuration& split_start_offset = file_hdl->split_start_offset.get(); 609 split_start_offset.year = split_start_offset_c.year; 610 split_start_offset.month = split_start_offset_c.month; 611 split_start_offset.day = split_start_offset_c.day; 612 split_start_offset.hour = split_start_offset_c.hour; 613 split_start_offset.minute = split_start_offset_c.minute; 614 split_start_offset.second = split_start_offset_c.second; 615 split_start_offset.timestep = split_start_offset_c.timestep; 616 CTimer::get("XIOS").suspend(); 617 } 618 619 void cxios_get_file_split_start_offset(file_Ptr file_hdl, cxios_duration* split_start_offset_c) 620 { 621 CTimer::get("XIOS").resume(); 622 CDuration split_start_offset = file_hdl->split_start_offset.getInheritedValue(); 623 split_start_offset_c->year = split_start_offset.year; 624 split_start_offset_c->month = split_start_offset.month; 625 split_start_offset_c->day = split_start_offset.day; 626 split_start_offset_c->hour = split_start_offset.hour; 627 split_start_offset_c->minute = split_start_offset.minute; 628 split_start_offset_c->second = split_start_offset.second; 629 split_start_offset_c->timestep = split_start_offset.timestep; 630 CTimer::get("XIOS").suspend(); 631 } 632 633 bool cxios_is_defined_file_split_start_offset(file_Ptr file_hdl) 634 { 635 CTimer::get("XIOS").resume(); 636 bool isDefined = file_hdl->split_start_offset.hasInheritedValue(); 637 CTimer::get("XIOS").suspend(); 638 return isDefined; 639 } 640 641 491 642 void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c) 492 643 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icfilegroup_attr.cpp
r1201 r1492 41 41 42 42 43 void cxios_set_filegroup_comment(filegroup_Ptr filegroup_hdl, const char * comment, int comment_size) 44 { 45 std::string comment_str; 46 if (!cstr2string(comment, comment_size, comment_str)) return; 47 CTimer::get("XIOS").resume(); 48 filegroup_hdl->comment.setValue(comment_str); 49 CTimer::get("XIOS").suspend(); 50 } 51 52 void cxios_get_filegroup_comment(filegroup_Ptr filegroup_hdl, char * comment, int comment_size) 53 { 54 CTimer::get("XIOS").resume(); 55 if (!string_copy(filegroup_hdl->comment.getInheritedValue(), comment, comment_size)) 56 ERROR("void cxios_get_filegroup_comment(filegroup_Ptr filegroup_hdl, char * comment, int comment_size)", << "Input string is too short"); 57 CTimer::get("XIOS").suspend(); 58 } 59 60 bool cxios_is_defined_filegroup_comment(filegroup_Ptr filegroup_hdl) 61 { 62 CTimer::get("XIOS").resume(); 63 bool isDefined = filegroup_hdl->comment.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 66 } 67 68 43 69 void cxios_set_filegroup_compression_level(filegroup_Ptr filegroup_hdl, int compression_level) 44 70 { … … 428 454 429 455 456 void cxios_set_filegroup_read_metadata_par(filegroup_Ptr filegroup_hdl, bool read_metadata_par) 457 { 458 CTimer::get("XIOS").resume(); 459 filegroup_hdl->read_metadata_par.setValue(read_metadata_par); 460 CTimer::get("XIOS").suspend(); 461 } 462 463 void cxios_get_filegroup_read_metadata_par(filegroup_Ptr filegroup_hdl, bool* read_metadata_par) 464 { 465 CTimer::get("XIOS").resume(); 466 *read_metadata_par = filegroup_hdl->read_metadata_par.getInheritedValue(); 467 CTimer::get("XIOS").suspend(); 468 } 469 470 bool cxios_is_defined_filegroup_read_metadata_par(filegroup_Ptr filegroup_hdl) 471 { 472 CTimer::get("XIOS").resume(); 473 bool isDefined = filegroup_hdl->read_metadata_par.hasInheritedValue(); 474 CTimer::get("XIOS").suspend(); 475 return isDefined; 476 } 477 478 430 479 void cxios_set_filegroup_record_offset(filegroup_Ptr filegroup_hdl, int record_offset) 431 480 { … … 446 495 CTimer::get("XIOS").resume(); 447 496 bool isDefined = filegroup_hdl->record_offset.hasInheritedValue(); 497 CTimer::get("XIOS").suspend(); 498 return isDefined; 499 } 500 501 502 void cxios_set_filegroup_split_end_offset(filegroup_Ptr filegroup_hdl, cxios_duration split_end_offset_c) 503 { 504 CTimer::get("XIOS").resume(); 505 filegroup_hdl->split_end_offset.allocate(); 506 CDuration& split_end_offset = filegroup_hdl->split_end_offset.get(); 507 split_end_offset.year = split_end_offset_c.year; 508 split_end_offset.month = split_end_offset_c.month; 509 split_end_offset.day = split_end_offset_c.day; 510 split_end_offset.hour = split_end_offset_c.hour; 511 split_end_offset.minute = split_end_offset_c.minute; 512 split_end_offset.second = split_end_offset_c.second; 513 split_end_offset.timestep = split_end_offset_c.timestep; 514 CTimer::get("XIOS").suspend(); 515 } 516 517 void cxios_get_filegroup_split_end_offset(filegroup_Ptr filegroup_hdl, cxios_duration* split_end_offset_c) 518 { 519 CTimer::get("XIOS").resume(); 520 CDuration split_end_offset = filegroup_hdl->split_end_offset.getInheritedValue(); 521 split_end_offset_c->year = split_end_offset.year; 522 split_end_offset_c->month = split_end_offset.month; 523 split_end_offset_c->day = split_end_offset.day; 524 split_end_offset_c->hour = split_end_offset.hour; 525 split_end_offset_c->minute = split_end_offset.minute; 526 split_end_offset_c->second = split_end_offset.second; 527 split_end_offset_c->timestep = split_end_offset.timestep; 528 CTimer::get("XIOS").suspend(); 529 } 530 531 bool cxios_is_defined_filegroup_split_end_offset(filegroup_Ptr filegroup_hdl) 532 { 533 CTimer::get("XIOS").resume(); 534 bool isDefined = filegroup_hdl->split_end_offset.hasInheritedValue(); 448 535 CTimer::get("XIOS").suspend(); 449 536 return isDefined; … … 515 602 516 603 604 void cxios_set_filegroup_split_last_date(filegroup_Ptr filegroup_hdl, const char * split_last_date, int split_last_date_size) 605 { 606 std::string split_last_date_str; 607 if (!cstr2string(split_last_date, split_last_date_size, split_last_date_str)) return; 608 CTimer::get("XIOS").resume(); 609 filegroup_hdl->split_last_date.setValue(split_last_date_str); 610 CTimer::get("XIOS").suspend(); 611 } 612 613 void cxios_get_filegroup_split_last_date(filegroup_Ptr filegroup_hdl, char * split_last_date, int split_last_date_size) 614 { 615 CTimer::get("XIOS").resume(); 616 if (!string_copy(filegroup_hdl->split_last_date.getInheritedValue(), split_last_date, split_last_date_size)) 617 ERROR("void cxios_get_filegroup_split_last_date(filegroup_Ptr filegroup_hdl, char * split_last_date, int split_last_date_size)", << "Input string is too short"); 618 CTimer::get("XIOS").suspend(); 619 } 620 621 bool cxios_is_defined_filegroup_split_last_date(filegroup_Ptr filegroup_hdl) 622 { 623 CTimer::get("XIOS").resume(); 624 bool isDefined = filegroup_hdl->split_last_date.hasInheritedValue(); 625 CTimer::get("XIOS").suspend(); 626 return isDefined; 627 } 628 629 630 void cxios_set_filegroup_split_start_offset(filegroup_Ptr filegroup_hdl, cxios_duration split_start_offset_c) 631 { 632 CTimer::get("XIOS").resume(); 633 filegroup_hdl->split_start_offset.allocate(); 634 CDuration& split_start_offset = filegroup_hdl->split_start_offset.get(); 635 split_start_offset.year = split_start_offset_c.year; 636 split_start_offset.month = split_start_offset_c.month; 637 split_start_offset.day = split_start_offset_c.day; 638 split_start_offset.hour = split_start_offset_c.hour; 639 split_start_offset.minute = split_start_offset_c.minute; 640 split_start_offset.second = split_start_offset_c.second; 641 split_start_offset.timestep = split_start_offset_c.timestep; 642 CTimer::get("XIOS").suspend(); 643 } 644 645 void cxios_get_filegroup_split_start_offset(filegroup_Ptr filegroup_hdl, cxios_duration* split_start_offset_c) 646 { 647 CTimer::get("XIOS").resume(); 648 CDuration split_start_offset = filegroup_hdl->split_start_offset.getInheritedValue(); 649 split_start_offset_c->year = split_start_offset.year; 650 split_start_offset_c->month = split_start_offset.month; 651 split_start_offset_c->day = split_start_offset.day; 652 split_start_offset_c->hour = split_start_offset.hour; 653 split_start_offset_c->minute = split_start_offset.minute; 654 split_start_offset_c->second = split_start_offset.second; 655 split_start_offset_c->timestep = split_start_offset.timestep; 656 CTimer::get("XIOS").suspend(); 657 } 658 659 bool cxios_is_defined_filegroup_split_start_offset(filegroup_Ptr filegroup_hdl) 660 { 661 CTimer::get("XIOS").resume(); 662 bool isDefined = filegroup_hdl->split_start_offset.hasInheritedValue(); 663 CTimer::get("XIOS").suspend(); 664 return isDefined; 665 } 666 667 517 668 void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, cxios_duration sync_freq_c) 518 669 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icgrid_attr.cpp
r932 r1492 18 18 typedef xios::CGrid* grid_Ptr; 19 19 20 void cxios_set_grid_comment(grid_Ptr grid_hdl, const char * comment, int comment_size) 21 { 22 std::string comment_str; 23 if (!cstr2string(comment, comment_size, comment_str)) return; 24 CTimer::get("XIOS").resume(); 25 grid_hdl->comment.setValue(comment_str); 26 CTimer::get("XIOS").suspend(); 27 } 28 29 void cxios_get_grid_comment(grid_Ptr grid_hdl, char * comment, int comment_size) 30 { 31 CTimer::get("XIOS").resume(); 32 if (!string_copy(grid_hdl->comment.getInheritedValue(), comment, comment_size)) 33 ERROR("void cxios_get_grid_comment(grid_Ptr grid_hdl, char * comment, int comment_size)", << "Input string is too short"); 34 CTimer::get("XIOS").suspend(); 35 } 36 37 bool cxios_is_defined_grid_comment(grid_Ptr grid_hdl) 38 { 39 CTimer::get("XIOS").resume(); 40 bool isDefined = grid_hdl->comment.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 43 } 44 45 20 46 void cxios_set_grid_description(grid_Ptr grid_hdl, const char * description, int description_size) 21 47 { … … 44 70 45 71 72 void cxios_set_grid_mask_0d(grid_Ptr grid_hdl, bool* mask_0d, int* extent) 73 { 74 CTimer::get("XIOS").resume(); 75 CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 76 grid_hdl->mask_0d.reference(tmp.copy()); 77 CTimer::get("XIOS").suspend(); 78 } 79 80 void cxios_get_grid_mask_0d(grid_Ptr grid_hdl, bool* mask_0d, int* extent) 81 { 82 CTimer::get("XIOS").resume(); 83 CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 84 tmp=grid_hdl->mask_0d.getInheritedValue(); 85 CTimer::get("XIOS").suspend(); 86 } 87 88 bool cxios_is_defined_grid_mask_0d(grid_Ptr grid_hdl) 89 { 90 CTimer::get("XIOS").resume(); 91 bool isDefined = grid_hdl->mask_0d.hasInheritedValue(); 92 CTimer::get("XIOS").suspend(); 93 return isDefined; 94 } 95 96 46 97 void cxios_set_grid_mask_1d(grid_Ptr grid_hdl, bool* mask_1d, int* extent) 47 98 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icgridgroup_attr.cpp
r932 r1492 18 18 typedef xios::CGridGroup* gridgroup_Ptr; 19 19 20 void cxios_set_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, const char * comment, int comment_size) 21 { 22 std::string comment_str; 23 if (!cstr2string(comment, comment_size, comment_str)) return; 24 CTimer::get("XIOS").resume(); 25 gridgroup_hdl->comment.setValue(comment_str); 26 CTimer::get("XIOS").suspend(); 27 } 28 29 void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size) 30 { 31 CTimer::get("XIOS").resume(); 32 if (!string_copy(gridgroup_hdl->comment.getInheritedValue(), comment, comment_size)) 33 ERROR("void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size)", << "Input string is too short"); 34 CTimer::get("XIOS").suspend(); 35 } 36 37 bool cxios_is_defined_gridgroup_comment(gridgroup_Ptr gridgroup_hdl) 38 { 39 CTimer::get("XIOS").resume(); 40 bool isDefined = gridgroup_hdl->comment.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 43 } 44 45 20 46 void cxios_set_gridgroup_description(gridgroup_Ptr gridgroup_hdl, const char * description, int description_size) 21 47 { … … 70 96 71 97 98 void cxios_set_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent) 99 { 100 CTimer::get("XIOS").resume(); 101 CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 102 gridgroup_hdl->mask_0d.reference(tmp.copy()); 103 CTimer::get("XIOS").suspend(); 104 } 105 106 void cxios_get_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent) 107 { 108 CTimer::get("XIOS").resume(); 109 CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData); 110 tmp=gridgroup_hdl->mask_0d.getInheritedValue(); 111 CTimer::get("XIOS").suspend(); 112 } 113 114 bool cxios_is_defined_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl) 115 { 116 CTimer::get("XIOS").resume(); 117 bool isDefined = gridgroup_hdl->mask_0d.hasInheritedValue(); 118 CTimer::get("XIOS").suspend(); 119 return isDefined; 120 } 121 122 72 123 void cxios_set_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent) 73 124 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icinterpolate_domain_attr.cpp
r1201 r1492 18 18 typedef xios::CInterpolateDomain* interpolate_domain_Ptr; 19 19 20 void cxios_set_interpolate_domain_detect_missing_value(interpolate_domain_Ptr interpolate_domain_hdl, bool detect_missing_value) 21 { 22 CTimer::get("XIOS").resume(); 23 interpolate_domain_hdl->detect_missing_value.setValue(detect_missing_value); 24 CTimer::get("XIOS").suspend(); 25 } 26 27 void cxios_get_interpolate_domain_detect_missing_value(interpolate_domain_Ptr interpolate_domain_hdl, bool* detect_missing_value) 28 { 29 CTimer::get("XIOS").resume(); 30 *detect_missing_value = interpolate_domain_hdl->detect_missing_value.getInheritedValue(); 31 CTimer::get("XIOS").suspend(); 32 } 33 34 bool cxios_is_defined_interpolate_domain_detect_missing_value(interpolate_domain_Ptr interpolate_domain_hdl) 35 { 36 CTimer::get("XIOS").resume(); 37 bool isDefined = interpolate_domain_hdl->detect_missing_value.hasInheritedValue(); 38 CTimer::get("XIOS").suspend(); 39 return isDefined; 40 } 41 42 20 43 void cxios_set_interpolate_domain_mode(interpolate_domain_Ptr interpolate_domain_hdl, const char * mode, int mode_size) 21 44 { … … 90 113 91 114 115 void cxios_set_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl, const char * read_write_convention, int read_write_convention_size) 116 { 117 std::string read_write_convention_str; 118 if (!cstr2string(read_write_convention, read_write_convention_size, read_write_convention_str)) return; 119 CTimer::get("XIOS").resume(); 120 interpolate_domain_hdl->read_write_convention.fromString(read_write_convention_str); 121 CTimer::get("XIOS").suspend(); 122 } 123 124 void cxios_get_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl, char * read_write_convention, int read_write_convention_size) 125 { 126 CTimer::get("XIOS").resume(); 127 if (!string_copy(interpolate_domain_hdl->read_write_convention.getInheritedStringValue(), read_write_convention, read_write_convention_size)) 128 ERROR("void cxios_get_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl, char * read_write_convention, int read_write_convention_size)", << "Input string is too short"); 129 CTimer::get("XIOS").suspend(); 130 } 131 132 bool cxios_is_defined_interpolate_domain_read_write_convention(interpolate_domain_Ptr interpolate_domain_hdl) 133 { 134 CTimer::get("XIOS").resume(); 135 bool isDefined = interpolate_domain_hdl->read_write_convention.hasInheritedValue(); 136 CTimer::get("XIOS").suspend(); 137 return isDefined; 138 } 139 140 92 141 void cxios_set_interpolate_domain_renormalize(interpolate_domain_Ptr interpolate_domain_hdl, bool renormalize) 93 142 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icreduce_domain_to_axis_attr.cpp
r981 r1492 44 44 45 45 46 void cxios_set_reduce_domain_to_axis_local(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, bool local) 47 { 48 CTimer::get("XIOS").resume(); 49 reduce_domain_to_axis_hdl->local.setValue(local); 50 CTimer::get("XIOS").suspend(); 51 } 52 53 void cxios_get_reduce_domain_to_axis_local(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, bool* local) 54 { 55 CTimer::get("XIOS").resume(); 56 *local = reduce_domain_to_axis_hdl->local.getInheritedValue(); 57 CTimer::get("XIOS").suspend(); 58 } 59 60 bool cxios_is_defined_reduce_domain_to_axis_local(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl) 61 { 62 CTimer::get("XIOS").resume(); 63 bool isDefined = reduce_domain_to_axis_hdl->local.hasInheritedValue(); 64 CTimer::get("XIOS").suspend(); 65 return isDefined; 66 } 67 68 46 69 void cxios_set_reduce_domain_to_axis_operation(reduce_domain_to_axis_Ptr reduce_domain_to_axis_hdl, const char * operation, int operation_size) 47 70 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icreduce_domain_to_scalar_attr.cpp
r981 r1492 17 17 { 18 18 typedef xios::CReduceDomainToScalar* reduce_domain_to_scalar_Ptr; 19 20 void cxios_set_reduce_domain_to_scalar_local(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, bool local) 21 { 22 CTimer::get("XIOS").resume(); 23 reduce_domain_to_scalar_hdl->local.setValue(local); 24 CTimer::get("XIOS").suspend(); 25 } 26 27 void cxios_get_reduce_domain_to_scalar_local(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, bool* local) 28 { 29 CTimer::get("XIOS").resume(); 30 *local = reduce_domain_to_scalar_hdl->local.getInheritedValue(); 31 CTimer::get("XIOS").suspend(); 32 } 33 34 bool cxios_is_defined_reduce_domain_to_scalar_local(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl) 35 { 36 CTimer::get("XIOS").resume(); 37 bool isDefined = reduce_domain_to_scalar_hdl->local.hasInheritedValue(); 38 CTimer::get("XIOS").suspend(); 39 return isDefined; 40 } 41 19 42 20 43 void cxios_set_reduce_domain_to_scalar_operation(reduce_domain_to_scalar_Ptr reduce_domain_to_scalar_hdl, const char * operation, int operation_size) -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icscalar_attr.cpp
r1158 r1492 18 18 typedef xios::CScalar* scalar_Ptr; 19 19 20 void cxios_set_scalar_axis_type(scalar_Ptr scalar_hdl, const char * axis_type, int axis_type_size) 21 { 22 std::string axis_type_str; 23 if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return; 24 CTimer::get("XIOS").resume(); 25 scalar_hdl->axis_type.fromString(axis_type_str); 26 CTimer::get("XIOS").suspend(); 27 } 28 29 void cxios_get_scalar_axis_type(scalar_Ptr scalar_hdl, char * axis_type, int axis_type_size) 30 { 31 CTimer::get("XIOS").resume(); 32 if (!string_copy(scalar_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size)) 33 ERROR("void cxios_get_scalar_axis_type(scalar_Ptr scalar_hdl, char * axis_type, int axis_type_size)", << "Input string is too short"); 34 CTimer::get("XIOS").suspend(); 35 } 36 37 bool cxios_is_defined_scalar_axis_type(scalar_Ptr scalar_hdl) 38 { 39 CTimer::get("XIOS").resume(); 40 bool isDefined = scalar_hdl->axis_type.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 43 } 44 45 46 void cxios_set_scalar_bounds(scalar_Ptr scalar_hdl, double* bounds, int* extent) 47 { 48 CTimer::get("XIOS").resume(); 49 CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData); 50 scalar_hdl->bounds.reference(tmp.copy()); 51 CTimer::get("XIOS").suspend(); 52 } 53 54 void cxios_get_scalar_bounds(scalar_Ptr scalar_hdl, double* bounds, int* extent) 55 { 56 CTimer::get("XIOS").resume(); 57 CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData); 58 tmp=scalar_hdl->bounds.getInheritedValue(); 59 CTimer::get("XIOS").suspend(); 60 } 61 62 bool cxios_is_defined_scalar_bounds(scalar_Ptr scalar_hdl) 63 { 64 CTimer::get("XIOS").resume(); 65 bool isDefined = scalar_hdl->bounds.hasInheritedValue(); 66 CTimer::get("XIOS").suspend(); 67 return isDefined; 68 } 69 70 71 void cxios_set_scalar_bounds_name(scalar_Ptr scalar_hdl, const char * bounds_name, int bounds_name_size) 72 { 73 std::string bounds_name_str; 74 if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return; 75 CTimer::get("XIOS").resume(); 76 scalar_hdl->bounds_name.setValue(bounds_name_str); 77 CTimer::get("XIOS").suspend(); 78 } 79 80 void cxios_get_scalar_bounds_name(scalar_Ptr scalar_hdl, char * bounds_name, int bounds_name_size) 81 { 82 CTimer::get("XIOS").resume(); 83 if (!string_copy(scalar_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size)) 84 ERROR("void cxios_get_scalar_bounds_name(scalar_Ptr scalar_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short"); 85 CTimer::get("XIOS").suspend(); 86 } 87 88 bool cxios_is_defined_scalar_bounds_name(scalar_Ptr scalar_hdl) 89 { 90 CTimer::get("XIOS").resume(); 91 bool isDefined = scalar_hdl->bounds_name.hasInheritedValue(); 92 CTimer::get("XIOS").suspend(); 93 return isDefined; 94 } 95 96 97 void cxios_set_scalar_comment(scalar_Ptr scalar_hdl, const char * comment, int comment_size) 98 { 99 std::string comment_str; 100 if (!cstr2string(comment, comment_size, comment_str)) return; 101 CTimer::get("XIOS").resume(); 102 scalar_hdl->comment.setValue(comment_str); 103 CTimer::get("XIOS").suspend(); 104 } 105 106 void cxios_get_scalar_comment(scalar_Ptr scalar_hdl, char * comment, int comment_size) 107 { 108 CTimer::get("XIOS").resume(); 109 if (!string_copy(scalar_hdl->comment.getInheritedValue(), comment, comment_size)) 110 ERROR("void cxios_get_scalar_comment(scalar_Ptr scalar_hdl, char * comment, int comment_size)", << "Input string is too short"); 111 CTimer::get("XIOS").suspend(); 112 } 113 114 bool cxios_is_defined_scalar_comment(scalar_Ptr scalar_hdl) 115 { 116 CTimer::get("XIOS").resume(); 117 bool isDefined = scalar_hdl->comment.hasInheritedValue(); 118 CTimer::get("XIOS").suspend(); 119 return isDefined; 120 } 121 122 123 void cxios_set_scalar_label(scalar_Ptr scalar_hdl, const char * label, int label_size) 124 { 125 std::string label_str; 126 if (!cstr2string(label, label_size, label_str)) return; 127 CTimer::get("XIOS").resume(); 128 scalar_hdl->label.setValue(label_str); 129 CTimer::get("XIOS").suspend(); 130 } 131 132 void cxios_get_scalar_label(scalar_Ptr scalar_hdl, char * label, int label_size) 133 { 134 CTimer::get("XIOS").resume(); 135 if (!string_copy(scalar_hdl->label.getInheritedValue(), label, label_size)) 136 ERROR("void cxios_get_scalar_label(scalar_Ptr scalar_hdl, char * label, int label_size)", << "Input string is too short"); 137 CTimer::get("XIOS").suspend(); 138 } 139 140 bool cxios_is_defined_scalar_label(scalar_Ptr scalar_hdl) 141 { 142 CTimer::get("XIOS").resume(); 143 bool isDefined = scalar_hdl->label.hasInheritedValue(); 144 CTimer::get("XIOS").suspend(); 145 return isDefined; 146 } 147 148 20 149 void cxios_set_scalar_long_name(scalar_Ptr scalar_hdl, const char * long_name, int long_name_size) 21 150 { … … 70 199 71 200 201 void cxios_set_scalar_positive(scalar_Ptr scalar_hdl, const char * positive, int positive_size) 202 { 203 std::string positive_str; 204 if (!cstr2string(positive, positive_size, positive_str)) return; 205 CTimer::get("XIOS").resume(); 206 scalar_hdl->positive.fromString(positive_str); 207 CTimer::get("XIOS").suspend(); 208 } 209 210 void cxios_get_scalar_positive(scalar_Ptr scalar_hdl, char * positive, int positive_size) 211 { 212 CTimer::get("XIOS").resume(); 213 if (!string_copy(scalar_hdl->positive.getInheritedStringValue(), positive, positive_size)) 214 ERROR("void cxios_get_scalar_positive(scalar_Ptr scalar_hdl, char * positive, int positive_size)", << "Input string is too short"); 215 CTimer::get("XIOS").suspend(); 216 } 217 218 bool cxios_is_defined_scalar_positive(scalar_Ptr scalar_hdl) 219 { 220 CTimer::get("XIOS").resume(); 221 bool isDefined = scalar_hdl->positive.hasInheritedValue(); 222 CTimer::get("XIOS").suspend(); 223 return isDefined; 224 } 225 226 72 227 void cxios_set_scalar_prec(scalar_Ptr scalar_hdl, int prec) 73 228 { -
XIOS/dev/XIOS_DEV_CMIP6/src/interface/c_attr/icscalargroup_attr.cpp
r1158 r1492 18 18 typedef xios::CScalarGroup* scalargroup_Ptr; 19 19 20 void cxios_set_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, const char * axis_type, int axis_type_size) 21 { 22 std::string axis_type_str; 23 if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return; 24 CTimer::get("XIOS").resume(); 25 scalargroup_hdl->axis_type.fromString(axis_type_str); 26 CTimer::get("XIOS").suspend(); 27 } 28 29 void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char * axis_type, int axis_type_size) 30 { 31 CTimer::get("XIOS").resume(); 32 if (!string_copy(scalargroup_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size)) 33 ERROR("void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char * axis_type, int axis_type_size)", << "Input string is too short"); 34 CTimer::get("XIOS").suspend(); 35 } 36 37 bool cxios_is_defined_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl) 38 { 39 CTimer::get("XIOS").resume(); 40 bool isDefined = scalargroup_hdl->axis_type.hasInheritedValue(); 41 CTimer::get("XIOS").suspend(); 42 return isDefined; 43 } 44 45 46 void cxios_set_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double* bounds, int* extent) 47 { 48 CTimer::get("XIOS").resume(); 49 CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData); 50 scalargroup_hdl->bounds.reference(tmp.copy()); 51 CTimer::get("XIOS").suspend(); 52 } 53 54 void cxios_get_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double* bounds, int* extent) 55 { 56 CTimer::get("XIOS").resume(); 57 CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData); 58 tmp=scalargroup_hdl->bounds.getInheritedValue(); 59 CTimer::get("XIOS").suspend(); 60 } 61 62 bool cxios_is_defined_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl) 63 { 64 CTimer::get("XIOS").resume(); 65 bool isDefined = scalargroup_hdl->bounds.hasInheritedValue(); 66 CTimer::get("XIOS").suspend(); 67 return isDefined; 68 } 69 70 71 void cxios_set_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, const char * bounds_name, int bounds_name_size) 72 { 73 std::string bounds_name_str; 74 if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return; 75 CTimer::get("XIOS").resume(); 76 scalargroup_hdl->bounds_name.setValue(bounds_name_str); 77 CTimer::get("XIOS").suspend(); 78 } 79 80 void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char * bounds_name, int bounds_name_size) 81 { 82 CTimer::get("XIOS").resume(); 83 if (!string_copy(scalargroup_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size)) 84 ERROR("void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short"); 85 CTimer::get("XIOS").suspend(); 86 } 87 88 bool cxios_is_defined_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl) 89 { 90 CTimer::get("XIOS").resume(); 91 bool isDefined = scalargroup_hdl->bounds_name.hasInheritedValue(); 92 CTimer::get("XIOS").suspend(); 93 return isDefined; 94 } 95 96 97 void cxios_set_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, const char * comment, int comment_size) 98 { 99 std::string comment_str; 100 if (!cstr2string(comment, comment_size, comment_str)) return; 101 CTimer::get("XIOS").resume(); 102 scalargroup_hdl->comment.setValue(comment_str); 103 CTimer::get("XIOS").suspend(); 104 } 105 106 void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char * comment, int comment_size) 107 { 108 CTimer::get("XIOS").resume(); 109 if (!string_copy(scalargroup_hdl->comment.getInheritedValue(), comment, comment_size)) 110 ERROR("void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char * comment, int comment_size)", << "Input string is too short"); 111 CTimer::get("XIOS").suspend(); 112 } 113 114 bool cxios_is_defined_scalargroup_comment(scalargroup_Ptr scalargroup_hdl) 115 { 116 CTimer::get("XIOS").resume(); 117 bool isDefined = scalargroup_hdl->comment.hasInheritedValue(); 118 CTimer::get("XIOS").suspend(); 119 return isDefined; 120 } 121 122 20 123 void cxios_set_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, const char * group_ref, int group_ref_size) 21 124 { … … 44 147 45 148 149 void cxios_set_scalargroup_label(scalargroup_Ptr scalargroup_hdl, const char * label, int label_size) 150 { 151 std::string label_str; 152 if (!cstr2string(label, label_size, label_str)) return; 153 CTimer::get("XIOS").resume(); 154 scalargroup_hdl->label.setValue(label_str); 155 CTimer::get("XIOS").suspend(); 156 } 157 158 void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char * label, int label_size) 159 { 160 CTimer::get("XIOS").resume(); 161 if (!string_copy(scalargroup_hdl->label.getInheritedValue(), label, label_size)) 162 ERROR("void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char * label, int label_size)", << "Input string is too short"); 163 CTimer::get("XIOS").suspend(); 164 } 165 166 bool cxios_is_defined_scalargroup_label(scalargroup_Ptr scalargroup_hdl) 167 { 168 CTimer::get("XIOS").resume(); 169 bool isDefined = scalargroup_hdl->label.hasInheritedValue(); 170 CTimer::get("XIOS").suspend(); 171 return isDefined; 172 } 173 174 46 175 void cxios_set_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, const char * long_name, int long_name_size) 47 176 { … … 96 225 97 226 227 void cxios_set_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, const char * positive, int positive_size) 228 { 229 std::string positive_str; 230 if (!cstr2string(positive, positive_size, positive_str)) return; 231 CTimer::get("XIOS").resume(); 232 scalargroup_hdl->positive.fromString(positive_str); 233 CTimer::get("XIOS").suspend(); 234 } 235 236 void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char * positive, int positive_size) 237 { 238 CTimer::get("XIOS").resume(); 239 if (!string_copy(scalargroup_hdl->positive.getInheritedStringValue(), positive, positive_size)) 240 ERROR("void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char * positive, int positive_size)", << "Input string is too short"); 241 CTimer::get("XIOS").suspend(); 242 } 243 244 bool cxios_is_defined_scalargroup_positive(scalargroup_Ptr scalargroup_hdl) 245 { 246 CTimer::get("XIOS").resume(); 247 bool isDefined = scalargroup_hdl->positive.hasInheritedValue(); 248 CTimer::get("XIOS").suspend(); 249 return isDefined; 250 } 251 252 98 253 void cxios_set_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int prec) 99 254 {
Note: See TracChangeset
for help on using the changeset viewer.