source: XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp @ 463

Last change on this file since 463 was 463, checked in by ymipsl, 10 years ago

Enhancement :
Add valid_min and valid_max attribute for field, wrote as field metadata in the ouput netcdf file, following the CF convention

YM

  • Property svn:eol-style set to native
File size: 16.9 KB
Line 
1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                   *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
7#include "xmlioserver.hpp"
8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "icutil.hpp"
12#include "timer.hpp"
13#include "node_type.hpp"
14
15extern "C"
16{
17  typedef xios::CFieldGroup*  fieldgroup_Ptr;
18 
19  void cxios_set_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, const char * axis_ref, int axis_ref_size)
20  {
21    std::string axis_ref_str;
22    if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
23     CTimer::get("XIOS").resume();
24    fieldgroup_hdl->axis_ref.setValue(axis_ref_str);
25    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->axis_ref);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(fieldgroup_hdl->axis_ref.getInheritedValue(),axis_ref , axis_ref_size))
33      ERROR("void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37  bool cxios_is_defined_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl )
38  {
39     CTimer::get("XIOS").resume();
40    return fieldgroup_hdl->axis_ref.hasInheritedValue();
41     CTimer::get("XIOS").suspend();
42  }
43 
44 
45 
46  void cxios_set_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double default_value)
47  {
48     CTimer::get("XIOS").resume();
49    fieldgroup_hdl->default_value.setValue(default_value);
50    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->default_value);
51     CTimer::get("XIOS").suspend();
52  }
53 
54  void cxios_get_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double* default_value)
55  {
56    *default_value = fieldgroup_hdl->default_value.getInheritedValue();
57  }
58 
59  bool cxios_is_defined_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl )
60  {
61     CTimer::get("XIOS").resume();
62    return fieldgroup_hdl->default_value.hasInheritedValue();
63     CTimer::get("XIOS").suspend();
64  }
65 
66 
67 
68  void cxios_set_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, const char * domain_ref, int domain_ref_size)
69  {
70    std::string domain_ref_str;
71    if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
72     CTimer::get("XIOS").resume();
73    fieldgroup_hdl->domain_ref.setValue(domain_ref_str);
74    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->domain_ref);
75     CTimer::get("XIOS").suspend();
76  }
77 
78  void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)
79  {
80     CTimer::get("XIOS").resume();
81    if(!string_copy(fieldgroup_hdl->domain_ref.getInheritedValue(),domain_ref , domain_ref_size))
82      ERROR("void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");
83     CTimer::get("XIOS").suspend();
84  }
85 
86  bool cxios_is_defined_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl )
87  {
88     CTimer::get("XIOS").resume();
89    return fieldgroup_hdl->domain_ref.hasInheritedValue();
90     CTimer::get("XIOS").suspend();
91  }
92 
93 
94 
95  void cxios_set_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool enabled)
96  {
97     CTimer::get("XIOS").resume();
98    fieldgroup_hdl->enabled.setValue(enabled);
99    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->enabled);
100     CTimer::get("XIOS").suspend();
101  }
102 
103  void cxios_get_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool* enabled)
104  {
105    *enabled = fieldgroup_hdl->enabled.getInheritedValue();
106  }
107 
108  bool cxios_is_defined_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl )
109  {
110     CTimer::get("XIOS").resume();
111    return fieldgroup_hdl->enabled.hasInheritedValue();
112     CTimer::get("XIOS").suspend();
113  }
114 
115 
116 
117  void cxios_set_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, const char * field_ref, int field_ref_size)
118  {
119    std::string field_ref_str;
120    if(!cstr2string(field_ref, field_ref_size, field_ref_str)) return;
121     CTimer::get("XIOS").resume();
122    fieldgroup_hdl->field_ref.setValue(field_ref_str);
123    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->field_ref);
124     CTimer::get("XIOS").suspend();
125  }
126 
127  void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)
128  {
129     CTimer::get("XIOS").resume();
130    if(!string_copy(fieldgroup_hdl->field_ref.getInheritedValue(),field_ref , field_ref_size))
131      ERROR("void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)", <<"Input string is to short");
132     CTimer::get("XIOS").suspend();
133  }
134 
135  bool cxios_is_defined_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl )
136  {
137     CTimer::get("XIOS").resume();
138    return fieldgroup_hdl->field_ref.hasInheritedValue();
139     CTimer::get("XIOS").suspend();
140  }
141 
142 
143 
144  void cxios_set_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, const char * freq_offset, int freq_offset_size)
145  {
146    std::string freq_offset_str;
147    if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return;
148     CTimer::get("XIOS").resume();
149    fieldgroup_hdl->freq_offset.setValue(freq_offset_str);
150    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->freq_offset);
151     CTimer::get("XIOS").suspend();
152  }
153 
154  void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size)
155  {
156     CTimer::get("XIOS").resume();
157    if(!string_copy(fieldgroup_hdl->freq_offset.getInheritedValue(),freq_offset , freq_offset_size))
158      ERROR("void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short");
159     CTimer::get("XIOS").suspend();
160  }
161 
162  bool cxios_is_defined_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl )
163  {
164     CTimer::get("XIOS").resume();
165    return fieldgroup_hdl->freq_offset.hasInheritedValue();
166     CTimer::get("XIOS").suspend();
167  }
168 
169 
170 
171  void cxios_set_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, const char * freq_op, int freq_op_size)
172  {
173    std::string freq_op_str;
174    if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return;
175     CTimer::get("XIOS").resume();
176    fieldgroup_hdl->freq_op.setValue(freq_op_str);
177    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->freq_op);
178     CTimer::get("XIOS").suspend();
179  }
180 
181  void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size)
182  {
183     CTimer::get("XIOS").resume();
184    if(!string_copy(fieldgroup_hdl->freq_op.getInheritedValue(),freq_op , freq_op_size))
185      ERROR("void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short");
186     CTimer::get("XIOS").suspend();
187  }
188 
189  bool cxios_is_defined_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl )
190  {
191     CTimer::get("XIOS").resume();
192    return fieldgroup_hdl->freq_op.hasInheritedValue();
193     CTimer::get("XIOS").suspend();
194  }
195 
196 
197 
198  void cxios_set_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, const char * grid_ref, int grid_ref_size)
199  {
200    std::string grid_ref_str;
201    if(!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;
202     CTimer::get("XIOS").resume();
203    fieldgroup_hdl->grid_ref.setValue(grid_ref_str);
204    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->grid_ref);
205     CTimer::get("XIOS").suspend();
206  }
207 
208  void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)
209  {
210     CTimer::get("XIOS").resume();
211    if(!string_copy(fieldgroup_hdl->grid_ref.getInheritedValue(),grid_ref , grid_ref_size))
212      ERROR("void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)", <<"Input string is to short");
213     CTimer::get("XIOS").suspend();
214  }
215 
216  bool cxios_is_defined_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl )
217  {
218     CTimer::get("XIOS").resume();
219    return fieldgroup_hdl->grid_ref.hasInheritedValue();
220     CTimer::get("XIOS").suspend();
221  }
222 
223 
224 
225  void cxios_set_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, const char * group_ref, int group_ref_size)
226  {
227    std::string group_ref_str;
228    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
229     CTimer::get("XIOS").resume();
230    fieldgroup_hdl->group_ref.setValue(group_ref_str);
231    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->group_ref);
232     CTimer::get("XIOS").suspend();
233  }
234 
235  void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)
236  {
237     CTimer::get("XIOS").resume();
238    if(!string_copy(fieldgroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size))
239      ERROR("void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
240     CTimer::get("XIOS").suspend();
241  }
242 
243  bool cxios_is_defined_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl )
244  {
245     CTimer::get("XIOS").resume();
246    return fieldgroup_hdl->group_ref.hasInheritedValue();
247     CTimer::get("XIOS").suspend();
248  }
249 
250 
251 
252  void cxios_set_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int level)
253  {
254     CTimer::get("XIOS").resume();
255    fieldgroup_hdl->level.setValue(level);
256    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->level);
257     CTimer::get("XIOS").suspend();
258  }
259 
260  void cxios_get_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int* level)
261  {
262    *level = fieldgroup_hdl->level.getInheritedValue();
263  }
264 
265  bool cxios_is_defined_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl )
266  {
267     CTimer::get("XIOS").resume();
268    return fieldgroup_hdl->level.hasInheritedValue();
269     CTimer::get("XIOS").suspend();
270  }
271 
272 
273 
274  void cxios_set_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, const char * long_name, int long_name_size)
275  {
276    std::string long_name_str;
277    if(!cstr2string(long_name, long_name_size, long_name_str)) return;
278     CTimer::get("XIOS").resume();
279    fieldgroup_hdl->long_name.setValue(long_name_str);
280    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->long_name);
281     CTimer::get("XIOS").suspend();
282  }
283 
284  void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)
285  {
286     CTimer::get("XIOS").resume();
287    if(!string_copy(fieldgroup_hdl->long_name.getInheritedValue(),long_name , long_name_size))
288      ERROR("void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short");
289     CTimer::get("XIOS").suspend();
290  }
291 
292  bool cxios_is_defined_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl )
293  {
294     CTimer::get("XIOS").resume();
295    return fieldgroup_hdl->long_name.hasInheritedValue();
296     CTimer::get("XIOS").suspend();
297  }
298 
299 
300 
301  void cxios_set_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, const char * name, int name_size)
302  {
303    std::string name_str;
304    if(!cstr2string(name, name_size, name_str)) return;
305     CTimer::get("XIOS").resume();
306    fieldgroup_hdl->name.setValue(name_str);
307    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->name);
308     CTimer::get("XIOS").suspend();
309  }
310 
311  void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)
312  {
313     CTimer::get("XIOS").resume();
314    if(!string_copy(fieldgroup_hdl->name.getInheritedValue(),name , name_size))
315      ERROR("void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)", <<"Input string is to short");
316     CTimer::get("XIOS").suspend();
317  }
318 
319  bool cxios_is_defined_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl )
320  {
321     CTimer::get("XIOS").resume();
322    return fieldgroup_hdl->name.hasInheritedValue();
323     CTimer::get("XIOS").suspend();
324  }
325 
326 
327 
328  void cxios_set_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, const char * operation, int operation_size)
329  {
330    std::string operation_str;
331    if(!cstr2string(operation, operation_size, operation_str)) return;
332     CTimer::get("XIOS").resume();
333    fieldgroup_hdl->operation.setValue(operation_str);
334    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->operation);
335     CTimer::get("XIOS").suspend();
336  }
337 
338  void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)
339  {
340     CTimer::get("XIOS").resume();
341    if(!string_copy(fieldgroup_hdl->operation.getInheritedValue(),operation , operation_size))
342      ERROR("void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)", <<"Input string is to short");
343     CTimer::get("XIOS").suspend();
344  }
345 
346  bool cxios_is_defined_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl )
347  {
348     CTimer::get("XIOS").resume();
349    return fieldgroup_hdl->operation.hasInheritedValue();
350     CTimer::get("XIOS").suspend();
351  }
352 
353 
354 
355  void cxios_set_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int prec)
356  {
357     CTimer::get("XIOS").resume();
358    fieldgroup_hdl->prec.setValue(prec);
359    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->prec);
360     CTimer::get("XIOS").suspend();
361  }
362 
363  void cxios_get_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int* prec)
364  {
365    *prec = fieldgroup_hdl->prec.getInheritedValue();
366  }
367 
368  bool cxios_is_defined_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl )
369  {
370     CTimer::get("XIOS").resume();
371    return fieldgroup_hdl->prec.hasInheritedValue();
372     CTimer::get("XIOS").suspend();
373  }
374 
375 
376 
377  void cxios_set_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, const char * standard_name, int standard_name_size)
378  {
379    std::string standard_name_str;
380    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
381     CTimer::get("XIOS").resume();
382    fieldgroup_hdl->standard_name.setValue(standard_name_str);
383    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->standard_name);
384     CTimer::get("XIOS").suspend();
385  }
386 
387  void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)
388  {
389     CTimer::get("XIOS").resume();
390    if(!string_copy(fieldgroup_hdl->standard_name.getInheritedValue(),standard_name , standard_name_size))
391      ERROR("void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short");
392     CTimer::get("XIOS").suspend();
393  }
394 
395  bool cxios_is_defined_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl )
396  {
397     CTimer::get("XIOS").resume();
398    return fieldgroup_hdl->standard_name.hasInheritedValue();
399     CTimer::get("XIOS").suspend();
400  }
401 
402 
403 
404  void cxios_set_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, const char * unit, int unit_size)
405  {
406    std::string unit_str;
407    if(!cstr2string(unit, unit_size, unit_str)) return;
408     CTimer::get("XIOS").resume();
409    fieldgroup_hdl->unit.setValue(unit_str);
410    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->unit);
411     CTimer::get("XIOS").suspend();
412  }
413 
414  void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)
415  {
416     CTimer::get("XIOS").resume();
417    if(!string_copy(fieldgroup_hdl->unit.getInheritedValue(),unit , unit_size))
418      ERROR("void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)", <<"Input string is to short");
419     CTimer::get("XIOS").suspend();
420  }
421 
422  bool cxios_is_defined_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl )
423  {
424     CTimer::get("XIOS").resume();
425    return fieldgroup_hdl->unit.hasInheritedValue();
426     CTimer::get("XIOS").suspend();
427  }
428 
429 
430 
431  void cxios_set_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl, double valid_max)
432  {
433     CTimer::get("XIOS").resume();
434    fieldgroup_hdl->valid_max.setValue(valid_max);
435    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->valid_max);
436     CTimer::get("XIOS").suspend();
437  }
438 
439  void cxios_get_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl, double* valid_max)
440  {
441    *valid_max = fieldgroup_hdl->valid_max.getInheritedValue();
442  }
443 
444  bool cxios_is_defined_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl )
445  {
446     CTimer::get("XIOS").resume();
447    return fieldgroup_hdl->valid_max.hasInheritedValue();
448     CTimer::get("XIOS").suspend();
449  }
450 
451 
452 
453  void cxios_set_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl, double valid_min)
454  {
455     CTimer::get("XIOS").resume();
456    fieldgroup_hdl->valid_min.setValue(valid_min);
457    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->valid_min);
458     CTimer::get("XIOS").suspend();
459  }
460 
461  void cxios_get_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl, double* valid_min)
462  {
463    *valid_min = fieldgroup_hdl->valid_min.getInheritedValue();
464  }
465 
466  bool cxios_is_defined_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl )
467  {
468     CTimer::get("XIOS").resume();
469    return fieldgroup_hdl->valid_min.hasInheritedValue();
470     CTimer::get("XIOS").suspend();
471  }
472 
473 
474 
475 
476}
Note: See TracBrowser for help on using the repository browser.