Changeset 271 for XMLIO_V2/dev/dev_rv/src/xmlio/fortran/icfield.cpp
- Timestamp:
- 09/14/11 10:26:16 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/xmlio/fortran/icfield.cpp
r270 r271 28 28 { 29 29 std::string name_str; 30 if (!cstr2string(name, name_size, name_str)) return; 30 if (!cstr2string(name, name_size, name_str)) return; 31 32 field_hdl->name.setValue(name_str); 31 33 } 32 34 … … 34 36 { 35 37 std::string standard_name_str; 36 if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 38 if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 39 40 field_hdl->standard_name.setValue(standard_name_str); 37 41 } 38 42 … … 40 44 { 41 45 std::string long_name_str; 42 if (!cstr2string(long_name, long_name_size, long_name_str)) return; 46 if (!cstr2string(long_name, long_name_size, long_name_str)) return; 47 48 field_hdl->long_name.setValue(long_name_str); 43 49 } 44 50 … … 46 52 { 47 53 std::string unit_str; 48 if (!cstr2string(unit, unit_size, unit_str)) return; 54 if (!cstr2string(unit, unit_size, unit_str)) return; 55 56 field_hdl->unit.setValue(unit_str); 49 57 } 50 58 … … 52 60 { 53 61 std::string operation_str; 54 if (!cstr2string(operation, operation_size, operation_str)) return; 62 if (!cstr2string(operation, operation_size, operation_str)) return; 63 64 field_hdl->operation.setValue(operation_str); 55 65 } 56 66 … … 58 68 { 59 69 std::string freq_op_str; 60 if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 70 if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 71 72 field_hdl->freq_op.setValue(freq_op_str); 61 73 } 62 74 63 75 void xios_set_field_level(XFieldPtr field_hdl, int level) 64 76 { 65 77 field_hdl->level.setValue(level); 66 78 } 67 79 68 80 void xios_set_field_prec(XFieldPtr field_hdl, int prec) 69 81 { 70 82 field_hdl->prec.setValue(prec); 71 83 } 72 84 73 85 void xios_set_field_enabled(XFieldPtr field_hdl, bool enabled) 74 86 { 75 87 field_hdl->enabled.setValue(enabled); 76 88 } 77 89 … … 79 91 { 80 92 std::string domain_ref_str; 81 if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 93 if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 94 95 field_hdl->domain_ref.setValue(domain_ref_str); 82 96 } 83 97 … … 85 99 { 86 100 std::string axis_ref_str; 87 if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 101 if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 102 103 field_hdl->axis_ref.setValue(axis_ref_str); 88 104 } 89 105 … … 91 107 { 92 108 std::string grid_ref_str; 93 if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 109 if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 110 111 field_hdl->grid_ref.setValue(grid_ref_str); 94 112 } 95 113 … … 97 115 { 98 116 std::string field_ref_str; 99 if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 117 if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 118 119 field_hdl->field_ref.setValue(field_ref_str); 100 120 } 101 121 102 122 void xios_set_field_default_value(XFieldPtr field_hdl, double default_value) 103 123 { 104 124 field_hdl->default_value.setValue(default_value); 105 125 } 106 126 … … 110 130 { 111 131 std::string name_str; 112 if (!cstr2string(name, name_size, name_str)) return; 132 if (!cstr2string(name, name_size, name_str)) return; 133 134 fieldgroup_hdl->name.setValue(name_str); 113 135 } 114 136 … … 117 139 std::string standard_name_str; 118 140 if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 141 142 fieldgroup_hdl->standard_name.setValue(standard_name_str); 119 143 } 120 144 … … 123 147 std::string long_name_str; 124 148 if (!cstr2string(long_name, long_name_size, long_name_str)) return; 149 150 fieldgroup_hdl->long_name.setValue(long_name_str); 125 151 } 126 152 … … 129 155 std::string unit_str; 130 156 if (!cstr2string(unit, unit_size, unit_str)) return; 157 158 fieldgroup_hdl->unit.setValue(unit_str); 131 159 } 132 160 … … 134 162 { 135 163 std::string operation_str; 136 if (!cstr2string(operation, operation_size, operation_str)) return; 164 if (!cstr2string(operation, operation_size, operation_str)) return; 165 166 fieldgroup_hdl->operation.setValue(operation_str); 137 167 } 138 168 … … 141 171 std::string freq_op_str; 142 172 if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 173 174 fieldgroup_hdl->freq_op.setValue(freq_op_str); 143 175 } 144 176 145 177 void xios_set_fieldgroup_level(XFieldGroupPtr fieldgroup_hdl, int level) 146 178 { 147 179 fieldgroup_hdl->level.setValue(level); 148 180 } 149 181 150 182 void xios_set_fieldgroup_prec(XFieldGroupPtr fieldgroup_hdl, int prec) 151 183 { 152 184 fieldgroup_hdl->prec.setValue(prec); 153 185 } 154 186 155 187 void xios_set_fieldgroup_enabled(XFieldGroupPtr fieldgroup_hdl, bool enabled) 156 188 { 157 189 fieldgroup_hdl->enabled.setValue(enabled); 158 190 } 159 191 … … 161 193 { 162 194 std::string domain_ref_str; 163 if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 195 if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 196 197 fieldgroup_hdl->domain_ref.setValue(domain_ref_str); 164 198 } 165 199 … … 167 201 { 168 202 std::string axis_ref_str; 169 if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 203 if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 204 205 fieldgroup_hdl->axis_ref.setValue(axis_ref_str); 170 206 } 171 207 … … 174 210 std::string grid_ref_str; 175 211 if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 212 213 fieldgroup_hdl->grid_ref.setValue(grid_ref_str); 176 214 } 177 215 … … 179 217 { 180 218 std::string field_ref_str; 181 if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 219 if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 220 221 fieldgroup_hdl->field_ref.setValue(field_ref_str); 182 222 } 183 223 184 224 void xios_set_fieldgroup_default_value(XFieldGroupPtr fieldgroup_hdl, double default_value) 185 225 { 186 226 fieldgroup_hdl->default_value.setValue(default_value); 187 227 } 188 228 … … 193 233 std::string id; 194 234 if (!cstr2string(_id, _id_len, id)) return; 235 236 *_ret = xmlioserver::CObjectFactory::GetObject<xmlioserver::tree::CField>(id).get(); 195 237 } 196 238 … … 199 241 std::string id; 200 242 if (!cstr2string(_id, _id_len, id)) return; 243 244 *_ret = xmlioserver::CObjectFactory::GetObject<xmlioserver::tree::CFieldGroup>(id).get(); 201 245 } 202 246
Note: See TracChangeset
for help on using the changeset viewer.