source: XIOS2/trunk/src/interface/c_attr/icfieldgroup_attr.cpp

Last change on this file was 2618, checked in by jderouillat, 4 months ago

Regenerate XIOS2 interfaces, and fix the field' s attribute name conversion_by_NetCDF removing upper-case letters

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 36.0 KB
Line 
1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                     *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include "xios.hpp"
7#include "attribute_template.hpp"
8#include "object_template.hpp"
9#include "group_template.hpp"
10#include "icutil.hpp"
11#include "icdate.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_add_offset(fieldgroup_Ptr fieldgroup_hdl, double add_offset)
20  {
21    CTimer::get("XIOS").resume();
22    fieldgroup_hdl->add_offset.setValue(add_offset);
23    CTimer::get("XIOS").suspend();
24  }
25
26  void cxios_get_fieldgroup_add_offset(fieldgroup_Ptr fieldgroup_hdl, double* add_offset)
27  {
28    CTimer::get("XIOS").resume();
29    *add_offset = fieldgroup_hdl->add_offset.getInheritedValue();
30    CTimer::get("XIOS").suspend();
31  }
32
33  bool cxios_is_defined_fieldgroup_add_offset(fieldgroup_Ptr fieldgroup_hdl)
34  {
35     CTimer::get("XIOS").resume();
36     bool isDefined = fieldgroup_hdl->add_offset.hasInheritedValue();
37     CTimer::get("XIOS").suspend();
38     return isDefined;
39  }
40
41
42  void cxios_set_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, const char * axis_ref, int axis_ref_size)
43  {
44    std::string axis_ref_str;
45    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
46    CTimer::get("XIOS").resume();
47    fieldgroup_hdl->axis_ref.setValue(axis_ref_str);
48    CTimer::get("XIOS").suspend();
49  }
50
51  void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)
52  {
53    CTimer::get("XIOS").resume();
54    if (!string_copy(fieldgroup_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
55      ERROR("void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)", << "Input string is too short");
56    CTimer::get("XIOS").suspend();
57  }
58
59  bool cxios_is_defined_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl)
60  {
61     CTimer::get("XIOS").resume();
62     bool isDefined = fieldgroup_hdl->axis_ref.hasInheritedValue();
63     CTimer::get("XIOS").suspend();
64     return isDefined;
65  }
66
67
68  void cxios_set_fieldgroup_build_workflow_graph(fieldgroup_Ptr fieldgroup_hdl, bool build_workflow_graph)
69  {
70    CTimer::get("XIOS").resume();
71    fieldgroup_hdl->build_workflow_graph.setValue(build_workflow_graph);
72    CTimer::get("XIOS").suspend();
73  }
74
75  void cxios_get_fieldgroup_build_workflow_graph(fieldgroup_Ptr fieldgroup_hdl, bool* build_workflow_graph)
76  {
77    CTimer::get("XIOS").resume();
78    *build_workflow_graph = fieldgroup_hdl->build_workflow_graph.getInheritedValue();
79    CTimer::get("XIOS").suspend();
80  }
81
82  bool cxios_is_defined_fieldgroup_build_workflow_graph(fieldgroup_Ptr fieldgroup_hdl)
83  {
84     CTimer::get("XIOS").resume();
85     bool isDefined = fieldgroup_hdl->build_workflow_graph.hasInheritedValue();
86     CTimer::get("XIOS").suspend();
87     return isDefined;
88  }
89
90
91  void cxios_set_fieldgroup_build_workflow_graph_end(fieldgroup_Ptr fieldgroup_hdl, cxios_duration build_workflow_graph_end_c)
92  {
93    CTimer::get("XIOS").resume();
94    fieldgroup_hdl->build_workflow_graph_end.allocate();
95    CDuration& build_workflow_graph_end = fieldgroup_hdl->build_workflow_graph_end.get();
96    build_workflow_graph_end.year = build_workflow_graph_end_c.year;
97    build_workflow_graph_end.month = build_workflow_graph_end_c.month;
98    build_workflow_graph_end.day = build_workflow_graph_end_c.day;
99    build_workflow_graph_end.hour = build_workflow_graph_end_c.hour;
100    build_workflow_graph_end.minute = build_workflow_graph_end_c.minute;
101    build_workflow_graph_end.second = build_workflow_graph_end_c.second;
102    build_workflow_graph_end.timestep = build_workflow_graph_end_c.timestep;
103    CTimer::get("XIOS").suspend();
104  }
105
106  void cxios_get_fieldgroup_build_workflow_graph_end(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* build_workflow_graph_end_c)
107  {
108    CTimer::get("XIOS").resume();
109    CDuration build_workflow_graph_end = fieldgroup_hdl->build_workflow_graph_end.getInheritedValue();
110    build_workflow_graph_end_c->year = build_workflow_graph_end.year;
111    build_workflow_graph_end_c->month = build_workflow_graph_end.month;
112    build_workflow_graph_end_c->day = build_workflow_graph_end.day;
113    build_workflow_graph_end_c->hour = build_workflow_graph_end.hour;
114    build_workflow_graph_end_c->minute = build_workflow_graph_end.minute;
115    build_workflow_graph_end_c->second = build_workflow_graph_end.second;
116    build_workflow_graph_end_c->timestep = build_workflow_graph_end.timestep;
117    CTimer::get("XIOS").suspend();
118  }
119
120  bool cxios_is_defined_fieldgroup_build_workflow_graph_end(fieldgroup_Ptr fieldgroup_hdl)
121  {
122     CTimer::get("XIOS").resume();
123     bool isDefined = fieldgroup_hdl->build_workflow_graph_end.hasInheritedValue();
124     CTimer::get("XIOS").suspend();
125     return isDefined;
126  }
127
128
129  void cxios_set_fieldgroup_build_workflow_graph_start(fieldgroup_Ptr fieldgroup_hdl, cxios_duration build_workflow_graph_start_c)
130  {
131    CTimer::get("XIOS").resume();
132    fieldgroup_hdl->build_workflow_graph_start.allocate();
133    CDuration& build_workflow_graph_start = fieldgroup_hdl->build_workflow_graph_start.get();
134    build_workflow_graph_start.year = build_workflow_graph_start_c.year;
135    build_workflow_graph_start.month = build_workflow_graph_start_c.month;
136    build_workflow_graph_start.day = build_workflow_graph_start_c.day;
137    build_workflow_graph_start.hour = build_workflow_graph_start_c.hour;
138    build_workflow_graph_start.minute = build_workflow_graph_start_c.minute;
139    build_workflow_graph_start.second = build_workflow_graph_start_c.second;
140    build_workflow_graph_start.timestep = build_workflow_graph_start_c.timestep;
141    CTimer::get("XIOS").suspend();
142  }
143
144  void cxios_get_fieldgroup_build_workflow_graph_start(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* build_workflow_graph_start_c)
145  {
146    CTimer::get("XIOS").resume();
147    CDuration build_workflow_graph_start = fieldgroup_hdl->build_workflow_graph_start.getInheritedValue();
148    build_workflow_graph_start_c->year = build_workflow_graph_start.year;
149    build_workflow_graph_start_c->month = build_workflow_graph_start.month;
150    build_workflow_graph_start_c->day = build_workflow_graph_start.day;
151    build_workflow_graph_start_c->hour = build_workflow_graph_start.hour;
152    build_workflow_graph_start_c->minute = build_workflow_graph_start.minute;
153    build_workflow_graph_start_c->second = build_workflow_graph_start.second;
154    build_workflow_graph_start_c->timestep = build_workflow_graph_start.timestep;
155    CTimer::get("XIOS").suspend();
156  }
157
158  bool cxios_is_defined_fieldgroup_build_workflow_graph_start(fieldgroup_Ptr fieldgroup_hdl)
159  {
160     CTimer::get("XIOS").resume();
161     bool isDefined = fieldgroup_hdl->build_workflow_graph_start.hasInheritedValue();
162     CTimer::get("XIOS").suspend();
163     return isDefined;
164  }
165
166
167  void cxios_set_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl, const char * cell_methods, int cell_methods_size)
168  {
169    std::string cell_methods_str;
170    if (!cstr2string(cell_methods, cell_methods_size, cell_methods_str)) return;
171    CTimer::get("XIOS").resume();
172    fieldgroup_hdl->cell_methods.setValue(cell_methods_str);
173    CTimer::get("XIOS").suspend();
174  }
175
176  void cxios_get_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods, int cell_methods_size)
177  {
178    CTimer::get("XIOS").resume();
179    if (!string_copy(fieldgroup_hdl->cell_methods.getInheritedValue(), cell_methods, cell_methods_size))
180      ERROR("void cxios_get_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods, int cell_methods_size)", << "Input string is too short");
181    CTimer::get("XIOS").suspend();
182  }
183
184  bool cxios_is_defined_fieldgroup_cell_methods(fieldgroup_Ptr fieldgroup_hdl)
185  {
186     CTimer::get("XIOS").resume();
187     bool isDefined = fieldgroup_hdl->cell_methods.hasInheritedValue();
188     CTimer::get("XIOS").suspend();
189     return isDefined;
190  }
191
192
193  void cxios_set_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl, const char * cell_methods_mode, int cell_methods_mode_size)
194  {
195    std::string cell_methods_mode_str;
196    if (!cstr2string(cell_methods_mode, cell_methods_mode_size, cell_methods_mode_str)) return;
197    CTimer::get("XIOS").resume();
198    fieldgroup_hdl->cell_methods_mode.fromString(cell_methods_mode_str);
199    CTimer::get("XIOS").suspend();
200  }
201
202  void cxios_get_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods_mode, int cell_methods_mode_size)
203  {
204    CTimer::get("XIOS").resume();
205    if (!string_copy(fieldgroup_hdl->cell_methods_mode.getInheritedStringValue(), cell_methods_mode, cell_methods_mode_size))
206      ERROR("void cxios_get_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl, char * cell_methods_mode, int cell_methods_mode_size)", << "Input string is too short");
207    CTimer::get("XIOS").suspend();
208  }
209
210  bool cxios_is_defined_fieldgroup_cell_methods_mode(fieldgroup_Ptr fieldgroup_hdl)
211  {
212     CTimer::get("XIOS").resume();
213     bool isDefined = fieldgroup_hdl->cell_methods_mode.hasInheritedValue();
214     CTimer::get("XIOS").suspend();
215     return isDefined;
216  }
217
218
219  void cxios_set_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool check_if_active)
220  {
221    CTimer::get("XIOS").resume();
222    fieldgroup_hdl->check_if_active.setValue(check_if_active);
223    CTimer::get("XIOS").suspend();
224  }
225
226  void cxios_get_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool* check_if_active)
227  {
228    CTimer::get("XIOS").resume();
229    *check_if_active = fieldgroup_hdl->check_if_active.getInheritedValue();
230    CTimer::get("XIOS").suspend();
231  }
232
233  bool cxios_is_defined_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl)
234  {
235     CTimer::get("XIOS").resume();
236     bool isDefined = fieldgroup_hdl->check_if_active.hasInheritedValue();
237     CTimer::get("XIOS").suspend();
238     return isDefined;
239  }
240
241
242  void cxios_set_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, const char * comment, int comment_size)
243  {
244    std::string comment_str;
245    if (!cstr2string(comment, comment_size, comment_str)) return;
246    CTimer::get("XIOS").resume();
247    fieldgroup_hdl->comment.setValue(comment_str);
248    CTimer::get("XIOS").suspend();
249  }
250
251  void cxios_get_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, char * comment, int comment_size)
252  {
253    CTimer::get("XIOS").resume();
254    if (!string_copy(fieldgroup_hdl->comment.getInheritedValue(), comment, comment_size))
255      ERROR("void cxios_get_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl, char * comment, int comment_size)", << "Input string is too short");
256    CTimer::get("XIOS").suspend();
257  }
258
259  bool cxios_is_defined_fieldgroup_comment(fieldgroup_Ptr fieldgroup_hdl)
260  {
261     CTimer::get("XIOS").resume();
262     bool isDefined = fieldgroup_hdl->comment.hasInheritedValue();
263     CTimer::get("XIOS").suspend();
264     return isDefined;
265  }
266
267
268  void cxios_set_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int compression_level)
269  {
270    CTimer::get("XIOS").resume();
271    fieldgroup_hdl->compression_level.setValue(compression_level);
272    CTimer::get("XIOS").suspend();
273  }
274
275  void cxios_get_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int* compression_level)
276  {
277    CTimer::get("XIOS").resume();
278    *compression_level = fieldgroup_hdl->compression_level.getInheritedValue();
279    CTimer::get("XIOS").suspend();
280  }
281
282  bool cxios_is_defined_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl)
283  {
284     CTimer::get("XIOS").resume();
285     bool isDefined = fieldgroup_hdl->compression_level.hasInheritedValue();
286     CTimer::get("XIOS").suspend();
287     return isDefined;
288  }
289
290
291  void cxios_set_fieldgroup_conversion_by_netcdf(fieldgroup_Ptr fieldgroup_hdl, bool conversion_by_netcdf)
292  {
293    CTimer::get("XIOS").resume();
294    fieldgroup_hdl->conversion_by_netcdf.setValue(conversion_by_netcdf);
295    CTimer::get("XIOS").suspend();
296  }
297
298  void cxios_get_fieldgroup_conversion_by_netcdf(fieldgroup_Ptr fieldgroup_hdl, bool* conversion_by_netcdf)
299  {
300    CTimer::get("XIOS").resume();
301    *conversion_by_netcdf = fieldgroup_hdl->conversion_by_netcdf.getInheritedValue();
302    CTimer::get("XIOS").suspend();
303  }
304
305  bool cxios_is_defined_fieldgroup_conversion_by_netcdf(fieldgroup_Ptr fieldgroup_hdl)
306  {
307     CTimer::get("XIOS").resume();
308     bool isDefined = fieldgroup_hdl->conversion_by_netcdf.hasInheritedValue();
309     CTimer::get("XIOS").suspend();
310     return isDefined;
311  }
312
313
314  void cxios_set_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double default_value)
315  {
316    CTimer::get("XIOS").resume();
317    fieldgroup_hdl->default_value.setValue(default_value);
318    CTimer::get("XIOS").suspend();
319  }
320
321  void cxios_get_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double* default_value)
322  {
323    CTimer::get("XIOS").resume();
324    *default_value = fieldgroup_hdl->default_value.getInheritedValue();
325    CTimer::get("XIOS").suspend();
326  }
327
328  bool cxios_is_defined_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl)
329  {
330     CTimer::get("XIOS").resume();
331     bool isDefined = fieldgroup_hdl->default_value.hasInheritedValue();
332     CTimer::get("XIOS").suspend();
333     return isDefined;
334  }
335
336
337  void cxios_set_fieldgroup_detect_missing_value(fieldgroup_Ptr fieldgroup_hdl, bool detect_missing_value)
338  {
339    CTimer::get("XIOS").resume();
340    fieldgroup_hdl->detect_missing_value.setValue(detect_missing_value);
341    CTimer::get("XIOS").suspend();
342  }
343
344  void cxios_get_fieldgroup_detect_missing_value(fieldgroup_Ptr fieldgroup_hdl, bool* detect_missing_value)
345  {
346    CTimer::get("XIOS").resume();
347    *detect_missing_value = fieldgroup_hdl->detect_missing_value.getInheritedValue();
348    CTimer::get("XIOS").suspend();
349  }
350
351  bool cxios_is_defined_fieldgroup_detect_missing_value(fieldgroup_Ptr fieldgroup_hdl)
352  {
353     CTimer::get("XIOS").resume();
354     bool isDefined = fieldgroup_hdl->detect_missing_value.hasInheritedValue();
355     CTimer::get("XIOS").suspend();
356     return isDefined;
357  }
358
359
360  void cxios_set_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, const char * domain_ref, int domain_ref_size)
361  {
362    std::string domain_ref_str;
363    if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
364    CTimer::get("XIOS").resume();
365    fieldgroup_hdl->domain_ref.setValue(domain_ref_str);
366    CTimer::get("XIOS").suspend();
367  }
368
369  void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)
370  {
371    CTimer::get("XIOS").resume();
372    if (!string_copy(fieldgroup_hdl->domain_ref.getInheritedValue(), domain_ref, domain_ref_size))
373      ERROR("void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)", << "Input string is too short");
374    CTimer::get("XIOS").suspend();
375  }
376
377  bool cxios_is_defined_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl)
378  {
379     CTimer::get("XIOS").resume();
380     bool isDefined = fieldgroup_hdl->domain_ref.hasInheritedValue();
381     CTimer::get("XIOS").suspend();
382     return isDefined;
383  }
384
385
386  void cxios_set_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool enabled)
387  {
388    CTimer::get("XIOS").resume();
389    fieldgroup_hdl->enabled.setValue(enabled);
390    CTimer::get("XIOS").suspend();
391  }
392
393  void cxios_get_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool* enabled)
394  {
395    CTimer::get("XIOS").resume();
396    *enabled = fieldgroup_hdl->enabled.getInheritedValue();
397    CTimer::get("XIOS").suspend();
398  }
399
400  bool cxios_is_defined_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl)
401  {
402     CTimer::get("XIOS").resume();
403     bool isDefined = fieldgroup_hdl->enabled.hasInheritedValue();
404     CTimer::get("XIOS").suspend();
405     return isDefined;
406  }
407
408
409  void cxios_set_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl, const char * expr, int expr_size)
410  {
411    std::string expr_str;
412    if (!cstr2string(expr, expr_size, expr_str)) return;
413    CTimer::get("XIOS").resume();
414    fieldgroup_hdl->expr.setValue(expr_str);
415    CTimer::get("XIOS").suspend();
416  }
417
418  void cxios_get_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl, char * expr, int expr_size)
419  {
420    CTimer::get("XIOS").resume();
421    if (!string_copy(fieldgroup_hdl->expr.getInheritedValue(), expr, expr_size))
422      ERROR("void cxios_get_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl, char * expr, int expr_size)", << "Input string is too short");
423    CTimer::get("XIOS").suspend();
424  }
425
426  bool cxios_is_defined_fieldgroup_expr(fieldgroup_Ptr fieldgroup_hdl)
427  {
428     CTimer::get("XIOS").resume();
429     bool isDefined = fieldgroup_hdl->expr.hasInheritedValue();
430     CTimer::get("XIOS").suspend();
431     return isDefined;
432  }
433
434
435  void cxios_set_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, const char * field_ref, int field_ref_size)
436  {
437    std::string field_ref_str;
438    if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return;
439    CTimer::get("XIOS").resume();
440    fieldgroup_hdl->field_ref.setValue(field_ref_str);
441    CTimer::get("XIOS").suspend();
442  }
443
444  void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)
445  {
446    CTimer::get("XIOS").resume();
447    if (!string_copy(fieldgroup_hdl->field_ref.getInheritedValue(), field_ref, field_ref_size))
448      ERROR("void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)", << "Input string is too short");
449    CTimer::get("XIOS").suspend();
450  }
451
452  bool cxios_is_defined_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl)
453  {
454     CTimer::get("XIOS").resume();
455     bool isDefined = fieldgroup_hdl->field_ref.hasInheritedValue();
456     CTimer::get("XIOS").suspend();
457     return isDefined;
458  }
459
460
461  void cxios_set_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, cxios_duration freq_offset_c)
462  {
463    CTimer::get("XIOS").resume();
464    fieldgroup_hdl->freq_offset.allocate();
465    CDuration& freq_offset = fieldgroup_hdl->freq_offset.get();
466    freq_offset.year = freq_offset_c.year;
467    freq_offset.month = freq_offset_c.month;
468    freq_offset.day = freq_offset_c.day;
469    freq_offset.hour = freq_offset_c.hour;
470    freq_offset.minute = freq_offset_c.minute;
471    freq_offset.second = freq_offset_c.second;
472    freq_offset.timestep = freq_offset_c.timestep;
473    CTimer::get("XIOS").suspend();
474  }
475
476  void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* freq_offset_c)
477  {
478    CTimer::get("XIOS").resume();
479    CDuration freq_offset = fieldgroup_hdl->freq_offset.getInheritedValue();
480    freq_offset_c->year = freq_offset.year;
481    freq_offset_c->month = freq_offset.month;
482    freq_offset_c->day = freq_offset.day;
483    freq_offset_c->hour = freq_offset.hour;
484    freq_offset_c->minute = freq_offset.minute;
485    freq_offset_c->second = freq_offset.second;
486    freq_offset_c->timestep = freq_offset.timestep;
487    CTimer::get("XIOS").suspend();
488  }
489
490  bool cxios_is_defined_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl)
491  {
492     CTimer::get("XIOS").resume();
493     bool isDefined = fieldgroup_hdl->freq_offset.hasInheritedValue();
494     CTimer::get("XIOS").suspend();
495     return isDefined;
496  }
497
498
499  void cxios_set_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, cxios_duration freq_op_c)
500  {
501    CTimer::get("XIOS").resume();
502    fieldgroup_hdl->freq_op.allocate();
503    CDuration& freq_op = fieldgroup_hdl->freq_op.get();
504    freq_op.year = freq_op_c.year;
505    freq_op.month = freq_op_c.month;
506    freq_op.day = freq_op_c.day;
507    freq_op.hour = freq_op_c.hour;
508    freq_op.minute = freq_op_c.minute;
509    freq_op.second = freq_op_c.second;
510    freq_op.timestep = freq_op_c.timestep;
511    CTimer::get("XIOS").suspend();
512  }
513
514  void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* freq_op_c)
515  {
516    CTimer::get("XIOS").resume();
517    CDuration freq_op = fieldgroup_hdl->freq_op.getInheritedValue();
518    freq_op_c->year = freq_op.year;
519    freq_op_c->month = freq_op.month;
520    freq_op_c->day = freq_op.day;
521    freq_op_c->hour = freq_op.hour;
522    freq_op_c->minute = freq_op.minute;
523    freq_op_c->second = freq_op.second;
524    freq_op_c->timestep = freq_op.timestep;
525    CTimer::get("XIOS").suspend();
526  }
527
528  bool cxios_is_defined_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl)
529  {
530     CTimer::get("XIOS").resume();
531     bool isDefined = fieldgroup_hdl->freq_op.hasInheritedValue();
532     CTimer::get("XIOS").suspend();
533     return isDefined;
534  }
535
536
537  void cxios_set_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl, const char * grid_path, int grid_path_size)
538  {
539    std::string grid_path_str;
540    if (!cstr2string(grid_path, grid_path_size, grid_path_str)) return;
541    CTimer::get("XIOS").resume();
542    fieldgroup_hdl->grid_path.setValue(grid_path_str);
543    CTimer::get("XIOS").suspend();
544  }
545
546  void cxios_get_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl, char * grid_path, int grid_path_size)
547  {
548    CTimer::get("XIOS").resume();
549    if (!string_copy(fieldgroup_hdl->grid_path.getInheritedValue(), grid_path, grid_path_size))
550      ERROR("void cxios_get_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl, char * grid_path, int grid_path_size)", << "Input string is too short");
551    CTimer::get("XIOS").suspend();
552  }
553
554  bool cxios_is_defined_fieldgroup_grid_path(fieldgroup_Ptr fieldgroup_hdl)
555  {
556     CTimer::get("XIOS").resume();
557     bool isDefined = fieldgroup_hdl->grid_path.hasInheritedValue();
558     CTimer::get("XIOS").suspend();
559     return isDefined;
560  }
561
562
563  void cxios_set_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, const char * grid_ref, int grid_ref_size)
564  {
565    std::string grid_ref_str;
566    if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;
567    CTimer::get("XIOS").resume();
568    fieldgroup_hdl->grid_ref.setValue(grid_ref_str);
569    CTimer::get("XIOS").suspend();
570  }
571
572  void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)
573  {
574    CTimer::get("XIOS").resume();
575    if (!string_copy(fieldgroup_hdl->grid_ref.getInheritedValue(), grid_ref, grid_ref_size))
576      ERROR("void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)", << "Input string is too short");
577    CTimer::get("XIOS").suspend();
578  }
579
580  bool cxios_is_defined_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl)
581  {
582     CTimer::get("XIOS").resume();
583     bool isDefined = fieldgroup_hdl->grid_ref.hasInheritedValue();
584     CTimer::get("XIOS").suspend();
585     return isDefined;
586  }
587
588
589  void cxios_set_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, const char * group_ref, int group_ref_size)
590  {
591    std::string group_ref_str;
592    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
593    CTimer::get("XIOS").resume();
594    fieldgroup_hdl->group_ref.setValue(group_ref_str);
595    CTimer::get("XIOS").suspend();
596  }
597
598  void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)
599  {
600    CTimer::get("XIOS").resume();
601    if (!string_copy(fieldgroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
602      ERROR("void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
603    CTimer::get("XIOS").suspend();
604  }
605
606  bool cxios_is_defined_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl)
607  {
608     CTimer::get("XIOS").resume();
609     bool isDefined = fieldgroup_hdl->group_ref.hasInheritedValue();
610     CTimer::get("XIOS").suspend();
611     return isDefined;
612  }
613
614
615  void cxios_set_fieldgroup_indexed_output(fieldgroup_Ptr fieldgroup_hdl, bool indexed_output)
616  {
617    CTimer::get("XIOS").resume();
618    fieldgroup_hdl->indexed_output.setValue(indexed_output);
619    CTimer::get("XIOS").suspend();
620  }
621
622  void cxios_get_fieldgroup_indexed_output(fieldgroup_Ptr fieldgroup_hdl, bool* indexed_output)
623  {
624    CTimer::get("XIOS").resume();
625    *indexed_output = fieldgroup_hdl->indexed_output.getInheritedValue();
626    CTimer::get("XIOS").suspend();
627  }
628
629  bool cxios_is_defined_fieldgroup_indexed_output(fieldgroup_Ptr fieldgroup_hdl)
630  {
631     CTimer::get("XIOS").resume();
632     bool isDefined = fieldgroup_hdl->indexed_output.hasInheritedValue();
633     CTimer::get("XIOS").suspend();
634     return isDefined;
635  }
636
637
638  void cxios_set_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int level)
639  {
640    CTimer::get("XIOS").resume();
641    fieldgroup_hdl->level.setValue(level);
642    CTimer::get("XIOS").suspend();
643  }
644
645  void cxios_get_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int* level)
646  {
647    CTimer::get("XIOS").resume();
648    *level = fieldgroup_hdl->level.getInheritedValue();
649    CTimer::get("XIOS").suspend();
650  }
651
652  bool cxios_is_defined_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl)
653  {
654     CTimer::get("XIOS").resume();
655     bool isDefined = fieldgroup_hdl->level.hasInheritedValue();
656     CTimer::get("XIOS").suspend();
657     return isDefined;
658  }
659
660
661  void cxios_set_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, const char * long_name, int long_name_size)
662  {
663    std::string long_name_str;
664    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
665    CTimer::get("XIOS").resume();
666    fieldgroup_hdl->long_name.setValue(long_name_str);
667    CTimer::get("XIOS").suspend();
668  }
669
670  void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)
671  {
672    CTimer::get("XIOS").resume();
673    if (!string_copy(fieldgroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
674      ERROR("void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
675    CTimer::get("XIOS").suspend();
676  }
677
678  bool cxios_is_defined_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl)
679  {
680     CTimer::get("XIOS").resume();
681     bool isDefined = fieldgroup_hdl->long_name.hasInheritedValue();
682     CTimer::get("XIOS").suspend();
683     return isDefined;
684  }
685
686
687  void cxios_set_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, const char * name, int name_size)
688  {
689    std::string name_str;
690    if (!cstr2string(name, name_size, name_str)) return;
691    CTimer::get("XIOS").resume();
692    fieldgroup_hdl->name.setValue(name_str);
693    CTimer::get("XIOS").suspend();
694  }
695
696  void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)
697  {
698    CTimer::get("XIOS").resume();
699    if (!string_copy(fieldgroup_hdl->name.getInheritedValue(), name, name_size))
700      ERROR("void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)", << "Input string is too short");
701    CTimer::get("XIOS").suspend();
702  }
703
704  bool cxios_is_defined_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl)
705  {
706     CTimer::get("XIOS").resume();
707     bool isDefined = fieldgroup_hdl->name.hasInheritedValue();
708     CTimer::get("XIOS").suspend();
709     return isDefined;
710  }
711
712
713  void cxios_set_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, const char * operation, int operation_size)
714  {
715    std::string operation_str;
716    if (!cstr2string(operation, operation_size, operation_str)) return;
717    CTimer::get("XIOS").resume();
718    fieldgroup_hdl->operation.setValue(operation_str);
719    CTimer::get("XIOS").suspend();
720  }
721
722  void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)
723  {
724    CTimer::get("XIOS").resume();
725    if (!string_copy(fieldgroup_hdl->operation.getInheritedValue(), operation, operation_size))
726      ERROR("void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)", << "Input string is too short");
727    CTimer::get("XIOS").suspend();
728  }
729
730  bool cxios_is_defined_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl)
731  {
732     CTimer::get("XIOS").resume();
733     bool isDefined = fieldgroup_hdl->operation.hasInheritedValue();
734     CTimer::get("XIOS").suspend();
735     return isDefined;
736  }
737
738
739  void cxios_set_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int prec)
740  {
741    CTimer::get("XIOS").resume();
742    fieldgroup_hdl->prec.setValue(prec);
743    CTimer::get("XIOS").suspend();
744  }
745
746  void cxios_get_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int* prec)
747  {
748    CTimer::get("XIOS").resume();
749    *prec = fieldgroup_hdl->prec.getInheritedValue();
750    CTimer::get("XIOS").suspend();
751  }
752
753  bool cxios_is_defined_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl)
754  {
755     CTimer::get("XIOS").resume();
756     bool isDefined = fieldgroup_hdl->prec.hasInheritedValue();
757     CTimer::get("XIOS").suspend();
758     return isDefined;
759  }
760
761
762  void cxios_set_fieldgroup_read_access(fieldgroup_Ptr fieldgroup_hdl, bool read_access)
763  {
764    CTimer::get("XIOS").resume();
765    fieldgroup_hdl->read_access.setValue(read_access);
766    CTimer::get("XIOS").suspend();
767  }
768
769  void cxios_get_fieldgroup_read_access(fieldgroup_Ptr fieldgroup_hdl, bool* read_access)
770  {
771    CTimer::get("XIOS").resume();
772    *read_access = fieldgroup_hdl->read_access.getInheritedValue();
773    CTimer::get("XIOS").suspend();
774  }
775
776  bool cxios_is_defined_fieldgroup_read_access(fieldgroup_Ptr fieldgroup_hdl)
777  {
778     CTimer::get("XIOS").resume();
779     bool isDefined = fieldgroup_hdl->read_access.hasInheritedValue();
780     CTimer::get("XIOS").suspend();
781     return isDefined;
782  }
783
784
785  void cxios_set_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl, const char * scalar_ref, int scalar_ref_size)
786  {
787    std::string scalar_ref_str;
788    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
789    CTimer::get("XIOS").resume();
790    fieldgroup_hdl->scalar_ref.setValue(scalar_ref_str);
791    CTimer::get("XIOS").suspend();
792  }
793
794  void cxios_get_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl, char * scalar_ref, int scalar_ref_size)
795  {
796    CTimer::get("XIOS").resume();
797    if (!string_copy(fieldgroup_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
798      ERROR("void cxios_get_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
799    CTimer::get("XIOS").suspend();
800  }
801
802  bool cxios_is_defined_fieldgroup_scalar_ref(fieldgroup_Ptr fieldgroup_hdl)
803  {
804     CTimer::get("XIOS").resume();
805     bool isDefined = fieldgroup_hdl->scalar_ref.hasInheritedValue();
806     CTimer::get("XIOS").suspend();
807     return isDefined;
808  }
809
810
811  void cxios_set_fieldgroup_scale_factor(fieldgroup_Ptr fieldgroup_hdl, double scale_factor)
812  {
813    CTimer::get("XIOS").resume();
814    fieldgroup_hdl->scale_factor.setValue(scale_factor);
815    CTimer::get("XIOS").suspend();
816  }
817
818  void cxios_get_fieldgroup_scale_factor(fieldgroup_Ptr fieldgroup_hdl, double* scale_factor)
819  {
820    CTimer::get("XIOS").resume();
821    *scale_factor = fieldgroup_hdl->scale_factor.getInheritedValue();
822    CTimer::get("XIOS").suspend();
823  }
824
825  bool cxios_is_defined_fieldgroup_scale_factor(fieldgroup_Ptr fieldgroup_hdl)
826  {
827     CTimer::get("XIOS").resume();
828     bool isDefined = fieldgroup_hdl->scale_factor.hasInheritedValue();
829     CTimer::get("XIOS").suspend();
830     return isDefined;
831  }
832
833
834  void cxios_set_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, const char * standard_name, int standard_name_size)
835  {
836    std::string standard_name_str;
837    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
838    CTimer::get("XIOS").resume();
839    fieldgroup_hdl->standard_name.setValue(standard_name_str);
840    CTimer::get("XIOS").suspend();
841  }
842
843  void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)
844  {
845    CTimer::get("XIOS").resume();
846    if (!string_copy(fieldgroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
847      ERROR("void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
848    CTimer::get("XIOS").suspend();
849  }
850
851  bool cxios_is_defined_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl)
852  {
853     CTimer::get("XIOS").resume();
854     bool isDefined = fieldgroup_hdl->standard_name.hasInheritedValue();
855     CTimer::get("XIOS").suspend();
856     return isDefined;
857  }
858
859
860  void cxios_set_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl, bool ts_enabled)
861  {
862    CTimer::get("XIOS").resume();
863    fieldgroup_hdl->ts_enabled.setValue(ts_enabled);
864    CTimer::get("XIOS").suspend();
865  }
866
867  void cxios_get_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl, bool* ts_enabled)
868  {
869    CTimer::get("XIOS").resume();
870    *ts_enabled = fieldgroup_hdl->ts_enabled.getInheritedValue();
871    CTimer::get("XIOS").suspend();
872  }
873
874  bool cxios_is_defined_fieldgroup_ts_enabled(fieldgroup_Ptr fieldgroup_hdl)
875  {
876     CTimer::get("XIOS").resume();
877     bool isDefined = fieldgroup_hdl->ts_enabled.hasInheritedValue();
878     CTimer::get("XIOS").suspend();
879     return isDefined;
880  }
881
882
883  void cxios_set_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl, cxios_duration ts_split_freq_c)
884  {
885    CTimer::get("XIOS").resume();
886    fieldgroup_hdl->ts_split_freq.allocate();
887    CDuration& ts_split_freq = fieldgroup_hdl->ts_split_freq.get();
888    ts_split_freq.year = ts_split_freq_c.year;
889    ts_split_freq.month = ts_split_freq_c.month;
890    ts_split_freq.day = ts_split_freq_c.day;
891    ts_split_freq.hour = ts_split_freq_c.hour;
892    ts_split_freq.minute = ts_split_freq_c.minute;
893    ts_split_freq.second = ts_split_freq_c.second;
894    ts_split_freq.timestep = ts_split_freq_c.timestep;
895    CTimer::get("XIOS").suspend();
896  }
897
898  void cxios_get_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl, cxios_duration* ts_split_freq_c)
899  {
900    CTimer::get("XIOS").resume();
901    CDuration ts_split_freq = fieldgroup_hdl->ts_split_freq.getInheritedValue();
902    ts_split_freq_c->year = ts_split_freq.year;
903    ts_split_freq_c->month = ts_split_freq.month;
904    ts_split_freq_c->day = ts_split_freq.day;
905    ts_split_freq_c->hour = ts_split_freq.hour;
906    ts_split_freq_c->minute = ts_split_freq.minute;
907    ts_split_freq_c->second = ts_split_freq.second;
908    ts_split_freq_c->timestep = ts_split_freq.timestep;
909    CTimer::get("XIOS").suspend();
910  }
911
912  bool cxios_is_defined_fieldgroup_ts_split_freq(fieldgroup_Ptr fieldgroup_hdl)
913  {
914     CTimer::get("XIOS").resume();
915     bool isDefined = fieldgroup_hdl->ts_split_freq.hasInheritedValue();
916     CTimer::get("XIOS").suspend();
917     return isDefined;
918  }
919
920
921  void cxios_set_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, const char * unit, int unit_size)
922  {
923    std::string unit_str;
924    if (!cstr2string(unit, unit_size, unit_str)) return;
925    CTimer::get("XIOS").resume();
926    fieldgroup_hdl->unit.setValue(unit_str);
927    CTimer::get("XIOS").suspend();
928  }
929
930  void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)
931  {
932    CTimer::get("XIOS").resume();
933    if (!string_copy(fieldgroup_hdl->unit.getInheritedValue(), unit, unit_size))
934      ERROR("void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)", << "Input string is too short");
935    CTimer::get("XIOS").suspend();
936  }
937
938  bool cxios_is_defined_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl)
939  {
940     CTimer::get("XIOS").resume();
941     bool isDefined = fieldgroup_hdl->unit.hasInheritedValue();
942     CTimer::get("XIOS").suspend();
943     return isDefined;
944  }
945
946
947  void cxios_set_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl, double valid_max)
948  {
949    CTimer::get("XIOS").resume();
950    fieldgroup_hdl->valid_max.setValue(valid_max);
951    CTimer::get("XIOS").suspend();
952  }
953
954  void cxios_get_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl, double* valid_max)
955  {
956    CTimer::get("XIOS").resume();
957    *valid_max = fieldgroup_hdl->valid_max.getInheritedValue();
958    CTimer::get("XIOS").suspend();
959  }
960
961  bool cxios_is_defined_fieldgroup_valid_max(fieldgroup_Ptr fieldgroup_hdl)
962  {
963     CTimer::get("XIOS").resume();
964     bool isDefined = fieldgroup_hdl->valid_max.hasInheritedValue();
965     CTimer::get("XIOS").suspend();
966     return isDefined;
967  }
968
969
970  void cxios_set_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl, double valid_min)
971  {
972    CTimer::get("XIOS").resume();
973    fieldgroup_hdl->valid_min.setValue(valid_min);
974    CTimer::get("XIOS").suspend();
975  }
976
977  void cxios_get_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl, double* valid_min)
978  {
979    CTimer::get("XIOS").resume();
980    *valid_min = fieldgroup_hdl->valid_min.getInheritedValue();
981    CTimer::get("XIOS").suspend();
982  }
983
984  bool cxios_is_defined_fieldgroup_valid_min(fieldgroup_Ptr fieldgroup_hdl)
985  {
986     CTimer::get("XIOS").resume();
987     bool isDefined = fieldgroup_hdl->valid_min.hasInheritedValue();
988     CTimer::get("XIOS").suspend();
989     return isDefined;
990  }
991}
Note: See TracBrowser for help on using the repository browser.