Changeset 313 for XIOS/trunk/src/fortran/icaxis.cpp
- Timestamp:
- 02/18/12 22:43:24 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/fortran/icaxis.cpp
r300 r313 23 23 typedef xmlioserver::tree::CAxisGroup * XAxisGroupPtr; 24 24 25 // ------------------------- Attributs des axes -----------------------------26 void cxios_set_axis_name27 (XAxisPtr axis_hdl, const char * name , int name_size)28 {29 std::string name_str;30 if (!cstr2string(name, name_size, name_str)) return;31 32 axis_hdl->name.setValue(name_str);33 axis_hdl->sendAttributToServer(axis_hdl->name) ;34 }35 36 void cxios_set_axis_standard_name37 (XAxisPtr axis_hdl, const char * standard_name , int standard_name_size)38 {39 std::string standard_name_str;40 if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;41 42 axis_hdl->standard_name.setValue(standard_name_str);43 axis_hdl->sendAttributToServer(axis_hdl->standard_name);44 }45 46 void cxios_set_axis_long_name47 (XAxisPtr axis_hdl, const char * long_name , int long_name_size)48 {49 std::string long_name_str;50 if (!cstr2string(long_name, long_name_size, long_name_str)) return;51 52 axis_hdl->long_name.setValue(long_name_str);53 axis_hdl->sendAttributToServer(axis_hdl->long_name) ;54 }55 56 void cxios_set_axis_unit57 (XAxisPtr axis_hdl, const char * unit , int unit_size)58 {59 std::string unit_str;60 if (!cstr2string(unit, unit_size, unit_str)) return;61 62 axis_hdl->unit.setValue(unit_str);63 axis_hdl->sendAttributToServer(axis_hdl->unit) ;64 }65 66 void cxios_set_axis_size(XAxisPtr axis_hdl, int size)67 {68 axis_hdl->size.setValue(size);69 axis_hdl->sendAttributToServer(axis_hdl->size) ;70 }71 72 void cxios_set_axis_zvalue73 (XAxisPtr axis_hdl, const double * zvalue , int zvalue_extent1)74 {75 ARRAY(double, 1) zvalue_val(new CArray<double, 1>(boost::extents [zvalue_extent1]));76 std::copy(zvalue, &(zvalue[zvalue_val->num_elements()]), zvalue_val->data());77 78 axis_hdl->zvalue.setValue(zvalue_val);79 axis_hdl->sendAttributToServer(axis_hdl->zvalue) ;80 81 }82 83 // -------------------- Attributs des groupes d'axes -------------------------84 85 void cxios_set_axisgroup_name86 (XAxisGroupPtr axisgroup_hdl, const char * name , int name_size)87 {88 std::string name_str;89 if (!cstr2string(name, name_size, name_str)) return;90 91 axisgroup_hdl->name.setValue(name_str);92 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->name) ;93 }94 95 void cxios_set_axisgroup_standard_name96 (XAxisGroupPtr axisgroup_hdl, const char * standard_name , int standard_name_size)97 {98 std::string standard_name_str;99 if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;100 101 axisgroup_hdl->standard_name.setValue(standard_name_str);102 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->standard_name) ;103 }104 105 void cxios_set_axisgroup_long_name106 (XAxisGroupPtr axisgroup_hdl, const char * long_name , int long_name_size)107 {108 std::string long_name_str;109 if (!cstr2string(long_name, long_name_size, long_name_str)) return;110 111 axisgroup_hdl->long_name.setValue(long_name_str);112 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->long_name) ;113 }114 115 void cxios_set_axisgroup_unit116 (XAxisGroupPtr axisgroup_hdl, const char * unit , int unit_size)117 {118 std::string unit_str;119 if (!cstr2string(unit, unit_size, unit_str)) return;120 121 axisgroup_hdl->unit.setValue(unit_str);122 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->unit) ;123 }124 125 void cxios_set_axisgroup_size(XAxisGroupPtr axisgroup_hdl, int size)126 {127 axisgroup_hdl->size.setValue(size);128 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->size) ;129 }130 131 void cxios_set_axisgroup_zvalue132 (XAxisGroupPtr axisgroup_hdl, const double * zvalue , int zvalue_extent1)133 {134 ARRAY(double, 1) zvalue_val(new CArray<double, 1>(boost::extents [zvalue_extent1]));135 std::copy(zvalue, &(zvalue[zvalue_val->num_elements()]), zvalue_val->data());136 137 axisgroup_hdl->zvalue.setValue(zvalue_val);138 axisgroup_hdl->sendAttributToServer(axisgroup_hdl->zvalue) ;139 }140 141 25 // ------------------------ Création des handle ----------------------------- 142 26
Note: See TracChangeset
for help on using the changeset viewer.