Changeset 541 for XIOS/trunk/src/interface
- Timestamp:
- 12/16/14 12:55:59 (10 years ago)
- Location:
- XIOS/trunk/src/interface/c_attr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
r532 r541 18 18 typedef xios::CGrid* grid_Ptr; 19 19 20 void cxios_set_grid_axis _ref(grid_Ptr grid_hdl, const char * axis_ref, int axis_ref_size)20 void cxios_set_grid_axisDomOrder(grid_Ptr grid_hdl, int* axisDomOrder, int extent1) 21 21 { 22 std::string axis_ref_str; 23 if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 24 CTimer::get("XIOS").resume(); 25 grid_hdl->axis_ref.setValue(axis_ref_str); 22 CTimer::get("XIOS").resume(); 23 CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ; 24 grid_hdl->axisDomOrder.reference(tmp.copy()); 26 25 CTimer::get("XIOS").suspend(); 27 26 } 28 27 29 void cxios_get_grid_axis _ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)28 void cxios_get_grid_axisDomOrder(grid_Ptr grid_hdl, int* axisDomOrder, int extent1) 30 29 { 31 32 if(!string_copy(grid_hdl->axis_ref.getInheritedValue(),axis_ref , axis_ref_size))33 ERROR("void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");30 CTimer::get("XIOS").resume(); 31 CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ; 32 tmp=grid_hdl->axisDomOrder.getInheritedValue() ; 34 33 CTimer::get("XIOS").suspend(); 35 34 } 36 35 37 bool cxios_is_defined_grid_axis _ref(grid_Ptr grid_hdl )36 bool cxios_is_defined_grid_axisDomOrder(grid_Ptr grid_hdl ) 38 37 { 39 38 CTimer::get("XIOS").resume(); 40 return grid_hdl->axis _ref.hasInheritedValue();39 return grid_hdl->axisDomOrder.hasInheritedValue(); 41 40 CTimer::get("XIOS").suspend(); 42 41 } … … 65 64 CTimer::get("XIOS").resume(); 66 65 return grid_hdl->description.hasInheritedValue(); 67 CTimer::get("XIOS").suspend();68 }69 70 71 72 void cxios_set_grid_domain_ref(grid_Ptr grid_hdl, const char * domain_ref, int domain_ref_size)73 {74 std::string domain_ref_str;75 if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;76 CTimer::get("XIOS").resume();77 grid_hdl->domain_ref.setValue(domain_ref_str);78 CTimer::get("XIOS").suspend();79 }80 81 void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)82 {83 CTimer::get("XIOS").resume();84 if(!string_copy(grid_hdl->domain_ref.getInheritedValue(),domain_ref , domain_ref_size))85 ERROR("void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");86 CTimer::get("XIOS").suspend();87 }88 89 bool cxios_is_defined_grid_domain_ref(grid_Ptr grid_hdl )90 {91 CTimer::get("XIOS").resume();92 return grid_hdl->domain_ref.hasInheritedValue();93 66 CTimer::get("XIOS").suspend(); 94 67 } -
XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
r532 r541 18 18 typedef xios::CGridGroup* gridgroup_Ptr; 19 19 20 void cxios_set_gridgroup_axis _ref(gridgroup_Ptr gridgroup_hdl, const char * axis_ref, int axis_ref_size)20 void cxios_set_gridgroup_axisDomOrder(gridgroup_Ptr gridgroup_hdl, int* axisDomOrder, int extent1) 21 21 { 22 std::string axis_ref_str; 23 if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 24 CTimer::get("XIOS").resume(); 25 gridgroup_hdl->axis_ref.setValue(axis_ref_str); 22 CTimer::get("XIOS").resume(); 23 CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ; 24 gridgroup_hdl->axisDomOrder.reference(tmp.copy()); 26 25 CTimer::get("XIOS").suspend(); 27 26 } 28 27 29 void cxios_get_gridgroup_axis _ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size)28 void cxios_get_gridgroup_axisDomOrder(gridgroup_Ptr gridgroup_hdl, int* axisDomOrder, int extent1) 30 29 { 31 32 if(!string_copy(gridgroup_hdl->axis_ref.getInheritedValue(),axis_ref , axis_ref_size))33 ERROR("void cxios_get_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");30 CTimer::get("XIOS").resume(); 31 CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ; 32 tmp=gridgroup_hdl->axisDomOrder.getInheritedValue() ; 34 33 CTimer::get("XIOS").suspend(); 35 34 } 36 35 37 bool cxios_is_defined_gridgroup_axis _ref(gridgroup_Ptr gridgroup_hdl )36 bool cxios_is_defined_gridgroup_axisDomOrder(gridgroup_Ptr gridgroup_hdl ) 38 37 { 39 38 CTimer::get("XIOS").resume(); 40 return gridgroup_hdl->axis _ref.hasInheritedValue();39 return gridgroup_hdl->axisDomOrder.hasInheritedValue(); 41 40 CTimer::get("XIOS").suspend(); 42 41 } … … 65 64 CTimer::get("XIOS").resume(); 66 65 return gridgroup_hdl->description.hasInheritedValue(); 67 CTimer::get("XIOS").suspend();68 }69 70 71 72 void cxios_set_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, const char * domain_ref, int domain_ref_size)73 {74 std::string domain_ref_str;75 if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;76 CTimer::get("XIOS").resume();77 gridgroup_hdl->domain_ref.setValue(domain_ref_str);78 CTimer::get("XIOS").suspend();79 }80 81 void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size)82 {83 CTimer::get("XIOS").resume();84 if(!string_copy(gridgroup_hdl->domain_ref.getInheritedValue(),domain_ref , domain_ref_size))85 ERROR("void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");86 CTimer::get("XIOS").suspend();87 }88 89 bool cxios_is_defined_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl )90 {91 CTimer::get("XIOS").resume();92 return gridgroup_hdl->domain_ref.hasInheritedValue();93 66 CTimer::get("XIOS").suspend(); 94 67 }
Note: See TracChangeset
for help on using the changeset viewer.