5 #include <boost/multi_array.hpp>
21 std::string axis_type_str;
22 if (!
cstr2string(axis_type, axis_type_size, axis_type_str))
return;
23 CTimer::get(
"XIOS").resume();
24 scalargroup_hdl->axis_type.fromString(axis_type_str);
25 CTimer::get(
"XIOS").suspend();
30 CTimer::get(
"XIOS").resume();
31 if (!
string_copy(scalargroup_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
32 ERROR(
"void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char * axis_type, int axis_type_size)", <<
"Input string is too short");
33 CTimer::get(
"XIOS").suspend();
38 CTimer::get(
"XIOS").resume();
39 bool isDefined = scalargroup_hdl->axis_type.hasInheritedValue();
40 CTimer::get(
"XIOS").suspend();
47 CTimer::get(
"XIOS").resume();
49 scalargroup_hdl->bounds.reference(tmp.
copy());
50 CTimer::get(
"XIOS").suspend();
55 CTimer::get(
"XIOS").resume();
57 tmp=scalargroup_hdl->bounds.getInheritedValue();
58 CTimer::get(
"XIOS").suspend();
63 CTimer::get(
"XIOS").resume();
64 bool isDefined = scalargroup_hdl->bounds.hasInheritedValue();
65 CTimer::get(
"XIOS").suspend();
72 std::string bounds_name_str;
73 if (!
cstr2string(bounds_name, bounds_name_size, bounds_name_str))
return;
74 CTimer::get(
"XIOS").resume();
75 scalargroup_hdl->bounds_name.setValue(bounds_name_str);
76 CTimer::get(
"XIOS").suspend();
81 CTimer::get(
"XIOS").resume();
82 if (!
string_copy(scalargroup_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
83 ERROR(
"void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char * bounds_name, int bounds_name_size)", <<
"Input string is too short");
84 CTimer::get(
"XIOS").suspend();
89 CTimer::get(
"XIOS").resume();
90 bool isDefined = scalargroup_hdl->bounds_name.hasInheritedValue();
91 CTimer::get(
"XIOS").suspend();
98 std::string comment_str;
99 if (!
cstr2string(comment, comment_size, comment_str))
return;
100 CTimer::get(
"XIOS").resume();
101 scalargroup_hdl->comment.setValue(comment_str);
102 CTimer::get(
"XIOS").suspend();
107 CTimer::get(
"XIOS").resume();
108 if (!
string_copy(scalargroup_hdl->comment.getInheritedValue(), comment, comment_size))
109 ERROR(
"void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char * comment, int comment_size)", <<
"Input string is too short");
110 CTimer::get(
"XIOS").suspend();
115 CTimer::get(
"XIOS").resume();
116 bool isDefined = scalargroup_hdl->comment.hasInheritedValue();
117 CTimer::get(
"XIOS").suspend();
124 std::string group_ref_str;
125 if (!
cstr2string(group_ref, group_ref_size, group_ref_str))
return;
126 CTimer::get(
"XIOS").resume();
127 scalargroup_hdl->group_ref.setValue(group_ref_str);
128 CTimer::get(
"XIOS").suspend();
133 CTimer::get(
"XIOS").resume();
134 if (!
string_copy(scalargroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
135 ERROR(
"void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)", <<
"Input string is too short");
136 CTimer::get(
"XIOS").suspend();
141 CTimer::get(
"XIOS").resume();
142 bool isDefined = scalargroup_hdl->group_ref.hasInheritedValue();
143 CTimer::get(
"XIOS").suspend();
150 std::string label_str;
151 if (!
cstr2string(label, label_size, label_str))
return;
152 CTimer::get(
"XIOS").resume();
153 scalargroup_hdl->label.setValue(label_str);
154 CTimer::get(
"XIOS").suspend();
159 CTimer::get(
"XIOS").resume();
160 if (!
string_copy(scalargroup_hdl->label.getInheritedValue(), label, label_size))
161 ERROR(
"void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char * label, int label_size)", <<
"Input string is too short");
162 CTimer::get(
"XIOS").suspend();
167 CTimer::get(
"XIOS").resume();
168 bool isDefined = scalargroup_hdl->label.hasInheritedValue();
169 CTimer::get(
"XIOS").suspend();
176 std::string long_name_str;
177 if (!
cstr2string(long_name, long_name_size, long_name_str))
return;
178 CTimer::get(
"XIOS").resume();
179 scalargroup_hdl->long_name.setValue(long_name_str);
180 CTimer::get(
"XIOS").suspend();
185 CTimer::get(
"XIOS").resume();
186 if (!
string_copy(scalargroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
187 ERROR(
"void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)", <<
"Input string is too short");
188 CTimer::get(
"XIOS").suspend();
193 CTimer::get(
"XIOS").resume();
194 bool isDefined = scalargroup_hdl->long_name.hasInheritedValue();
195 CTimer::get(
"XIOS").suspend();
202 std::string name_str;
203 if (!
cstr2string(name, name_size, name_str))
return;
204 CTimer::get(
"XIOS").resume();
205 scalargroup_hdl->name.setValue(name_str);
206 CTimer::get(
"XIOS").suspend();
211 CTimer::get(
"XIOS").resume();
212 if (!
string_copy(scalargroup_hdl->name.getInheritedValue(), name, name_size))
213 ERROR(
"void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)", <<
"Input string is too short");
214 CTimer::get(
"XIOS").suspend();
219 CTimer::get(
"XIOS").resume();
220 bool isDefined = scalargroup_hdl->name.hasInheritedValue();
221 CTimer::get(
"XIOS").suspend();
228 std::string positive_str;
229 if (!
cstr2string(positive, positive_size, positive_str))
return;
230 CTimer::get(
"XIOS").resume();
231 scalargroup_hdl->positive.fromString(positive_str);
232 CTimer::get(
"XIOS").suspend();
237 CTimer::get(
"XIOS").resume();
238 if (!
string_copy(scalargroup_hdl->positive.getInheritedStringValue(), positive, positive_size))
239 ERROR(
"void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char * positive, int positive_size)", <<
"Input string is too short");
240 CTimer::get(
"XIOS").suspend();
245 CTimer::get(
"XIOS").resume();
246 bool isDefined = scalargroup_hdl->positive.hasInheritedValue();
247 CTimer::get(
"XIOS").suspend();
254 CTimer::get(
"XIOS").resume();
255 scalargroup_hdl->prec.setValue(prec);
256 CTimer::get(
"XIOS").suspend();
261 CTimer::get(
"XIOS").resume();
262 *prec = scalargroup_hdl->prec.getInheritedValue();
263 CTimer::get(
"XIOS").suspend();
268 CTimer::get(
"XIOS").resume();
269 bool isDefined = scalargroup_hdl->prec.hasInheritedValue();
270 CTimer::get(
"XIOS").suspend();
277 std::string scalar_ref_str;
278 if (!
cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str))
return;
279 CTimer::get(
"XIOS").resume();
280 scalargroup_hdl->scalar_ref.setValue(scalar_ref_str);
281 CTimer::get(
"XIOS").suspend();
286 CTimer::get(
"XIOS").resume();
287 if (!
string_copy(scalargroup_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
288 ERROR(
"void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)", <<
"Input string is too short");
289 CTimer::get(
"XIOS").suspend();
294 CTimer::get(
"XIOS").resume();
295 bool isDefined = scalargroup_hdl->scalar_ref.hasInheritedValue();
296 CTimer::get(
"XIOS").suspend();
303 std::string standard_name_str;
304 if (!
cstr2string(standard_name, standard_name_size, standard_name_str))
return;
305 CTimer::get(
"XIOS").resume();
306 scalargroup_hdl->standard_name.setValue(standard_name_str);
307 CTimer::get(
"XIOS").suspend();
312 CTimer::get(
"XIOS").resume();
313 if (!
string_copy(scalargroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
314 ERROR(
"void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)", <<
"Input string is too short");
315 CTimer::get(
"XIOS").suspend();
320 CTimer::get(
"XIOS").resume();
321 bool isDefined = scalargroup_hdl->standard_name.hasInheritedValue();
322 CTimer::get(
"XIOS").suspend();
329 std::string unit_str;
330 if (!
cstr2string(unit, unit_size, unit_str))
return;
331 CTimer::get(
"XIOS").resume();
332 scalargroup_hdl->unit.setValue(unit_str);
333 CTimer::get(
"XIOS").suspend();
338 CTimer::get(
"XIOS").resume();
339 if (!
string_copy(scalargroup_hdl->unit.getInheritedValue(), unit, unit_size))
340 ERROR(
"void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)", <<
"Input string is too short");
341 CTimer::get(
"XIOS").suspend();
346 CTimer::get(
"XIOS").resume();
347 bool isDefined = scalargroup_hdl->unit.hasInheritedValue();
348 CTimer::get(
"XIOS").suspend();
355 CTimer::get(
"XIOS").resume();
356 scalargroup_hdl->value.setValue(value);
357 CTimer::get(
"XIOS").suspend();
362 CTimer::get(
"XIOS").resume();
363 *value = scalargroup_hdl->value.getInheritedValue();
364 CTimer::get(
"XIOS").suspend();
369 CTimer::get(
"XIOS").resume();
370 bool isDefined = scalargroup_hdl->value.hasInheritedValue();
371 CTimer::get(
"XIOS").suspend();
bool cxios_is_defined_scalargroup_value(scalargroup_Ptr scalargroup_hdl)
void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char *axis_type, int axis_type_size)
bool cxios_is_defined_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl)
void cxios_set_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double value)
void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char *bounds_name, int bounds_name_size)
void cxios_set_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, const char *axis_type, int axis_type_size)
void cxios_set_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, const char *comment, int comment_size)
void cxios_get_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int *prec)
bool cxios_is_defined_scalargroup_prec(scalargroup_Ptr scalargroup_hdl)
void cxios_set_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, const char *unit, int unit_size)
void cxios_set_scalargroup_label(scalargroup_Ptr scalargroup_hdl, const char *label, int label_size)
void cxios_set_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double *bounds, int *extent)
void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char *long_name, int long_name_size)
void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char *name, int name_size)
void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char *label, int label_size)
bool cxios_is_defined_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl)
bool cxios_is_defined_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl)
void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char *group_ref, int group_ref_size)
void cxios_set_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, const char *long_name, int long_name_size)
bool cxios_is_defined_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl)
bool cxios_is_defined_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl)
bool string_copy(const std::string &str, char *cstr, int cstr_size)
void cxios_set_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, const char *standard_name, int standard_name_size)
void cxios_set_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, const char *group_ref, int group_ref_size)
void cxios_get_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double *value)
bool cxios_is_defined_scalargroup_positive(scalargroup_Ptr scalargroup_hdl)
void cxios_set_scalargroup_name(scalargroup_Ptr scalargroup_hdl, const char *name, int name_size)
void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char *unit, int unit_size)
bool cxios_is_defined_scalargroup_name(scalargroup_Ptr scalargroup_hdl)
void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char *scalar_ref, int scalar_ref_size)
void cxios_set_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int prec)
bool cxios_is_defined_scalargroup_comment(scalargroup_Ptr scalargroup_hdl)
void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char *standard_name, int standard_name_size)
bool cxios_is_defined_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl)
void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char *comment, int comment_size)
void cxios_set_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, const char *positive, int positive_size)
bool cxios_is_defined_scalargroup_label(scalargroup_Ptr scalargroup_hdl)
void cxios_set_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, const char *bounds_name, int bounds_name_size)
bool cstr2string(const char *cstr, int cstr_size, std::string &str)
void cxios_get_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double *bounds, int *extent)
bool cxios_is_defined_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl)
void cxios_set_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, const char *scalar_ref, int scalar_ref_size)
CArray< T_numtype, N_rank > copy() const
bool cxios_is_defined_scalargroup_unit(scalargroup_Ptr scalargroup_hdl)
xios::CScalarGroup * scalargroup_Ptr
void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char *positive, int positive_size)