source: XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp @ 581

Last change on this file since 581 was 581, checked in by rlacroix, 9 years ago

Fix the Fortran interface generation to avoid generating dead code that caused a timer not to be stopped.

  • 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: 15.2 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 "icdate.hpp"
13#include "timer.hpp"
14#include "node_type.hpp"
15
16extern "C"
17{
18  typedef xios::CFileGroup* filegroup_Ptr;
19
20  void cxios_set_filegroup_append(filegroup_Ptr filegroup_hdl, bool append)
21  {
22    CTimer::get("XIOS").resume();
23    filegroup_hdl->append.setValue(append);
24    CTimer::get("XIOS").suspend();
25  }
26
27  void cxios_get_filegroup_append(filegroup_Ptr filegroup_hdl, bool* append)
28  {
29    CTimer::get("XIOS").resume();
30    *append = filegroup_hdl->append.getInheritedValue();
31    CTimer::get("XIOS").suspend();
32  }
33
34  bool cxios_is_defined_filegroup_append(filegroup_Ptr filegroup_hdl)
35  {
36     CTimer::get("XIOS").resume();
37     bool isDefined = filegroup_hdl->append.hasInheritedValue();
38     CTimer::get("XIOS").suspend();
39     return isDefined;
40  }
41
42
43  void cxios_set_filegroup_description(filegroup_Ptr filegroup_hdl, const char * description, int description_size)
44  {
45    std::string description_str;
46    if (!cstr2string(description, description_size, description_str)) return;
47    CTimer::get("XIOS").resume();
48    filegroup_hdl->description.setValue(description_str);
49    CTimer::get("XIOS").suspend();
50  }
51
52  void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)
53  {
54    CTimer::get("XIOS").resume();
55    if (!string_copy(filegroup_hdl->description.getInheritedValue(), description, description_size))
56      ERROR("void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)", << "Input string is too short");
57    CTimer::get("XIOS").suspend();
58  }
59
60  bool cxios_is_defined_filegroup_description(filegroup_Ptr filegroup_hdl)
61  {
62     CTimer::get("XIOS").resume();
63     bool isDefined = filegroup_hdl->description.hasInheritedValue();
64     CTimer::get("XIOS").suspend();
65     return isDefined;
66  }
67
68
69  void cxios_set_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool enabled)
70  {
71    CTimer::get("XIOS").resume();
72    filegroup_hdl->enabled.setValue(enabled);
73    CTimer::get("XIOS").suspend();
74  }
75
76  void cxios_get_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool* enabled)
77  {
78    CTimer::get("XIOS").resume();
79    *enabled = filegroup_hdl->enabled.getInheritedValue();
80    CTimer::get("XIOS").suspend();
81  }
82
83  bool cxios_is_defined_filegroup_enabled(filegroup_Ptr filegroup_hdl)
84  {
85     CTimer::get("XIOS").resume();
86     bool isDefined = filegroup_hdl->enabled.hasInheritedValue();
87     CTimer::get("XIOS").suspend();
88     return isDefined;
89  }
90
91
92  void cxios_set_filegroup_format(filegroup_Ptr filegroup_hdl, const char * format, int format_size)
93  {
94    std::string format_str;
95    if (!cstr2string(format, format_size, format_str)) return;
96    CTimer::get("XIOS").resume();
97    filegroup_hdl->format.fromString(format_str);
98    CTimer::get("XIOS").suspend();
99  }
100
101  void cxios_get_filegroup_format(filegroup_Ptr filegroup_hdl, char * format, int format_size)
102  {
103    CTimer::get("XIOS").resume();
104    if (!string_copy(filegroup_hdl->format.getInheritedStringValue(), format, format_size))
105      ERROR("void cxios_get_filegroup_format(filegroup_Ptr filegroup_hdl, char * format, int format_size)", << "Input string is too short");
106    CTimer::get("XIOS").suspend();
107  }
108
109  bool cxios_is_defined_filegroup_format(filegroup_Ptr filegroup_hdl)
110  {
111     CTimer::get("XIOS").resume();
112     bool isDefined = filegroup_hdl->format.hasInheritedValue();
113     CTimer::get("XIOS").suspend();
114     return isDefined;
115  }
116
117
118  void cxios_set_filegroup_group_ref(filegroup_Ptr filegroup_hdl, const char * group_ref, int group_ref_size)
119  {
120    std::string group_ref_str;
121    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
122    CTimer::get("XIOS").resume();
123    filegroup_hdl->group_ref.setValue(group_ref_str);
124    CTimer::get("XIOS").suspend();
125  }
126
127  void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)
128  {
129    CTimer::get("XIOS").resume();
130    if (!string_copy(filegroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
131      ERROR("void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
132    CTimer::get("XIOS").suspend();
133  }
134
135  bool cxios_is_defined_filegroup_group_ref(filegroup_Ptr filegroup_hdl)
136  {
137     CTimer::get("XIOS").resume();
138     bool isDefined = filegroup_hdl->group_ref.hasInheritedValue();
139     CTimer::get("XIOS").suspend();
140     return isDefined;
141  }
142
143
144  void cxios_set_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int min_digits)
145  {
146    CTimer::get("XIOS").resume();
147    filegroup_hdl->min_digits.setValue(min_digits);
148    CTimer::get("XIOS").suspend();
149  }
150
151  void cxios_get_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int* min_digits)
152  {
153    CTimer::get("XIOS").resume();
154    *min_digits = filegroup_hdl->min_digits.getInheritedValue();
155    CTimer::get("XIOS").suspend();
156  }
157
158  bool cxios_is_defined_filegroup_min_digits(filegroup_Ptr filegroup_hdl)
159  {
160     CTimer::get("XIOS").resume();
161     bool isDefined = filegroup_hdl->min_digits.hasInheritedValue();
162     CTimer::get("XIOS").suspend();
163     return isDefined;
164  }
165
166
167  void cxios_set_filegroup_name(filegroup_Ptr filegroup_hdl, const char * name, int name_size)
168  {
169    std::string name_str;
170    if (!cstr2string(name, name_size, name_str)) return;
171    CTimer::get("XIOS").resume();
172    filegroup_hdl->name.setValue(name_str);
173    CTimer::get("XIOS").suspend();
174  }
175
176  void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)
177  {
178    CTimer::get("XIOS").resume();
179    if (!string_copy(filegroup_hdl->name.getInheritedValue(), name, name_size))
180      ERROR("void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)", << "Input string is too short");
181    CTimer::get("XIOS").suspend();
182  }
183
184  bool cxios_is_defined_filegroup_name(filegroup_Ptr filegroup_hdl)
185  {
186     CTimer::get("XIOS").resume();
187     bool isDefined = filegroup_hdl->name.hasInheritedValue();
188     CTimer::get("XIOS").suspend();
189     return isDefined;
190  }
191
192
193  void cxios_set_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, const char * name_suffix, int name_suffix_size)
194  {
195    std::string name_suffix_str;
196    if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
197    CTimer::get("XIOS").resume();
198    filegroup_hdl->name_suffix.setValue(name_suffix_str);
199    CTimer::get("XIOS").suspend();
200  }
201
202  void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)
203  {
204    CTimer::get("XIOS").resume();
205    if (!string_copy(filegroup_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size))
206      ERROR("void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short");
207    CTimer::get("XIOS").suspend();
208  }
209
210  bool cxios_is_defined_filegroup_name_suffix(filegroup_Ptr filegroup_hdl)
211  {
212     CTimer::get("XIOS").resume();
213     bool isDefined = filegroup_hdl->name_suffix.hasInheritedValue();
214     CTimer::get("XIOS").suspend();
215     return isDefined;
216  }
217
218
219  void cxios_set_filegroup_output_freq(filegroup_Ptr filegroup_hdl, cxios_duration output_freq_c)
220  {
221    CTimer::get("XIOS").resume();
222    filegroup_hdl->output_freq.allocate();
223    CDuration& output_freq = filegroup_hdl->output_freq.get();
224    output_freq.year = output_freq_c.year;
225    output_freq.month = output_freq_c.month;
226    output_freq.day = output_freq_c.day;
227    output_freq.hour = output_freq_c.hour;
228    output_freq.minute = output_freq_c.minute;
229    output_freq.second = output_freq_c.second;
230    output_freq.timestep = output_freq_c.timestep;
231    CTimer::get("XIOS").suspend();
232  }
233
234  void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, cxios_duration* output_freq_c)
235  {
236    CTimer::get("XIOS").resume();
237    CDuration output_freq = filegroup_hdl->output_freq.getInheritedValue();
238    output_freq_c->year = output_freq.year;
239    output_freq_c->month = output_freq.month;
240    output_freq_c->day = output_freq.day;
241    output_freq_c->hour = output_freq.hour;
242    output_freq_c->minute = output_freq.minute;
243    output_freq_c->second = output_freq.second;
244    output_freq_c->timestep = output_freq.timestep;
245    CTimer::get("XIOS").suspend();
246  }
247
248  bool cxios_is_defined_filegroup_output_freq(filegroup_Ptr filegroup_hdl)
249  {
250     CTimer::get("XIOS").resume();
251     bool isDefined = filegroup_hdl->output_freq.hasInheritedValue();
252     CTimer::get("XIOS").suspend();
253     return isDefined;
254  }
255
256
257  void cxios_set_filegroup_output_level(filegroup_Ptr filegroup_hdl, int output_level)
258  {
259    CTimer::get("XIOS").resume();
260    filegroup_hdl->output_level.setValue(output_level);
261    CTimer::get("XIOS").suspend();
262  }
263
264  void cxios_get_filegroup_output_level(filegroup_Ptr filegroup_hdl, int* output_level)
265  {
266    CTimer::get("XIOS").resume();
267    *output_level = filegroup_hdl->output_level.getInheritedValue();
268    CTimer::get("XIOS").suspend();
269  }
270
271  bool cxios_is_defined_filegroup_output_level(filegroup_Ptr filegroup_hdl)
272  {
273     CTimer::get("XIOS").resume();
274     bool isDefined = filegroup_hdl->output_level.hasInheritedValue();
275     CTimer::get("XIOS").suspend();
276     return isDefined;
277  }
278
279
280  void cxios_set_filegroup_par_access(filegroup_Ptr filegroup_hdl, const char * par_access, int par_access_size)
281  {
282    std::string par_access_str;
283    if (!cstr2string(par_access, par_access_size, par_access_str)) return;
284    CTimer::get("XIOS").resume();
285    filegroup_hdl->par_access.fromString(par_access_str);
286    CTimer::get("XIOS").suspend();
287  }
288
289  void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)
290  {
291    CTimer::get("XIOS").resume();
292    if (!string_copy(filegroup_hdl->par_access.getInheritedStringValue(), par_access, par_access_size))
293      ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", << "Input string is too short");
294    CTimer::get("XIOS").suspend();
295  }
296
297  bool cxios_is_defined_filegroup_par_access(filegroup_Ptr filegroup_hdl)
298  {
299     CTimer::get("XIOS").resume();
300     bool isDefined = filegroup_hdl->par_access.hasInheritedValue();
301     CTimer::get("XIOS").suspend();
302     return isDefined;
303  }
304
305
306  void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, cxios_duration split_freq_c)
307  {
308    CTimer::get("XIOS").resume();
309    filegroup_hdl->split_freq.allocate();
310    CDuration& split_freq = filegroup_hdl->split_freq.get();
311    split_freq.year = split_freq_c.year;
312    split_freq.month = split_freq_c.month;
313    split_freq.day = split_freq_c.day;
314    split_freq.hour = split_freq_c.hour;
315    split_freq.minute = split_freq_c.minute;
316    split_freq.second = split_freq_c.second;
317    split_freq.timestep = split_freq_c.timestep;
318    CTimer::get("XIOS").suspend();
319  }
320
321  void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, cxios_duration* split_freq_c)
322  {
323    CTimer::get("XIOS").resume();
324    CDuration split_freq = filegroup_hdl->split_freq.getInheritedValue();
325    split_freq_c->year = split_freq.year;
326    split_freq_c->month = split_freq.month;
327    split_freq_c->day = split_freq.day;
328    split_freq_c->hour = split_freq.hour;
329    split_freq_c->minute = split_freq.minute;
330    split_freq_c->second = split_freq.second;
331    split_freq_c->timestep = split_freq.timestep;
332    CTimer::get("XIOS").suspend();
333  }
334
335  bool cxios_is_defined_filegroup_split_freq(filegroup_Ptr filegroup_hdl)
336  {
337     CTimer::get("XIOS").resume();
338     bool isDefined = filegroup_hdl->split_freq.hasInheritedValue();
339     CTimer::get("XIOS").suspend();
340     return isDefined;
341  }
342
343
344  void cxios_set_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, const char * split_freq_format, int split_freq_format_size)
345  {
346    std::string split_freq_format_str;
347    if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
348    CTimer::get("XIOS").resume();
349    filegroup_hdl->split_freq_format.setValue(split_freq_format_str);
350    CTimer::get("XIOS").suspend();
351  }
352
353  void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size)
354  {
355    CTimer::get("XIOS").resume();
356    if (!string_copy(filegroup_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size))
357      ERROR("void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size)", << "Input string is too short");
358    CTimer::get("XIOS").suspend();
359  }
360
361  bool cxios_is_defined_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl)
362  {
363     CTimer::get("XIOS").resume();
364     bool isDefined = filegroup_hdl->split_freq_format.hasInheritedValue();
365     CTimer::get("XIOS").suspend();
366     return isDefined;
367  }
368
369
370  void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, cxios_duration sync_freq_c)
371  {
372    CTimer::get("XIOS").resume();
373    filegroup_hdl->sync_freq.allocate();
374    CDuration& sync_freq = filegroup_hdl->sync_freq.get();
375    sync_freq.year = sync_freq_c.year;
376    sync_freq.month = sync_freq_c.month;
377    sync_freq.day = sync_freq_c.day;
378    sync_freq.hour = sync_freq_c.hour;
379    sync_freq.minute = sync_freq_c.minute;
380    sync_freq.second = sync_freq_c.second;
381    sync_freq.timestep = sync_freq_c.timestep;
382    CTimer::get("XIOS").suspend();
383  }
384
385  void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, cxios_duration* sync_freq_c)
386  {
387    CTimer::get("XIOS").resume();
388    CDuration sync_freq = filegroup_hdl->sync_freq.getInheritedValue();
389    sync_freq_c->year = sync_freq.year;
390    sync_freq_c->month = sync_freq.month;
391    sync_freq_c->day = sync_freq.day;
392    sync_freq_c->hour = sync_freq.hour;
393    sync_freq_c->minute = sync_freq.minute;
394    sync_freq_c->second = sync_freq.second;
395    sync_freq_c->timestep = sync_freq.timestep;
396    CTimer::get("XIOS").suspend();
397  }
398
399  bool cxios_is_defined_filegroup_sync_freq(filegroup_Ptr filegroup_hdl)
400  {
401     CTimer::get("XIOS").resume();
402     bool isDefined = filegroup_hdl->sync_freq.hasInheritedValue();
403     CTimer::get("XIOS").suspend();
404     return isDefined;
405  }
406
407
408  void cxios_set_filegroup_type(filegroup_Ptr filegroup_hdl, const char * type, int type_size)
409  {
410    std::string type_str;
411    if (!cstr2string(type, type_size, type_str)) return;
412    CTimer::get("XIOS").resume();
413    filegroup_hdl->type.fromString(type_str);
414    CTimer::get("XIOS").suspend();
415  }
416
417  void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)
418  {
419    CTimer::get("XIOS").resume();
420    if (!string_copy(filegroup_hdl->type.getInheritedStringValue(), type, type_size))
421      ERROR("void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)", << "Input string is too short");
422    CTimer::get("XIOS").suspend();
423  }
424
425  bool cxios_is_defined_filegroup_type(filegroup_Ptr filegroup_hdl)
426  {
427     CTimer::get("XIOS").resume();
428     bool isDefined = filegroup_hdl->type.hasInheritedValue();
429     CTimer::get("XIOS").suspend();
430     return isDefined;
431  }
432}
Note: See TracBrowser for help on using the repository browser.