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

Last change on this file since 1052 was 1052, checked in by ymipsl, 7 years ago

Generate fortran interface for new attributes from previous commit.

YM

  • 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: 25.8 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_compression_level(file_Ptr file_hdl, int compression_level)
44  {
45    CTimer::get("XIOS").resume();
46    file_hdl->compression_level.setValue(compression_level);
47    CTimer::get("XIOS").suspend();
48  }
49
50  void cxios_get_file_compression_level(file_Ptr file_hdl, int* compression_level)
51  {
52    CTimer::get("XIOS").resume();
53    *compression_level = file_hdl->compression_level.getInheritedValue();
54    CTimer::get("XIOS").suspend();
55  }
56
57  bool cxios_is_defined_file_compression_level(file_Ptr file_hdl)
58  {
59     CTimer::get("XIOS").resume();
60     bool isDefined = file_hdl->compression_level.hasInheritedValue();
61     CTimer::get("XIOS").suspend();
62     return isDefined;
63  }
64
65
66  void cxios_set_file_convention(file_Ptr file_hdl, const char * convention, int convention_size)
67  {
68    std::string convention_str;
69    if (!cstr2string(convention, convention_size, convention_str)) return;
70    CTimer::get("XIOS").resume();
71    file_hdl->convention.fromString(convention_str);
72    CTimer::get("XIOS").suspend();
73  }
74
75  void cxios_get_file_convention(file_Ptr file_hdl, char * convention, int convention_size)
76  {
77    CTimer::get("XIOS").resume();
78    if (!string_copy(file_hdl->convention.getInheritedStringValue(), convention, convention_size))
79      ERROR("void cxios_get_file_convention(file_Ptr file_hdl, char * convention, int convention_size)", << "Input string is too short");
80    CTimer::get("XIOS").suspend();
81  }
82
83  bool cxios_is_defined_file_convention(file_Ptr file_hdl)
84  {
85     CTimer::get("XIOS").resume();
86     bool isDefined = file_hdl->convention.hasInheritedValue();
87     CTimer::get("XIOS").suspend();
88     return isDefined;
89  }
90
91
92  void cxios_set_file_cyclic(file_Ptr file_hdl, bool cyclic)
93  {
94    CTimer::get("XIOS").resume();
95    file_hdl->cyclic.setValue(cyclic);
96    CTimer::get("XIOS").suspend();
97  }
98
99  void cxios_get_file_cyclic(file_Ptr file_hdl, bool* cyclic)
100  {
101    CTimer::get("XIOS").resume();
102    *cyclic = file_hdl->cyclic.getInheritedValue();
103    CTimer::get("XIOS").suspend();
104  }
105
106  bool cxios_is_defined_file_cyclic(file_Ptr file_hdl)
107  {
108     CTimer::get("XIOS").resume();
109     bool isDefined = file_hdl->cyclic.hasInheritedValue();
110     CTimer::get("XIOS").suspend();
111     return isDefined;
112  }
113
114
115  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size)
116  {
117    std::string description_str;
118    if (!cstr2string(description, description_size, description_str)) return;
119    CTimer::get("XIOS").resume();
120    file_hdl->description.setValue(description_str);
121    CTimer::get("XIOS").suspend();
122  }
123
124  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
125  {
126    CTimer::get("XIOS").resume();
127    if (!string_copy(file_hdl->description.getInheritedValue(), description, description_size))
128      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", << "Input string is too short");
129    CTimer::get("XIOS").suspend();
130  }
131
132  bool cxios_is_defined_file_description(file_Ptr file_hdl)
133  {
134     CTimer::get("XIOS").resume();
135     bool isDefined = file_hdl->description.hasInheritedValue();
136     CTimer::get("XIOS").suspend();
137     return isDefined;
138  }
139
140
141  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
142  {
143    CTimer::get("XIOS").resume();
144    file_hdl->enabled.setValue(enabled);
145    CTimer::get("XIOS").suspend();
146  }
147
148  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
149  {
150    CTimer::get("XIOS").resume();
151    *enabled = file_hdl->enabled.getInheritedValue();
152    CTimer::get("XIOS").suspend();
153  }
154
155  bool cxios_is_defined_file_enabled(file_Ptr file_hdl)
156  {
157     CTimer::get("XIOS").resume();
158     bool isDefined = file_hdl->enabled.hasInheritedValue();
159     CTimer::get("XIOS").suspend();
160     return isDefined;
161  }
162
163
164  void cxios_set_file_format(file_Ptr file_hdl, const char * format, int format_size)
165  {
166    std::string format_str;
167    if (!cstr2string(format, format_size, format_str)) return;
168    CTimer::get("XIOS").resume();
169    file_hdl->format.fromString(format_str);
170    CTimer::get("XIOS").suspend();
171  }
172
173  void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)
174  {
175    CTimer::get("XIOS").resume();
176    if (!string_copy(file_hdl->format.getInheritedStringValue(), format, format_size))
177      ERROR("void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)", << "Input string is too short");
178    CTimer::get("XIOS").suspend();
179  }
180
181  bool cxios_is_defined_file_format(file_Ptr file_hdl)
182  {
183     CTimer::get("XIOS").resume();
184     bool isDefined = file_hdl->format.hasInheritedValue();
185     CTimer::get("XIOS").suspend();
186     return isDefined;
187  }
188
189
190  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
191  {
192    CTimer::get("XIOS").resume();
193    file_hdl->min_digits.setValue(min_digits);
194    CTimer::get("XIOS").suspend();
195  }
196
197  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
198  {
199    CTimer::get("XIOS").resume();
200    *min_digits = file_hdl->min_digits.getInheritedValue();
201    CTimer::get("XIOS").suspend();
202  }
203
204  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl)
205  {
206     CTimer::get("XIOS").resume();
207     bool isDefined = file_hdl->min_digits.hasInheritedValue();
208     CTimer::get("XIOS").suspend();
209     return isDefined;
210  }
211
212
213  void cxios_set_file_mode(file_Ptr file_hdl, const char * mode, int mode_size)
214  {
215    std::string mode_str;
216    if (!cstr2string(mode, mode_size, mode_str)) return;
217    CTimer::get("XIOS").resume();
218    file_hdl->mode.fromString(mode_str);
219    CTimer::get("XIOS").suspend();
220  }
221
222  void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)
223  {
224    CTimer::get("XIOS").resume();
225    if (!string_copy(file_hdl->mode.getInheritedStringValue(), mode, mode_size))
226      ERROR("void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)", << "Input string is too short");
227    CTimer::get("XIOS").suspend();
228  }
229
230  bool cxios_is_defined_file_mode(file_Ptr file_hdl)
231  {
232     CTimer::get("XIOS").resume();
233     bool isDefined = file_hdl->mode.hasInheritedValue();
234     CTimer::get("XIOS").suspend();
235     return isDefined;
236  }
237
238
239  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
240  {
241    std::string name_str;
242    if (!cstr2string(name, name_size, name_str)) return;
243    CTimer::get("XIOS").resume();
244    file_hdl->name.setValue(name_str);
245    CTimer::get("XIOS").suspend();
246  }
247
248  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
249  {
250    CTimer::get("XIOS").resume();
251    if (!string_copy(file_hdl->name.getInheritedValue(), name, name_size))
252      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", << "Input string is too short");
253    CTimer::get("XIOS").suspend();
254  }
255
256  bool cxios_is_defined_file_name(file_Ptr file_hdl)
257  {
258     CTimer::get("XIOS").resume();
259     bool isDefined = file_hdl->name.hasInheritedValue();
260     CTimer::get("XIOS").suspend();
261     return isDefined;
262  }
263
264
265  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
266  {
267    std::string name_suffix_str;
268    if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
269    CTimer::get("XIOS").resume();
270    file_hdl->name_suffix.setValue(name_suffix_str);
271    CTimer::get("XIOS").suspend();
272  }
273
274  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
275  {
276    CTimer::get("XIOS").resume();
277    if (!string_copy(file_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size))
278      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short");
279    CTimer::get("XIOS").suspend();
280  }
281
282  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl)
283  {
284     CTimer::get("XIOS").resume();
285     bool isDefined = file_hdl->name_suffix.hasInheritedValue();
286     CTimer::get("XIOS").suspend();
287     return isDefined;
288  }
289
290
291  void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c)
292  {
293    CTimer::get("XIOS").resume();
294    file_hdl->output_freq.allocate();
295    CDuration& output_freq = file_hdl->output_freq.get();
296    output_freq.year = output_freq_c.year;
297    output_freq.month = output_freq_c.month;
298    output_freq.day = output_freq_c.day;
299    output_freq.hour = output_freq_c.hour;
300    output_freq.minute = output_freq_c.minute;
301    output_freq.second = output_freq_c.second;
302    output_freq.timestep = output_freq_c.timestep;
303    CTimer::get("XIOS").suspend();
304  }
305
306  void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c)
307  {
308    CTimer::get("XIOS").resume();
309    CDuration output_freq = file_hdl->output_freq.getInheritedValue();
310    output_freq_c->year = output_freq.year;
311    output_freq_c->month = output_freq.month;
312    output_freq_c->day = output_freq.day;
313    output_freq_c->hour = output_freq.hour;
314    output_freq_c->minute = output_freq.minute;
315    output_freq_c->second = output_freq.second;
316    output_freq_c->timestep = output_freq.timestep;
317    CTimer::get("XIOS").suspend();
318  }
319
320  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl)
321  {
322     CTimer::get("XIOS").resume();
323     bool isDefined = file_hdl->output_freq.hasInheritedValue();
324     CTimer::get("XIOS").suspend();
325     return isDefined;
326  }
327
328
329  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
330  {
331    CTimer::get("XIOS").resume();
332    file_hdl->output_level.setValue(output_level);
333    CTimer::get("XIOS").suspend();
334  }
335
336  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
337  {
338    CTimer::get("XIOS").resume();
339    *output_level = file_hdl->output_level.getInheritedValue();
340    CTimer::get("XIOS").suspend();
341  }
342
343  bool cxios_is_defined_file_output_level(file_Ptr file_hdl)
344  {
345     CTimer::get("XIOS").resume();
346     bool isDefined = file_hdl->output_level.hasInheritedValue();
347     CTimer::get("XIOS").suspend();
348     return isDefined;
349  }
350
351
352  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
353  {
354    std::string par_access_str;
355    if (!cstr2string(par_access, par_access_size, par_access_str)) return;
356    CTimer::get("XIOS").resume();
357    file_hdl->par_access.fromString(par_access_str);
358    CTimer::get("XIOS").suspend();
359  }
360
361  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
362  {
363    CTimer::get("XIOS").resume();
364    if (!string_copy(file_hdl->par_access.getInheritedStringValue(), par_access, par_access_size))
365      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", << "Input string is too short");
366    CTimer::get("XIOS").suspend();
367  }
368
369  bool cxios_is_defined_file_par_access(file_Ptr file_hdl)
370  {
371     CTimer::get("XIOS").resume();
372     bool isDefined = file_hdl->par_access.hasInheritedValue();
373     CTimer::get("XIOS").suspend();
374     return isDefined;
375  }
376
377
378  void cxios_set_file_record_offset(file_Ptr file_hdl, int record_offset)
379  {
380    CTimer::get("XIOS").resume();
381    file_hdl->record_offset.setValue(record_offset);
382    CTimer::get("XIOS").suspend();
383  }
384
385  void cxios_get_file_record_offset(file_Ptr file_hdl, int* record_offset)
386  {
387    CTimer::get("XIOS").resume();
388    *record_offset = file_hdl->record_offset.getInheritedValue();
389    CTimer::get("XIOS").suspend();
390  }
391
392  bool cxios_is_defined_file_record_offset(file_Ptr file_hdl)
393  {
394     CTimer::get("XIOS").resume();
395     bool isDefined = file_hdl->record_offset.hasInheritedValue();
396     CTimer::get("XIOS").suspend();
397     return isDefined;
398  }
399
400
401  void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c)
402  {
403    CTimer::get("XIOS").resume();
404    file_hdl->split_freq.allocate();
405    CDuration& split_freq = file_hdl->split_freq.get();
406    split_freq.year = split_freq_c.year;
407    split_freq.month = split_freq_c.month;
408    split_freq.day = split_freq_c.day;
409    split_freq.hour = split_freq_c.hour;
410    split_freq.minute = split_freq_c.minute;
411    split_freq.second = split_freq_c.second;
412    split_freq.timestep = split_freq_c.timestep;
413    CTimer::get("XIOS").suspend();
414  }
415
416  void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c)
417  {
418    CTimer::get("XIOS").resume();
419    CDuration split_freq = file_hdl->split_freq.getInheritedValue();
420    split_freq_c->year = split_freq.year;
421    split_freq_c->month = split_freq.month;
422    split_freq_c->day = split_freq.day;
423    split_freq_c->hour = split_freq.hour;
424    split_freq_c->minute = split_freq.minute;
425    split_freq_c->second = split_freq.second;
426    split_freq_c->timestep = split_freq.timestep;
427    CTimer::get("XIOS").suspend();
428  }
429
430  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl)
431  {
432     CTimer::get("XIOS").resume();
433     bool isDefined = file_hdl->split_freq.hasInheritedValue();
434     CTimer::get("XIOS").suspend();
435     return isDefined;
436  }
437
438
439  void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size)
440  {
441    std::string split_freq_format_str;
442    if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
443    CTimer::get("XIOS").resume();
444    file_hdl->split_freq_format.setValue(split_freq_format_str);
445    CTimer::get("XIOS").suspend();
446  }
447
448  void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)
449  {
450    CTimer::get("XIOS").resume();
451    if (!string_copy(file_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size))
452      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");
453    CTimer::get("XIOS").suspend();
454  }
455
456  bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl)
457  {
458     CTimer::get("XIOS").resume();
459     bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
460     CTimer::get("XIOS").suspend();
461     return isDefined;
462  }
463
464
465  void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c)
466  {
467    CTimer::get("XIOS").resume();
468    file_hdl->sync_freq.allocate();
469    CDuration& sync_freq = file_hdl->sync_freq.get();
470    sync_freq.year = sync_freq_c.year;
471    sync_freq.month = sync_freq_c.month;
472    sync_freq.day = sync_freq_c.day;
473    sync_freq.hour = sync_freq_c.hour;
474    sync_freq.minute = sync_freq_c.minute;
475    sync_freq.second = sync_freq_c.second;
476    sync_freq.timestep = sync_freq_c.timestep;
477    CTimer::get("XIOS").suspend();
478  }
479
480  void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c)
481  {
482    CTimer::get("XIOS").resume();
483    CDuration sync_freq = file_hdl->sync_freq.getInheritedValue();
484    sync_freq_c->year = sync_freq.year;
485    sync_freq_c->month = sync_freq.month;
486    sync_freq_c->day = sync_freq.day;
487    sync_freq_c->hour = sync_freq.hour;
488    sync_freq_c->minute = sync_freq.minute;
489    sync_freq_c->second = sync_freq.second;
490    sync_freq_c->timestep = sync_freq.timestep;
491    CTimer::get("XIOS").suspend();
492  }
493
494  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl)
495  {
496     CTimer::get("XIOS").resume();
497     bool isDefined = file_hdl->sync_freq.hasInheritedValue();
498     CTimer::get("XIOS").suspend();
499     return isDefined;
500  }
501
502
503  void cxios_set_file_time_counter(file_Ptr file_hdl, const char * time_counter, int time_counter_size)
504  {
505    std::string time_counter_str;
506    if (!cstr2string(time_counter, time_counter_size, time_counter_str)) return;
507    CTimer::get("XIOS").resume();
508    file_hdl->time_counter.fromString(time_counter_str);
509    CTimer::get("XIOS").suspend();
510  }
511
512  void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)
513  {
514    CTimer::get("XIOS").resume();
515    if (!string_copy(file_hdl->time_counter.getInheritedStringValue(), time_counter, time_counter_size))
516      ERROR("void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)", << "Input string is too short");
517    CTimer::get("XIOS").suspend();
518  }
519
520  bool cxios_is_defined_file_time_counter(file_Ptr file_hdl)
521  {
522     CTimer::get("XIOS").resume();
523     bool isDefined = file_hdl->time_counter.hasInheritedValue();
524     CTimer::get("XIOS").suspend();
525     return isDefined;
526  }
527
528
529  void cxios_set_file_time_counter_name(file_Ptr file_hdl, const char * time_counter_name, int time_counter_name_size)
530  {
531    std::string time_counter_name_str;
532    if (!cstr2string(time_counter_name, time_counter_name_size, time_counter_name_str)) return;
533    CTimer::get("XIOS").resume();
534    file_hdl->time_counter_name.setValue(time_counter_name_str);
535    CTimer::get("XIOS").suspend();
536  }
537
538  void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size)
539  {
540    CTimer::get("XIOS").resume();
541    if (!string_copy(file_hdl->time_counter_name.getInheritedValue(), time_counter_name, time_counter_name_size))
542      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");
543    CTimer::get("XIOS").suspend();
544  }
545
546  bool cxios_is_defined_file_time_counter_name(file_Ptr file_hdl)
547  {
548     CTimer::get("XIOS").resume();
549     bool isDefined = file_hdl->time_counter_name.hasInheritedValue();
550     CTimer::get("XIOS").suspend();
551     return isDefined;
552  }
553
554
555  void cxios_set_file_time_stamp_format(file_Ptr file_hdl, const char * time_stamp_format, int time_stamp_format_size)
556  {
557    std::string time_stamp_format_str;
558    if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return;
559    CTimer::get("XIOS").resume();
560    file_hdl->time_stamp_format.setValue(time_stamp_format_str);
561    CTimer::get("XIOS").suspend();
562  }
563
564  void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)
565  {
566    CTimer::get("XIOS").resume();
567    if (!string_copy(file_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size))
568      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");
569    CTimer::get("XIOS").suspend();
570  }
571
572  bool cxios_is_defined_file_time_stamp_format(file_Ptr file_hdl)
573  {
574     CTimer::get("XIOS").resume();
575     bool isDefined = file_hdl->time_stamp_format.hasInheritedValue();
576     CTimer::get("XIOS").suspend();
577     return isDefined;
578  }
579
580
581  void cxios_set_file_time_stamp_name(file_Ptr file_hdl, const char * time_stamp_name, int time_stamp_name_size)
582  {
583    std::string time_stamp_name_str;
584    if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return;
585    CTimer::get("XIOS").resume();
586    file_hdl->time_stamp_name.setValue(time_stamp_name_str);
587    CTimer::get("XIOS").suspend();
588  }
589
590  void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)
591  {
592    CTimer::get("XIOS").resume();
593    if (!string_copy(file_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size))
594      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");
595    CTimer::get("XIOS").suspend();
596  }
597
598  bool cxios_is_defined_file_time_stamp_name(file_Ptr file_hdl)
599  {
600     CTimer::get("XIOS").resume();
601     bool isDefined = file_hdl->time_stamp_name.hasInheritedValue();
602     CTimer::get("XIOS").suspend();
603     return isDefined;
604  }
605
606
607  void cxios_set_file_time_units(file_Ptr file_hdl, const char * time_units, int time_units_size)
608  {
609    std::string time_units_str;
610    if (!cstr2string(time_units, time_units_size, time_units_str)) return;
611    CTimer::get("XIOS").resume();
612    file_hdl->time_units.fromString(time_units_str);
613    CTimer::get("XIOS").suspend();
614  }
615
616  void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)
617  {
618    CTimer::get("XIOS").resume();
619    if (!string_copy(file_hdl->time_units.getInheritedStringValue(), time_units, time_units_size))
620      ERROR("void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)", << "Input string is too short");
621    CTimer::get("XIOS").suspend();
622  }
623
624  bool cxios_is_defined_file_time_units(file_Ptr file_hdl)
625  {
626     CTimer::get("XIOS").resume();
627     bool isDefined = file_hdl->time_units.hasInheritedValue();
628     CTimer::get("XIOS").suspend();
629     return isDefined;
630  }
631
632
633  void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size)
634  {
635    std::string timeseries_str;
636    if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return;
637    CTimer::get("XIOS").resume();
638    file_hdl->timeseries.fromString(timeseries_str);
639    CTimer::get("XIOS").suspend();
640  }
641
642  void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)
643  {
644    CTimer::get("XIOS").resume();
645    if (!string_copy(file_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size))
646      ERROR("void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)", << "Input string is too short");
647    CTimer::get("XIOS").suspend();
648  }
649
650  bool cxios_is_defined_file_timeseries(file_Ptr file_hdl)
651  {
652     CTimer::get("XIOS").resume();
653     bool isDefined = file_hdl->timeseries.hasInheritedValue();
654     CTimer::get("XIOS").suspend();
655     return isDefined;
656  }
657
658
659  void cxios_set_file_ts_prefix(file_Ptr file_hdl, const char * ts_prefix, int ts_prefix_size)
660  {
661    std::string ts_prefix_str;
662    if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return;
663    CTimer::get("XIOS").resume();
664    file_hdl->ts_prefix.setValue(ts_prefix_str);
665    CTimer::get("XIOS").suspend();
666  }
667
668  void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)
669  {
670    CTimer::get("XIOS").resume();
671    if (!string_copy(file_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size))
672      ERROR("void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short");
673    CTimer::get("XIOS").suspend();
674  }
675
676  bool cxios_is_defined_file_ts_prefix(file_Ptr file_hdl)
677  {
678     CTimer::get("XIOS").resume();
679     bool isDefined = file_hdl->ts_prefix.hasInheritedValue();
680     CTimer::get("XIOS").suspend();
681     return isDefined;
682  }
683
684
685  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
686  {
687    std::string type_str;
688    if (!cstr2string(type, type_size, type_str)) return;
689    CTimer::get("XIOS").resume();
690    file_hdl->type.fromString(type_str);
691    CTimer::get("XIOS").suspend();
692  }
693
694  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
695  {
696    CTimer::get("XIOS").resume();
697    if (!string_copy(file_hdl->type.getInheritedStringValue(), type, type_size))
698      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", << "Input string is too short");
699    CTimer::get("XIOS").suspend();
700  }
701
702  bool cxios_is_defined_file_type(file_Ptr file_hdl)
703  {
704     CTimer::get("XIOS").resume();
705     bool isDefined = file_hdl->type.hasInheritedValue();
706     CTimer::get("XIOS").suspend();
707     return isDefined;
708  }
709
710
711  void cxios_set_file_uuid_format(file_Ptr file_hdl, const char * uuid_format, int uuid_format_size)
712  {
713    std::string uuid_format_str;
714    if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return;
715    CTimer::get("XIOS").resume();
716    file_hdl->uuid_format.setValue(uuid_format_str);
717    CTimer::get("XIOS").suspend();
718  }
719
720  void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)
721  {
722    CTimer::get("XIOS").resume();
723    if (!string_copy(file_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size))
724      ERROR("void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short");
725    CTimer::get("XIOS").suspend();
726  }
727
728  bool cxios_is_defined_file_uuid_format(file_Ptr file_hdl)
729  {
730     CTimer::get("XIOS").resume();
731     bool isDefined = file_hdl->uuid_format.hasInheritedValue();
732     CTimer::get("XIOS").suspend();
733     return isDefined;
734  }
735
736
737  void cxios_set_file_uuid_name(file_Ptr file_hdl, const char * uuid_name, int uuid_name_size)
738  {
739    std::string uuid_name_str;
740    if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return;
741    CTimer::get("XIOS").resume();
742    file_hdl->uuid_name.setValue(uuid_name_str);
743    CTimer::get("XIOS").suspend();
744  }
745
746  void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)
747  {
748    CTimer::get("XIOS").resume();
749    if (!string_copy(file_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size))
750      ERROR("void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short");
751    CTimer::get("XIOS").suspend();
752  }
753
754  bool cxios_is_defined_file_uuid_name(file_Ptr file_hdl)
755  {
756     CTimer::get("XIOS").resume();
757     bool isDefined = file_hdl->uuid_name.hasInheritedValue();
758     CTimer::get("XIOS").suspend();
759     return isDefined;
760  }
761}
Note: See TracBrowser for help on using the repository browser.