source: XIOS/trunk/src/interface/c_attr/icfile_attr.cpp @ 591

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

Remove leftovers from the XMLIO age.

  • 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: 13.3 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 "xios.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::CFile* file_Ptr;
19
20  void cxios_set_file_append(file_Ptr file_hdl, bool append)
21  {
22    CTimer::get("XIOS").resume();
23    file_hdl->append.setValue(append);
24    CTimer::get("XIOS").suspend();
25  }
26
27  void cxios_get_file_append(file_Ptr file_hdl, bool* append)
28  {
29    CTimer::get("XIOS").resume();
30    *append = file_hdl->append.getInheritedValue();
31    CTimer::get("XIOS").suspend();
32  }
33
34  bool cxios_is_defined_file_append(file_Ptr file_hdl)
35  {
36     CTimer::get("XIOS").resume();
37     bool isDefined = file_hdl->append.hasInheritedValue();
38     CTimer::get("XIOS").suspend();
39     return isDefined;
40  }
41
42
43  void cxios_set_file_description(file_Ptr file_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    file_hdl->description.setValue(description_str);
49    CTimer::get("XIOS").suspend();
50  }
51
52  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
53  {
54    CTimer::get("XIOS").resume();
55    if (!string_copy(file_hdl->description.getInheritedValue(), description, description_size))
56      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", << "Input string is too short");
57    CTimer::get("XIOS").suspend();
58  }
59
60  bool cxios_is_defined_file_description(file_Ptr file_hdl)
61  {
62     CTimer::get("XIOS").resume();
63     bool isDefined = file_hdl->description.hasInheritedValue();
64     CTimer::get("XIOS").suspend();
65     return isDefined;
66  }
67
68
69  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
70  {
71    CTimer::get("XIOS").resume();
72    file_hdl->enabled.setValue(enabled);
73    CTimer::get("XIOS").suspend();
74  }
75
76  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
77  {
78    CTimer::get("XIOS").resume();
79    *enabled = file_hdl->enabled.getInheritedValue();
80    CTimer::get("XIOS").suspend();
81  }
82
83  bool cxios_is_defined_file_enabled(file_Ptr file_hdl)
84  {
85     CTimer::get("XIOS").resume();
86     bool isDefined = file_hdl->enabled.hasInheritedValue();
87     CTimer::get("XIOS").suspend();
88     return isDefined;
89  }
90
91
92  void cxios_set_file_format(file_Ptr file_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    file_hdl->format.fromString(format_str);
98    CTimer::get("XIOS").suspend();
99  }
100
101  void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)
102  {
103    CTimer::get("XIOS").resume();
104    if (!string_copy(file_hdl->format.getInheritedStringValue(), format, format_size))
105      ERROR("void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)", << "Input string is too short");
106    CTimer::get("XIOS").suspend();
107  }
108
109  bool cxios_is_defined_file_format(file_Ptr file_hdl)
110  {
111     CTimer::get("XIOS").resume();
112     bool isDefined = file_hdl->format.hasInheritedValue();
113     CTimer::get("XIOS").suspend();
114     return isDefined;
115  }
116
117
118  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
119  {
120    CTimer::get("XIOS").resume();
121    file_hdl->min_digits.setValue(min_digits);
122    CTimer::get("XIOS").suspend();
123  }
124
125  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
126  {
127    CTimer::get("XIOS").resume();
128    *min_digits = file_hdl->min_digits.getInheritedValue();
129    CTimer::get("XIOS").suspend();
130  }
131
132  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl)
133  {
134     CTimer::get("XIOS").resume();
135     bool isDefined = file_hdl->min_digits.hasInheritedValue();
136     CTimer::get("XIOS").suspend();
137     return isDefined;
138  }
139
140
141  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
142  {
143    std::string name_str;
144    if (!cstr2string(name, name_size, name_str)) return;
145    CTimer::get("XIOS").resume();
146    file_hdl->name.setValue(name_str);
147    CTimer::get("XIOS").suspend();
148  }
149
150  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
151  {
152    CTimer::get("XIOS").resume();
153    if (!string_copy(file_hdl->name.getInheritedValue(), name, name_size))
154      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", << "Input string is too short");
155    CTimer::get("XIOS").suspend();
156  }
157
158  bool cxios_is_defined_file_name(file_Ptr file_hdl)
159  {
160     CTimer::get("XIOS").resume();
161     bool isDefined = file_hdl->name.hasInheritedValue();
162     CTimer::get("XIOS").suspend();
163     return isDefined;
164  }
165
166
167  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
168  {
169    std::string name_suffix_str;
170    if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
171    CTimer::get("XIOS").resume();
172    file_hdl->name_suffix.setValue(name_suffix_str);
173    CTimer::get("XIOS").suspend();
174  }
175
176  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
177  {
178    CTimer::get("XIOS").resume();
179    if (!string_copy(file_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size))
180      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short");
181    CTimer::get("XIOS").suspend();
182  }
183
184  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl)
185  {
186     CTimer::get("XIOS").resume();
187     bool isDefined = file_hdl->name_suffix.hasInheritedValue();
188     CTimer::get("XIOS").suspend();
189     return isDefined;
190  }
191
192
193  void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c)
194  {
195    CTimer::get("XIOS").resume();
196    file_hdl->output_freq.allocate();
197    CDuration& output_freq = file_hdl->output_freq.get();
198    output_freq.year = output_freq_c.year;
199    output_freq.month = output_freq_c.month;
200    output_freq.day = output_freq_c.day;
201    output_freq.hour = output_freq_c.hour;
202    output_freq.minute = output_freq_c.minute;
203    output_freq.second = output_freq_c.second;
204    output_freq.timestep = output_freq_c.timestep;
205    CTimer::get("XIOS").suspend();
206  }
207
208  void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c)
209  {
210    CTimer::get("XIOS").resume();
211    CDuration output_freq = file_hdl->output_freq.getInheritedValue();
212    output_freq_c->year = output_freq.year;
213    output_freq_c->month = output_freq.month;
214    output_freq_c->day = output_freq.day;
215    output_freq_c->hour = output_freq.hour;
216    output_freq_c->minute = output_freq.minute;
217    output_freq_c->second = output_freq.second;
218    output_freq_c->timestep = output_freq.timestep;
219    CTimer::get("XIOS").suspend();
220  }
221
222  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl)
223  {
224     CTimer::get("XIOS").resume();
225     bool isDefined = file_hdl->output_freq.hasInheritedValue();
226     CTimer::get("XIOS").suspend();
227     return isDefined;
228  }
229
230
231  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
232  {
233    CTimer::get("XIOS").resume();
234    file_hdl->output_level.setValue(output_level);
235    CTimer::get("XIOS").suspend();
236  }
237
238  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
239  {
240    CTimer::get("XIOS").resume();
241    *output_level = file_hdl->output_level.getInheritedValue();
242    CTimer::get("XIOS").suspend();
243  }
244
245  bool cxios_is_defined_file_output_level(file_Ptr file_hdl)
246  {
247     CTimer::get("XIOS").resume();
248     bool isDefined = file_hdl->output_level.hasInheritedValue();
249     CTimer::get("XIOS").suspend();
250     return isDefined;
251  }
252
253
254  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
255  {
256    std::string par_access_str;
257    if (!cstr2string(par_access, par_access_size, par_access_str)) return;
258    CTimer::get("XIOS").resume();
259    file_hdl->par_access.fromString(par_access_str);
260    CTimer::get("XIOS").suspend();
261  }
262
263  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
264  {
265    CTimer::get("XIOS").resume();
266    if (!string_copy(file_hdl->par_access.getInheritedStringValue(), par_access, par_access_size))
267      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", << "Input string is too short");
268    CTimer::get("XIOS").suspend();
269  }
270
271  bool cxios_is_defined_file_par_access(file_Ptr file_hdl)
272  {
273     CTimer::get("XIOS").resume();
274     bool isDefined = file_hdl->par_access.hasInheritedValue();
275     CTimer::get("XIOS").suspend();
276     return isDefined;
277  }
278
279
280  void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c)
281  {
282    CTimer::get("XIOS").resume();
283    file_hdl->split_freq.allocate();
284    CDuration& split_freq = file_hdl->split_freq.get();
285    split_freq.year = split_freq_c.year;
286    split_freq.month = split_freq_c.month;
287    split_freq.day = split_freq_c.day;
288    split_freq.hour = split_freq_c.hour;
289    split_freq.minute = split_freq_c.minute;
290    split_freq.second = split_freq_c.second;
291    split_freq.timestep = split_freq_c.timestep;
292    CTimer::get("XIOS").suspend();
293  }
294
295  void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c)
296  {
297    CTimer::get("XIOS").resume();
298    CDuration split_freq = file_hdl->split_freq.getInheritedValue();
299    split_freq_c->year = split_freq.year;
300    split_freq_c->month = split_freq.month;
301    split_freq_c->day = split_freq.day;
302    split_freq_c->hour = split_freq.hour;
303    split_freq_c->minute = split_freq.minute;
304    split_freq_c->second = split_freq.second;
305    split_freq_c->timestep = split_freq.timestep;
306    CTimer::get("XIOS").suspend();
307  }
308
309  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl)
310  {
311     CTimer::get("XIOS").resume();
312     bool isDefined = file_hdl->split_freq.hasInheritedValue();
313     CTimer::get("XIOS").suspend();
314     return isDefined;
315  }
316
317
318  void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size)
319  {
320    std::string split_freq_format_str;
321    if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
322    CTimer::get("XIOS").resume();
323    file_hdl->split_freq_format.setValue(split_freq_format_str);
324    CTimer::get("XIOS").suspend();
325  }
326
327  void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)
328  {
329    CTimer::get("XIOS").resume();
330    if (!string_copy(file_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size))
331      ERROR("void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)", << "Input string is too short");
332    CTimer::get("XIOS").suspend();
333  }
334
335  bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl)
336  {
337     CTimer::get("XIOS").resume();
338     bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
339     CTimer::get("XIOS").suspend();
340     return isDefined;
341  }
342
343
344  void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c)
345  {
346    CTimer::get("XIOS").resume();
347    file_hdl->sync_freq.allocate();
348    CDuration& sync_freq = file_hdl->sync_freq.get();
349    sync_freq.year = sync_freq_c.year;
350    sync_freq.month = sync_freq_c.month;
351    sync_freq.day = sync_freq_c.day;
352    sync_freq.hour = sync_freq_c.hour;
353    sync_freq.minute = sync_freq_c.minute;
354    sync_freq.second = sync_freq_c.second;
355    sync_freq.timestep = sync_freq_c.timestep;
356    CTimer::get("XIOS").suspend();
357  }
358
359  void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c)
360  {
361    CTimer::get("XIOS").resume();
362    CDuration sync_freq = file_hdl->sync_freq.getInheritedValue();
363    sync_freq_c->year = sync_freq.year;
364    sync_freq_c->month = sync_freq.month;
365    sync_freq_c->day = sync_freq.day;
366    sync_freq_c->hour = sync_freq.hour;
367    sync_freq_c->minute = sync_freq.minute;
368    sync_freq_c->second = sync_freq.second;
369    sync_freq_c->timestep = sync_freq.timestep;
370    CTimer::get("XIOS").suspend();
371  }
372
373  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl)
374  {
375     CTimer::get("XIOS").resume();
376     bool isDefined = file_hdl->sync_freq.hasInheritedValue();
377     CTimer::get("XIOS").suspend();
378     return isDefined;
379  }
380
381
382  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
383  {
384    std::string type_str;
385    if (!cstr2string(type, type_size, type_str)) return;
386    CTimer::get("XIOS").resume();
387    file_hdl->type.fromString(type_str);
388    CTimer::get("XIOS").suspend();
389  }
390
391  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
392  {
393    CTimer::get("XIOS").resume();
394    if (!string_copy(file_hdl->type.getInheritedStringValue(), type, type_size))
395      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", << "Input string is too short");
396    CTimer::get("XIOS").suspend();
397  }
398
399  bool cxios_is_defined_file_type(file_Ptr file_hdl)
400  {
401     CTimer::get("XIOS").resume();
402     bool isDefined = file_hdl->type.hasInheritedValue();
403     CTimer::get("XIOS").suspend();
404     return isDefined;
405  }
406}
Note: See TracBrowser for help on using the repository browser.