Changeset 1158 for XIOS/dev/dev_olga/src/interface/c_attr/icaxis_attr.cpp
- Timestamp:
- 06/06/17 17:58:16 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/interface/c_attr/icaxis_attr.cpp
r817 r1158 188 188 189 189 190 void cxios_set_axis_label(axis_Ptr axis_hdl, char* label, int str_len, int* str_size, int* extent) 191 { 192 CTimer::get("XIOS").resume(); 193 axis_hdl->label.resize(shape(extent[0])); 194 Array<StdString,1>::iterator it, itb=axis_hdl->label.begin(), ite=axis_hdl->label.end() ; 195 int i, n ; 196 for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ; 197 CTimer::get("XIOS").suspend(); 198 } 199 200 void cxios_get_axis_label(axis_Ptr axis_hdl, char* label, int str_size, int* extent) 201 { 202 CTimer::get("XIOS").resume(); 203 Array<StdString,1>::const_iterator it, itb=axis_hdl->label.getInheritedValue().begin(), ite=axis_hdl->label.getInheritedValue().end() ; 204 int n ; 205 for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; 206 CTimer::get("XIOS").suspend(); 207 } 208 209 bool cxios_is_defined_axis_label(axis_Ptr axis_hdl) 210 { 211 CTimer::get("XIOS").resume(); 212 bool isDefined = axis_hdl->label.hasInheritedValue(); 213 CTimer::get("XIOS").suspend(); 214 return isDefined; 215 } 216 217 190 218 void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size) 191 219 { … … 360 388 361 389 390 void cxios_set_axis_prec(axis_Ptr axis_hdl, int prec) 391 { 392 CTimer::get("XIOS").resume(); 393 axis_hdl->prec.setValue(prec); 394 CTimer::get("XIOS").suspend(); 395 } 396 397 void cxios_get_axis_prec(axis_Ptr axis_hdl, int* prec) 398 { 399 CTimer::get("XIOS").resume(); 400 *prec = axis_hdl->prec.getInheritedValue(); 401 CTimer::get("XIOS").suspend(); 402 } 403 404 bool cxios_is_defined_axis_prec(axis_Ptr axis_hdl) 405 { 406 CTimer::get("XIOS").resume(); 407 bool isDefined = axis_hdl->prec.hasInheritedValue(); 408 CTimer::get("XIOS").suspend(); 409 return isDefined; 410 } 411 412 362 413 void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size) 363 414 {
Note: See TracChangeset
for help on using the changeset viewer.