source: XIOS3/trunk/src/interface/c_attr/icfile_attr.cpp

Last change on this file was 2629, checked in by jderouillat, 2 months ago

Delete boost dependencies, the few features used are replaced by functions stored in extern/boost_extraction

  • 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: 38.7 KB
Line 
1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                     *
3 * ************************************************************************** */
4
5
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::CFile* file_Ptr;
18
19  void cxios_set_file_append(file_Ptr file_hdl, bool append)
20  {
21    CTimer::get("XIOS").resume();
22    file_hdl->append.setValue(append);
23    CTimer::get("XIOS").suspend();
24  }
25
26  void cxios_get_file_append(file_Ptr file_hdl, bool* append)
27  {
28    CTimer::get("XIOS").resume();
29    *append = file_hdl->append.getInheritedValue();
30    CTimer::get("XIOS").suspend();
31  }
32
33  bool cxios_is_defined_file_append(file_Ptr file_hdl)
34  {
35     CTimer::get("XIOS").resume();
36     bool isDefined = file_hdl->append.hasInheritedValue();
37     CTimer::get("XIOS").suspend();
38     return isDefined;
39  }
40
41
42  void cxios_set_file_comment(file_Ptr file_hdl, const char * comment, int comment_size)
43  {
44    std::string comment_str;
45    if (!cstr2string(comment, comment_size, comment_str)) return;
46    CTimer::get("XIOS").resume();
47    file_hdl->comment.setValue(comment_str);
48    CTimer::get("XIOS").suspend();
49  }
50
51  void cxios_get_file_comment(file_Ptr file_hdl, char * comment, int comment_size)
52  {
53    CTimer::get("XIOS").resume();
54    if (!string_copy(file_hdl->comment.getInheritedValue(), comment, comment_size))
55      ERROR("void cxios_get_file_comment(file_Ptr file_hdl, char * comment, int comment_size)", << "Input string is too short");
56    CTimer::get("XIOS").suspend();
57  }
58
59  bool cxios_is_defined_file_comment(file_Ptr file_hdl)
60  {
61     CTimer::get("XIOS").resume();
62     bool isDefined = file_hdl->comment.hasInheritedValue();
63     CTimer::get("XIOS").suspend();
64     return isDefined;
65  }
66
67
68  void cxios_set_file_compression_level(file_Ptr file_hdl, int compression_level)
69  {
70    CTimer::get("XIOS").resume();
71    file_hdl->compression_level.setValue(compression_level);
72    CTimer::get("XIOS").suspend();
73  }
74
75  void cxios_get_file_compression_level(file_Ptr file_hdl, int* compression_level)
76  {
77    CTimer::get("XIOS").resume();
78    *compression_level = file_hdl->compression_level.getInheritedValue();
79    CTimer::get("XIOS").suspend();
80  }
81
82  bool cxios_is_defined_file_compression_level(file_Ptr file_hdl)
83  {
84     CTimer::get("XIOS").resume();
85     bool isDefined = file_hdl->compression_level.hasInheritedValue();
86     CTimer::get("XIOS").suspend();
87     return isDefined;
88  }
89
90
91  void cxios_set_file_convention(file_Ptr file_hdl, const char * convention, int convention_size)
92  {
93    std::string convention_str;
94    if (!cstr2string(convention, convention_size, convention_str)) return;
95    CTimer::get("XIOS").resume();
96    file_hdl->convention.fromString(convention_str);
97    CTimer::get("XIOS").suspend();
98  }
99
100  void cxios_get_file_convention(file_Ptr file_hdl, char * convention, int convention_size)
101  {
102    CTimer::get("XIOS").resume();
103    if (!string_copy(file_hdl->convention.getInheritedStringValue(), convention, convention_size))
104      ERROR("void cxios_get_file_convention(file_Ptr file_hdl, char * convention, int convention_size)", << "Input string is too short");
105    CTimer::get("XIOS").suspend();
106  }
107
108  bool cxios_is_defined_file_convention(file_Ptr file_hdl)
109  {
110     CTimer::get("XIOS").resume();
111     bool isDefined = file_hdl->convention.hasInheritedValue();
112     CTimer::get("XIOS").suspend();
113     return isDefined;
114  }
115
116
117  void cxios_set_file_convention_str(file_Ptr file_hdl, const char * convention_str, int convention_str_size)
118  {
119    std::string convention_str_str;
120    if (!cstr2string(convention_str, convention_str_size, convention_str_str)) return;
121    CTimer::get("XIOS").resume();
122    file_hdl->convention_str.setValue(convention_str_str);
123    CTimer::get("XIOS").suspend();
124  }
125
126  void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size)
127  {
128    CTimer::get("XIOS").resume();
129    if (!string_copy(file_hdl->convention_str.getInheritedValue(), convention_str, convention_str_size))
130      ERROR("void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size)", << "Input string is too short");
131    CTimer::get("XIOS").suspend();
132  }
133
134  bool cxios_is_defined_file_convention_str(file_Ptr file_hdl)
135  {
136     CTimer::get("XIOS").resume();
137     bool isDefined = file_hdl->convention_str.hasInheritedValue();
138     CTimer::get("XIOS").suspend();
139     return isDefined;
140  }
141
142
143  void cxios_set_file_cyclic(file_Ptr file_hdl, bool cyclic)
144  {
145    CTimer::get("XIOS").resume();
146    file_hdl->cyclic.setValue(cyclic);
147    CTimer::get("XIOS").suspend();
148  }
149
150  void cxios_get_file_cyclic(file_Ptr file_hdl, bool* cyclic)
151  {
152    CTimer::get("XIOS").resume();
153    *cyclic = file_hdl->cyclic.getInheritedValue();
154    CTimer::get("XIOS").suspend();
155  }
156
157  bool cxios_is_defined_file_cyclic(file_Ptr file_hdl)
158  {
159     CTimer::get("XIOS").resume();
160     bool isDefined = file_hdl->cyclic.hasInheritedValue();
161     CTimer::get("XIOS").suspend();
162     return isDefined;
163  }
164
165
166  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size)
167  {
168    std::string description_str;
169    if (!cstr2string(description, description_size, description_str)) return;
170    CTimer::get("XIOS").resume();
171    file_hdl->description.setValue(description_str);
172    CTimer::get("XIOS").suspend();
173  }
174
175  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
176  {
177    CTimer::get("XIOS").resume();
178    if (!string_copy(file_hdl->description.getInheritedValue(), description, description_size))
179      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", << "Input string is too short");
180    CTimer::get("XIOS").suspend();
181  }
182
183  bool cxios_is_defined_file_description(file_Ptr file_hdl)
184  {
185     CTimer::get("XIOS").resume();
186     bool isDefined = file_hdl->description.hasInheritedValue();
187     CTimer::get("XIOS").suspend();
188     return isDefined;
189  }
190
191
192  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
193  {
194    CTimer::get("XIOS").resume();
195    file_hdl->enabled.setValue(enabled);
196    CTimer::get("XIOS").suspend();
197  }
198
199  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
200  {
201    CTimer::get("XIOS").resume();
202    *enabled = file_hdl->enabled.getInheritedValue();
203    CTimer::get("XIOS").suspend();
204  }
205
206  bool cxios_is_defined_file_enabled(file_Ptr file_hdl)
207  {
208     CTimer::get("XIOS").resume();
209     bool isDefined = file_hdl->enabled.hasInheritedValue();
210     CTimer::get("XIOS").suspend();
211     return isDefined;
212  }
213
214
215  void cxios_set_file_format(file_Ptr file_hdl, const char * format, int format_size)
216  {
217    std::string format_str;
218    if (!cstr2string(format, format_size, format_str)) return;
219    CTimer::get("XIOS").resume();
220    file_hdl->format.fromString(format_str);
221    CTimer::get("XIOS").suspend();
222  }
223
224  void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)
225  {
226    CTimer::get("XIOS").resume();
227    if (!string_copy(file_hdl->format.getInheritedStringValue(), format, format_size))
228      ERROR("void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)", << "Input string is too short");
229    CTimer::get("XIOS").suspend();
230  }
231
232  bool cxios_is_defined_file_format(file_Ptr file_hdl)
233  {
234     CTimer::get("XIOS").resume();
235     bool isDefined = file_hdl->format.hasInheritedValue();
236     CTimer::get("XIOS").suspend();
237     return isDefined;
238  }
239
240
241  void cxios_set_file_gatherer(file_Ptr file_hdl, const char * gatherer, int gatherer_size)
242  {
243    std::string gatherer_str;
244    if (!cstr2string(gatherer, gatherer_size, gatherer_str)) return;
245    CTimer::get("XIOS").resume();
246    file_hdl->gatherer.setValue(gatherer_str);
247    CTimer::get("XIOS").suspend();
248  }
249
250  void cxios_get_file_gatherer(file_Ptr file_hdl, char * gatherer, int gatherer_size)
251  {
252    CTimer::get("XIOS").resume();
253    if (!string_copy(file_hdl->gatherer.getInheritedValue(), gatherer, gatherer_size))
254      ERROR("void cxios_get_file_gatherer(file_Ptr file_hdl, char * gatherer, int gatherer_size)", << "Input string is too short");
255    CTimer::get("XIOS").suspend();
256  }
257
258  bool cxios_is_defined_file_gatherer(file_Ptr file_hdl)
259  {
260     CTimer::get("XIOS").resume();
261     bool isDefined = file_hdl->gatherer.hasInheritedValue();
262     CTimer::get("XIOS").suspend();
263     return isDefined;
264  }
265
266
267  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
268  {
269    CTimer::get("XIOS").resume();
270    file_hdl->min_digits.setValue(min_digits);
271    CTimer::get("XIOS").suspend();
272  }
273
274  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
275  {
276    CTimer::get("XIOS").resume();
277    *min_digits = file_hdl->min_digits.getInheritedValue();
278    CTimer::get("XIOS").suspend();
279  }
280
281  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl)
282  {
283     CTimer::get("XIOS").resume();
284     bool isDefined = file_hdl->min_digits.hasInheritedValue();
285     CTimer::get("XIOS").suspend();
286     return isDefined;
287  }
288
289
290  void cxios_set_file_mode(file_Ptr file_hdl, const char * mode, int mode_size)
291  {
292    std::string mode_str;
293    if (!cstr2string(mode, mode_size, mode_str)) return;
294    CTimer::get("XIOS").resume();
295    file_hdl->mode.fromString(mode_str);
296    CTimer::get("XIOS").suspend();
297  }
298
299  void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)
300  {
301    CTimer::get("XIOS").resume();
302    if (!string_copy(file_hdl->mode.getInheritedStringValue(), mode, mode_size))
303      ERROR("void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)", << "Input string is too short");
304    CTimer::get("XIOS").suspend();
305  }
306
307  bool cxios_is_defined_file_mode(file_Ptr file_hdl)
308  {
309     CTimer::get("XIOS").resume();
310     bool isDefined = file_hdl->mode.hasInheritedValue();
311     CTimer::get("XIOS").suspend();
312     return isDefined;
313  }
314
315
316  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
317  {
318    std::string name_str;
319    if (!cstr2string(name, name_size, name_str)) return;
320    CTimer::get("XIOS").resume();
321    file_hdl->name.setValue(name_str);
322    CTimer::get("XIOS").suspend();
323  }
324
325  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
326  {
327    CTimer::get("XIOS").resume();
328    if (!string_copy(file_hdl->name.getInheritedValue(), name, name_size))
329      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", << "Input string is too short");
330    CTimer::get("XIOS").suspend();
331  }
332
333  bool cxios_is_defined_file_name(file_Ptr file_hdl)
334  {
335     CTimer::get("XIOS").resume();
336     bool isDefined = file_hdl->name.hasInheritedValue();
337     CTimer::get("XIOS").suspend();
338     return isDefined;
339  }
340
341
342  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
343  {
344    std::string name_suffix_str;
345    if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
346    CTimer::get("XIOS").resume();
347    file_hdl->name_suffix.setValue(name_suffix_str);
348    CTimer::get("XIOS").suspend();
349  }
350
351  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
352  {
353    CTimer::get("XIOS").resume();
354    if (!string_copy(file_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size))
355      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short");
356    CTimer::get("XIOS").suspend();
357  }
358
359  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl)
360  {
361     CTimer::get("XIOS").resume();
362     bool isDefined = file_hdl->name_suffix.hasInheritedValue();
363     CTimer::get("XIOS").suspend();
364     return isDefined;
365  }
366
367
368  void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c)
369  {
370    CTimer::get("XIOS").resume();
371    file_hdl->output_freq.allocate();
372    CDuration& output_freq = file_hdl->output_freq.get();
373    output_freq.year = output_freq_c.year;
374    output_freq.month = output_freq_c.month;
375    output_freq.day = output_freq_c.day;
376    output_freq.hour = output_freq_c.hour;
377    output_freq.minute = output_freq_c.minute;
378    output_freq.second = output_freq_c.second;
379    output_freq.timestep = output_freq_c.timestep;
380    CTimer::get("XIOS").suspend();
381  }
382
383  void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c)
384  {
385    CTimer::get("XIOS").resume();
386    CDuration output_freq = file_hdl->output_freq.getInheritedValue();
387    output_freq_c->year = output_freq.year;
388    output_freq_c->month = output_freq.month;
389    output_freq_c->day = output_freq.day;
390    output_freq_c->hour = output_freq.hour;
391    output_freq_c->minute = output_freq.minute;
392    output_freq_c->second = output_freq.second;
393    output_freq_c->timestep = output_freq.timestep;
394    CTimer::get("XIOS").suspend();
395  }
396
397  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl)
398  {
399     CTimer::get("XIOS").resume();
400     bool isDefined = file_hdl->output_freq.hasInheritedValue();
401     CTimer::get("XIOS").suspend();
402     return isDefined;
403  }
404
405
406  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
407  {
408    CTimer::get("XIOS").resume();
409    file_hdl->output_level.setValue(output_level);
410    CTimer::get("XIOS").suspend();
411  }
412
413  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
414  {
415    CTimer::get("XIOS").resume();
416    *output_level = file_hdl->output_level.getInheritedValue();
417    CTimer::get("XIOS").suspend();
418  }
419
420  bool cxios_is_defined_file_output_level(file_Ptr file_hdl)
421  {
422     CTimer::get("XIOS").resume();
423     bool isDefined = file_hdl->output_level.hasInheritedValue();
424     CTimer::get("XIOS").suspend();
425     return isDefined;
426  }
427
428
429  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
430  {
431    std::string par_access_str;
432    if (!cstr2string(par_access, par_access_size, par_access_str)) return;
433    CTimer::get("XIOS").resume();
434    file_hdl->par_access.fromString(par_access_str);
435    CTimer::get("XIOS").suspend();
436  }
437
438  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
439  {
440    CTimer::get("XIOS").resume();
441    if (!string_copy(file_hdl->par_access.getInheritedStringValue(), par_access, par_access_size))
442      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", << "Input string is too short");
443    CTimer::get("XIOS").suspend();
444  }
445
446  bool cxios_is_defined_file_par_access(file_Ptr file_hdl)
447  {
448     CTimer::get("XIOS").resume();
449     bool isDefined = file_hdl->par_access.hasInheritedValue();
450     CTimer::get("XIOS").suspend();
451     return isDefined;
452  }
453
454
455  void cxios_set_file_pool_gatherer(file_Ptr file_hdl, const char * pool_gatherer, int pool_gatherer_size)
456  {
457    std::string pool_gatherer_str;
458    if (!cstr2string(pool_gatherer, pool_gatherer_size, pool_gatherer_str)) return;
459    CTimer::get("XIOS").resume();
460    file_hdl->pool_gatherer.setValue(pool_gatherer_str);
461    CTimer::get("XIOS").suspend();
462  }
463
464  void cxios_get_file_pool_gatherer(file_Ptr file_hdl, char * pool_gatherer, int pool_gatherer_size)
465  {
466    CTimer::get("XIOS").resume();
467    if (!string_copy(file_hdl->pool_gatherer.getInheritedValue(), pool_gatherer, pool_gatherer_size))
468      ERROR("void cxios_get_file_pool_gatherer(file_Ptr file_hdl, char * pool_gatherer, int pool_gatherer_size)", << "Input string is too short");
469    CTimer::get("XIOS").suspend();
470  }
471
472  bool cxios_is_defined_file_pool_gatherer(file_Ptr file_hdl)
473  {
474     CTimer::get("XIOS").resume();
475     bool isDefined = file_hdl->pool_gatherer.hasInheritedValue();
476     CTimer::get("XIOS").suspend();
477     return isDefined;
478  }
479
480
481  void cxios_set_file_pool_reader(file_Ptr file_hdl, const char * pool_reader, int pool_reader_size)
482  {
483    std::string pool_reader_str;
484    if (!cstr2string(pool_reader, pool_reader_size, pool_reader_str)) return;
485    CTimer::get("XIOS").resume();
486    file_hdl->pool_reader.setValue(pool_reader_str);
487    CTimer::get("XIOS").suspend();
488  }
489
490  void cxios_get_file_pool_reader(file_Ptr file_hdl, char * pool_reader, int pool_reader_size)
491  {
492    CTimer::get("XIOS").resume();
493    if (!string_copy(file_hdl->pool_reader.getInheritedValue(), pool_reader, pool_reader_size))
494      ERROR("void cxios_get_file_pool_reader(file_Ptr file_hdl, char * pool_reader, int pool_reader_size)", << "Input string is too short");
495    CTimer::get("XIOS").suspend();
496  }
497
498  bool cxios_is_defined_file_pool_reader(file_Ptr file_hdl)
499  {
500     CTimer::get("XIOS").resume();
501     bool isDefined = file_hdl->pool_reader.hasInheritedValue();
502     CTimer::get("XIOS").suspend();
503     return isDefined;
504  }
505
506
507  void cxios_set_file_pool_writer(file_Ptr file_hdl, const char * pool_writer, int pool_writer_size)
508  {
509    std::string pool_writer_str;
510    if (!cstr2string(pool_writer, pool_writer_size, pool_writer_str)) return;
511    CTimer::get("XIOS").resume();
512    file_hdl->pool_writer.setValue(pool_writer_str);
513    CTimer::get("XIOS").suspend();
514  }
515
516  void cxios_get_file_pool_writer(file_Ptr file_hdl, char * pool_writer, int pool_writer_size)
517  {
518    CTimer::get("XIOS").resume();
519    if (!string_copy(file_hdl->pool_writer.getInheritedValue(), pool_writer, pool_writer_size))
520      ERROR("void cxios_get_file_pool_writer(file_Ptr file_hdl, char * pool_writer, int pool_writer_size)", << "Input string is too short");
521    CTimer::get("XIOS").suspend();
522  }
523
524  bool cxios_is_defined_file_pool_writer(file_Ptr file_hdl)
525  {
526     CTimer::get("XIOS").resume();
527     bool isDefined = file_hdl->pool_writer.hasInheritedValue();
528     CTimer::get("XIOS").suspend();
529     return isDefined;
530  }
531
532
533  void cxios_set_file_read_metadata_par(file_Ptr file_hdl, bool read_metadata_par)
534  {
535    CTimer::get("XIOS").resume();
536    file_hdl->read_metadata_par.setValue(read_metadata_par);
537    CTimer::get("XIOS").suspend();
538  }
539
540  void cxios_get_file_read_metadata_par(file_Ptr file_hdl, bool* read_metadata_par)
541  {
542    CTimer::get("XIOS").resume();
543    *read_metadata_par = file_hdl->read_metadata_par.getInheritedValue();
544    CTimer::get("XIOS").suspend();
545  }
546
547  bool cxios_is_defined_file_read_metadata_par(file_Ptr file_hdl)
548  {
549     CTimer::get("XIOS").resume();
550     bool isDefined = file_hdl->read_metadata_par.hasInheritedValue();
551     CTimer::get("XIOS").suspend();
552     return isDefined;
553  }
554
555
556  void cxios_set_file_reader(file_Ptr file_hdl, const char * reader, int reader_size)
557  {
558    std::string reader_str;
559    if (!cstr2string(reader, reader_size, reader_str)) return;
560    CTimer::get("XIOS").resume();
561    file_hdl->reader.setValue(reader_str);
562    CTimer::get("XIOS").suspend();
563  }
564
565  void cxios_get_file_reader(file_Ptr file_hdl, char * reader, int reader_size)
566  {
567    CTimer::get("XIOS").resume();
568    if (!string_copy(file_hdl->reader.getInheritedValue(), reader, reader_size))
569      ERROR("void cxios_get_file_reader(file_Ptr file_hdl, char * reader, int reader_size)", << "Input string is too short");
570    CTimer::get("XIOS").suspend();
571  }
572
573  bool cxios_is_defined_file_reader(file_Ptr file_hdl)
574  {
575     CTimer::get("XIOS").resume();
576     bool isDefined = file_hdl->reader.hasInheritedValue();
577     CTimer::get("XIOS").suspend();
578     return isDefined;
579  }
580
581
582  void cxios_set_file_record_offset(file_Ptr file_hdl, int record_offset)
583  {
584    CTimer::get("XIOS").resume();
585    file_hdl->record_offset.setValue(record_offset);
586    CTimer::get("XIOS").suspend();
587  }
588
589  void cxios_get_file_record_offset(file_Ptr file_hdl, int* record_offset)
590  {
591    CTimer::get("XIOS").resume();
592    *record_offset = file_hdl->record_offset.getInheritedValue();
593    CTimer::get("XIOS").suspend();
594  }
595
596  bool cxios_is_defined_file_record_offset(file_Ptr file_hdl)
597  {
598     CTimer::get("XIOS").resume();
599     bool isDefined = file_hdl->record_offset.hasInheritedValue();
600     CTimer::get("XIOS").suspend();
601     return isDefined;
602  }
603
604
605  void cxios_set_file_split_end_offset(file_Ptr file_hdl, cxios_duration split_end_offset_c)
606  {
607    CTimer::get("XIOS").resume();
608    file_hdl->split_end_offset.allocate();
609    CDuration& split_end_offset = file_hdl->split_end_offset.get();
610    split_end_offset.year = split_end_offset_c.year;
611    split_end_offset.month = split_end_offset_c.month;
612    split_end_offset.day = split_end_offset_c.day;
613    split_end_offset.hour = split_end_offset_c.hour;
614    split_end_offset.minute = split_end_offset_c.minute;
615    split_end_offset.second = split_end_offset_c.second;
616    split_end_offset.timestep = split_end_offset_c.timestep;
617    CTimer::get("XIOS").suspend();
618  }
619
620  void cxios_get_file_split_end_offset(file_Ptr file_hdl, cxios_duration* split_end_offset_c)
621  {
622    CTimer::get("XIOS").resume();
623    CDuration split_end_offset = file_hdl->split_end_offset.getInheritedValue();
624    split_end_offset_c->year = split_end_offset.year;
625    split_end_offset_c->month = split_end_offset.month;
626    split_end_offset_c->day = split_end_offset.day;
627    split_end_offset_c->hour = split_end_offset.hour;
628    split_end_offset_c->minute = split_end_offset.minute;
629    split_end_offset_c->second = split_end_offset.second;
630    split_end_offset_c->timestep = split_end_offset.timestep;
631    CTimer::get("XIOS").suspend();
632  }
633
634  bool cxios_is_defined_file_split_end_offset(file_Ptr file_hdl)
635  {
636     CTimer::get("XIOS").resume();
637     bool isDefined = file_hdl->split_end_offset.hasInheritedValue();
638     CTimer::get("XIOS").suspend();
639     return isDefined;
640  }
641
642
643  void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c)
644  {
645    CTimer::get("XIOS").resume();
646    file_hdl->split_freq.allocate();
647    CDuration& split_freq = file_hdl->split_freq.get();
648    split_freq.year = split_freq_c.year;
649    split_freq.month = split_freq_c.month;
650    split_freq.day = split_freq_c.day;
651    split_freq.hour = split_freq_c.hour;
652    split_freq.minute = split_freq_c.minute;
653    split_freq.second = split_freq_c.second;
654    split_freq.timestep = split_freq_c.timestep;
655    CTimer::get("XIOS").suspend();
656  }
657
658  void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c)
659  {
660    CTimer::get("XIOS").resume();
661    CDuration split_freq = file_hdl->split_freq.getInheritedValue();
662    split_freq_c->year = split_freq.year;
663    split_freq_c->month = split_freq.month;
664    split_freq_c->day = split_freq.day;
665    split_freq_c->hour = split_freq.hour;
666    split_freq_c->minute = split_freq.minute;
667    split_freq_c->second = split_freq.second;
668    split_freq_c->timestep = split_freq.timestep;
669    CTimer::get("XIOS").suspend();
670  }
671
672  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl)
673  {
674     CTimer::get("XIOS").resume();
675     bool isDefined = file_hdl->split_freq.hasInheritedValue();
676     CTimer::get("XIOS").suspend();
677     return isDefined;
678  }
679
680
681  void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size)
682  {
683    std::string split_freq_format_str;
684    if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
685    CTimer::get("XIOS").resume();
686    file_hdl->split_freq_format.setValue(split_freq_format_str);
687    CTimer::get("XIOS").suspend();
688  }
689
690  void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)
691  {
692    CTimer::get("XIOS").resume();
693    if (!string_copy(file_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size))
694      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");
695    CTimer::get("XIOS").suspend();
696  }
697
698  bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl)
699  {
700     CTimer::get("XIOS").resume();
701     bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
702     CTimer::get("XIOS").suspend();
703     return isDefined;
704  }
705
706
707  void cxios_set_file_split_last_date(file_Ptr file_hdl, const char * split_last_date, int split_last_date_size)
708  {
709    std::string split_last_date_str;
710    if (!cstr2string(split_last_date, split_last_date_size, split_last_date_str)) return;
711    CTimer::get("XIOS").resume();
712    file_hdl->split_last_date.setValue(split_last_date_str);
713    CTimer::get("XIOS").suspend();
714  }
715
716  void cxios_get_file_split_last_date(file_Ptr file_hdl, char * split_last_date, int split_last_date_size)
717  {
718    CTimer::get("XIOS").resume();
719    if (!string_copy(file_hdl->split_last_date.getInheritedValue(), split_last_date, split_last_date_size))
720      ERROR("void cxios_get_file_split_last_date(file_Ptr file_hdl, char * split_last_date, int split_last_date_size)", << "Input string is too short");
721    CTimer::get("XIOS").suspend();
722  }
723
724  bool cxios_is_defined_file_split_last_date(file_Ptr file_hdl)
725  {
726     CTimer::get("XIOS").resume();
727     bool isDefined = file_hdl->split_last_date.hasInheritedValue();
728     CTimer::get("XIOS").suspend();
729     return isDefined;
730  }
731
732
733  void cxios_set_file_split_start_offset(file_Ptr file_hdl, cxios_duration split_start_offset_c)
734  {
735    CTimer::get("XIOS").resume();
736    file_hdl->split_start_offset.allocate();
737    CDuration& split_start_offset = file_hdl->split_start_offset.get();
738    split_start_offset.year = split_start_offset_c.year;
739    split_start_offset.month = split_start_offset_c.month;
740    split_start_offset.day = split_start_offset_c.day;
741    split_start_offset.hour = split_start_offset_c.hour;
742    split_start_offset.minute = split_start_offset_c.minute;
743    split_start_offset.second = split_start_offset_c.second;
744    split_start_offset.timestep = split_start_offset_c.timestep;
745    CTimer::get("XIOS").suspend();
746  }
747
748  void cxios_get_file_split_start_offset(file_Ptr file_hdl, cxios_duration* split_start_offset_c)
749  {
750    CTimer::get("XIOS").resume();
751    CDuration split_start_offset = file_hdl->split_start_offset.getInheritedValue();
752    split_start_offset_c->year = split_start_offset.year;
753    split_start_offset_c->month = split_start_offset.month;
754    split_start_offset_c->day = split_start_offset.day;
755    split_start_offset_c->hour = split_start_offset.hour;
756    split_start_offset_c->minute = split_start_offset.minute;
757    split_start_offset_c->second = split_start_offset.second;
758    split_start_offset_c->timestep = split_start_offset.timestep;
759    CTimer::get("XIOS").suspend();
760  }
761
762  bool cxios_is_defined_file_split_start_offset(file_Ptr file_hdl)
763  {
764     CTimer::get("XIOS").resume();
765     bool isDefined = file_hdl->split_start_offset.hasInheritedValue();
766     CTimer::get("XIOS").suspend();
767     return isDefined;
768  }
769
770
771  void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c)
772  {
773    CTimer::get("XIOS").resume();
774    file_hdl->sync_freq.allocate();
775    CDuration& sync_freq = file_hdl->sync_freq.get();
776    sync_freq.year = sync_freq_c.year;
777    sync_freq.month = sync_freq_c.month;
778    sync_freq.day = sync_freq_c.day;
779    sync_freq.hour = sync_freq_c.hour;
780    sync_freq.minute = sync_freq_c.minute;
781    sync_freq.second = sync_freq_c.second;
782    sync_freq.timestep = sync_freq_c.timestep;
783    CTimer::get("XIOS").suspend();
784  }
785
786  void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c)
787  {
788    CTimer::get("XIOS").resume();
789    CDuration sync_freq = file_hdl->sync_freq.getInheritedValue();
790    sync_freq_c->year = sync_freq.year;
791    sync_freq_c->month = sync_freq.month;
792    sync_freq_c->day = sync_freq.day;
793    sync_freq_c->hour = sync_freq.hour;
794    sync_freq_c->minute = sync_freq.minute;
795    sync_freq_c->second = sync_freq.second;
796    sync_freq_c->timestep = sync_freq.timestep;
797    CTimer::get("XIOS").suspend();
798  }
799
800  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl)
801  {
802     CTimer::get("XIOS").resume();
803     bool isDefined = file_hdl->sync_freq.hasInheritedValue();
804     CTimer::get("XIOS").suspend();
805     return isDefined;
806  }
807
808
809  void cxios_set_file_time_counter(file_Ptr file_hdl, const char * time_counter, int time_counter_size)
810  {
811    std::string time_counter_str;
812    if (!cstr2string(time_counter, time_counter_size, time_counter_str)) return;
813    CTimer::get("XIOS").resume();
814    file_hdl->time_counter.fromString(time_counter_str);
815    CTimer::get("XIOS").suspend();
816  }
817
818  void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)
819  {
820    CTimer::get("XIOS").resume();
821    if (!string_copy(file_hdl->time_counter.getInheritedStringValue(), time_counter, time_counter_size))
822      ERROR("void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)", << "Input string is too short");
823    CTimer::get("XIOS").suspend();
824  }
825
826  bool cxios_is_defined_file_time_counter(file_Ptr file_hdl)
827  {
828     CTimer::get("XIOS").resume();
829     bool isDefined = file_hdl->time_counter.hasInheritedValue();
830     CTimer::get("XIOS").suspend();
831     return isDefined;
832  }
833
834
835  void cxios_set_file_time_counter_name(file_Ptr file_hdl, const char * time_counter_name, int time_counter_name_size)
836  {
837    std::string time_counter_name_str;
838    if (!cstr2string(time_counter_name, time_counter_name_size, time_counter_name_str)) return;
839    CTimer::get("XIOS").resume();
840    file_hdl->time_counter_name.setValue(time_counter_name_str);
841    CTimer::get("XIOS").suspend();
842  }
843
844  void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size)
845  {
846    CTimer::get("XIOS").resume();
847    if (!string_copy(file_hdl->time_counter_name.getInheritedValue(), time_counter_name, time_counter_name_size))
848      ERROR("void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size)", << "Input string is too short");
849    CTimer::get("XIOS").suspend();
850  }
851
852  bool cxios_is_defined_file_time_counter_name(file_Ptr file_hdl)
853  {
854     CTimer::get("XIOS").resume();
855     bool isDefined = file_hdl->time_counter_name.hasInheritedValue();
856     CTimer::get("XIOS").suspend();
857     return isDefined;
858  }
859
860
861  void cxios_set_file_time_stamp_format(file_Ptr file_hdl, const char * time_stamp_format, int time_stamp_format_size)
862  {
863    std::string time_stamp_format_str;
864    if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return;
865    CTimer::get("XIOS").resume();
866    file_hdl->time_stamp_format.setValue(time_stamp_format_str);
867    CTimer::get("XIOS").suspend();
868  }
869
870  void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)
871  {
872    CTimer::get("XIOS").resume();
873    if (!string_copy(file_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size))
874      ERROR("void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)", << "Input string is too short");
875    CTimer::get("XIOS").suspend();
876  }
877
878  bool cxios_is_defined_file_time_stamp_format(file_Ptr file_hdl)
879  {
880     CTimer::get("XIOS").resume();
881     bool isDefined = file_hdl->time_stamp_format.hasInheritedValue();
882     CTimer::get("XIOS").suspend();
883     return isDefined;
884  }
885
886
887  void cxios_set_file_time_stamp_name(file_Ptr file_hdl, const char * time_stamp_name, int time_stamp_name_size)
888  {
889    std::string time_stamp_name_str;
890    if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return;
891    CTimer::get("XIOS").resume();
892    file_hdl->time_stamp_name.setValue(time_stamp_name_str);
893    CTimer::get("XIOS").suspend();
894  }
895
896  void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)
897  {
898    CTimer::get("XIOS").resume();
899    if (!string_copy(file_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size))
900      ERROR("void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)", << "Input string is too short");
901    CTimer::get("XIOS").suspend();
902  }
903
904  bool cxios_is_defined_file_time_stamp_name(file_Ptr file_hdl)
905  {
906     CTimer::get("XIOS").resume();
907     bool isDefined = file_hdl->time_stamp_name.hasInheritedValue();
908     CTimer::get("XIOS").suspend();
909     return isDefined;
910  }
911
912
913  void cxios_set_file_time_units(file_Ptr file_hdl, const char * time_units, int time_units_size)
914  {
915    std::string time_units_str;
916    if (!cstr2string(time_units, time_units_size, time_units_str)) return;
917    CTimer::get("XIOS").resume();
918    file_hdl->time_units.fromString(time_units_str);
919    CTimer::get("XIOS").suspend();
920  }
921
922  void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)
923  {
924    CTimer::get("XIOS").resume();
925    if (!string_copy(file_hdl->time_units.getInheritedStringValue(), time_units, time_units_size))
926      ERROR("void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)", << "Input string is too short");
927    CTimer::get("XIOS").suspend();
928  }
929
930  bool cxios_is_defined_file_time_units(file_Ptr file_hdl)
931  {
932     CTimer::get("XIOS").resume();
933     bool isDefined = file_hdl->time_units.hasInheritedValue();
934     CTimer::get("XIOS").suspend();
935     return isDefined;
936  }
937
938
939  void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size)
940  {
941    std::string timeseries_str;
942    if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return;
943    CTimer::get("XIOS").resume();
944    file_hdl->timeseries.fromString(timeseries_str);
945    CTimer::get("XIOS").suspend();
946  }
947
948  void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)
949  {
950    CTimer::get("XIOS").resume();
951    if (!string_copy(file_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size))
952      ERROR("void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)", << "Input string is too short");
953    CTimer::get("XIOS").suspend();
954  }
955
956  bool cxios_is_defined_file_timeseries(file_Ptr file_hdl)
957  {
958     CTimer::get("XIOS").resume();
959     bool isDefined = file_hdl->timeseries.hasInheritedValue();
960     CTimer::get("XIOS").suspend();
961     return isDefined;
962  }
963
964
965  void cxios_set_file_ts_prefix(file_Ptr file_hdl, const char * ts_prefix, int ts_prefix_size)
966  {
967    std::string ts_prefix_str;
968    if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return;
969    CTimer::get("XIOS").resume();
970    file_hdl->ts_prefix.setValue(ts_prefix_str);
971    CTimer::get("XIOS").suspend();
972  }
973
974  void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)
975  {
976    CTimer::get("XIOS").resume();
977    if (!string_copy(file_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size))
978      ERROR("void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short");
979    CTimer::get("XIOS").suspend();
980  }
981
982  bool cxios_is_defined_file_ts_prefix(file_Ptr file_hdl)
983  {
984     CTimer::get("XIOS").resume();
985     bool isDefined = file_hdl->ts_prefix.hasInheritedValue();
986     CTimer::get("XIOS").suspend();
987     return isDefined;
988  }
989
990
991  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
992  {
993    std::string type_str;
994    if (!cstr2string(type, type_size, type_str)) return;
995    CTimer::get("XIOS").resume();
996    file_hdl->type.fromString(type_str);
997    CTimer::get("XIOS").suspend();
998  }
999
1000  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
1001  {
1002    CTimer::get("XIOS").resume();
1003    if (!string_copy(file_hdl->type.getInheritedStringValue(), type, type_size))
1004      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", << "Input string is too short");
1005    CTimer::get("XIOS").suspend();
1006  }
1007
1008  bool cxios_is_defined_file_type(file_Ptr file_hdl)
1009  {
1010     CTimer::get("XIOS").resume();
1011     bool isDefined = file_hdl->type.hasInheritedValue();
1012     CTimer::get("XIOS").suspend();
1013     return isDefined;
1014  }
1015
1016
1017  void cxios_set_file_using_server2(file_Ptr file_hdl, bool using_server2)
1018  {
1019    CTimer::get("XIOS").resume();
1020    file_hdl->using_server2.setValue(using_server2);
1021    CTimer::get("XIOS").suspend();
1022  }
1023
1024  void cxios_get_file_using_server2(file_Ptr file_hdl, bool* using_server2)
1025  {
1026    CTimer::get("XIOS").resume();
1027    *using_server2 = file_hdl->using_server2.getInheritedValue();
1028    CTimer::get("XIOS").suspend();
1029  }
1030
1031  bool cxios_is_defined_file_using_server2(file_Ptr file_hdl)
1032  {
1033     CTimer::get("XIOS").resume();
1034     bool isDefined = file_hdl->using_server2.hasInheritedValue();
1035     CTimer::get("XIOS").suspend();
1036     return isDefined;
1037  }
1038
1039
1040  void cxios_set_file_uuid_format(file_Ptr file_hdl, const char * uuid_format, int uuid_format_size)
1041  {
1042    std::string uuid_format_str;
1043    if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return;
1044    CTimer::get("XIOS").resume();
1045    file_hdl->uuid_format.setValue(uuid_format_str);
1046    CTimer::get("XIOS").suspend();
1047  }
1048
1049  void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)
1050  {
1051    CTimer::get("XIOS").resume();
1052    if (!string_copy(file_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size))
1053      ERROR("void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short");
1054    CTimer::get("XIOS").suspend();
1055  }
1056
1057  bool cxios_is_defined_file_uuid_format(file_Ptr file_hdl)
1058  {
1059     CTimer::get("XIOS").resume();
1060     bool isDefined = file_hdl->uuid_format.hasInheritedValue();
1061     CTimer::get("XIOS").suspend();
1062     return isDefined;
1063  }
1064
1065
1066  void cxios_set_file_uuid_name(file_Ptr file_hdl, const char * uuid_name, int uuid_name_size)
1067  {
1068    std::string uuid_name_str;
1069    if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return;
1070    CTimer::get("XIOS").resume();
1071    file_hdl->uuid_name.setValue(uuid_name_str);
1072    CTimer::get("XIOS").suspend();
1073  }
1074
1075  void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)
1076  {
1077    CTimer::get("XIOS").resume();
1078    if (!string_copy(file_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size))
1079      ERROR("void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short");
1080    CTimer::get("XIOS").suspend();
1081  }
1082
1083  bool cxios_is_defined_file_uuid_name(file_Ptr file_hdl)
1084  {
1085     CTimer::get("XIOS").resume();
1086     bool isDefined = file_hdl->uuid_name.hasInheritedValue();
1087     CTimer::get("XIOS").suspend();
1088     return isDefined;
1089  }
1090
1091
1092  void cxios_set_file_writer(file_Ptr file_hdl, const char * writer, int writer_size)
1093  {
1094    std::string writer_str;
1095    if (!cstr2string(writer, writer_size, writer_str)) return;
1096    CTimer::get("XIOS").resume();
1097    file_hdl->writer.setValue(writer_str);
1098    CTimer::get("XIOS").suspend();
1099  }
1100
1101  void cxios_get_file_writer(file_Ptr file_hdl, char * writer, int writer_size)
1102  {
1103    CTimer::get("XIOS").resume();
1104    if (!string_copy(file_hdl->writer.getInheritedValue(), writer, writer_size))
1105      ERROR("void cxios_get_file_writer(file_Ptr file_hdl, char * writer, int writer_size)", << "Input string is too short");
1106    CTimer::get("XIOS").suspend();
1107  }
1108
1109  bool cxios_is_defined_file_writer(file_Ptr file_hdl)
1110  {
1111     CTimer::get("XIOS").resume();
1112     bool isDefined = file_hdl->writer.hasInheritedValue();
1113     CTimer::get("XIOS").suspend();
1114     return isDefined;
1115  }
1116}
Note: See TracBrowser for help on using the repository browser.