source: XIOS/dev/dev_trunk_omp/src/interface/c_attr/icfile_attr.cpp @ 1646

Last change on this file since 1646 was 1646, checked in by yushan, 5 years ago

branch merged with trunk @1645. arch file (ep&mpi) added for ADA

  • 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: 32.5 KB
RevLine 
[325]1/* ************************************************************************** *
[581]2 *               Interface auto generated - do not modify                     *
[325]3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
[591]6#include "xios.hpp"
[352]7#include "attribute_template.hpp"
8#include "object_template.hpp"
9#include "group_template.hpp"
[325]10#include "icutil.hpp"
[532]11#include "icdate.hpp"
[347]12#include "timer.hpp"
[369]13#include "node_type.hpp"
[325]14
15extern "C"
16{
[581]17  typedef xios::CFile* file_Ptr;
18
[528]19  void cxios_set_file_append(file_Ptr file_hdl, bool append)
20  {
[581]21    CTimer::get("XIOS").resume();
[528]22    file_hdl->append.setValue(append);
[581]23    CTimer::get("XIOS").suspend();
[528]24  }
[581]25
[528]26  void cxios_get_file_append(file_Ptr file_hdl, bool* append)
27  {
[581]28    CTimer::get("XIOS").resume();
[528]29    *append = file_hdl->append.getInheritedValue();
[581]30    CTimer::get("XIOS").suspend();
[528]31  }
[581]32
33  bool cxios_is_defined_file_append(file_Ptr file_hdl)
[528]34  {
35     CTimer::get("XIOS").resume();
[581]36     bool isDefined = file_hdl->append.hasInheritedValue();
[528]37     CTimer::get("XIOS").suspend();
[581]38     return isDefined;
[528]39  }
[581]40
41
[1492]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
[608]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
[932]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
[1201]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
[891]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
[325]166  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size)
167  {
168    std::string description_str;
[581]169    if (!cstr2string(description, description_size, description_str)) return;
170    CTimer::get("XIOS").resume();
[325]171    file_hdl->description.setValue(description_str);
[581]172    CTimer::get("XIOS").suspend();
[325]173  }
[581]174
[325]175  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
176  {
[581]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();
[325]181  }
[581]182
183  bool cxios_is_defined_file_description(file_Ptr file_hdl)
[432]184  {
185     CTimer::get("XIOS").resume();
[581]186     bool isDefined = file_hdl->description.hasInheritedValue();
[432]187     CTimer::get("XIOS").suspend();
[581]188     return isDefined;
[432]189  }
[581]190
191
[325]192  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
193  {
[581]194    CTimer::get("XIOS").resume();
[325]195    file_hdl->enabled.setValue(enabled);
[581]196    CTimer::get("XIOS").suspend();
[325]197  }
[581]198
[325]199  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
200  {
[581]201    CTimer::get("XIOS").resume();
[445]202    *enabled = file_hdl->enabled.getInheritedValue();
[581]203    CTimer::get("XIOS").suspend();
[325]204  }
[581]205
206  bool cxios_is_defined_file_enabled(file_Ptr file_hdl)
[432]207  {
208     CTimer::get("XIOS").resume();
[581]209     bool isDefined = file_hdl->enabled.hasInheritedValue();
[432]210     CTimer::get("XIOS").suspend();
[581]211     return isDefined;
[432]212  }
[581]213
214
[517]215  void cxios_set_file_format(file_Ptr file_hdl, const char * format, int format_size)
216  {
217    std::string format_str;
[581]218    if (!cstr2string(format, format_size, format_str)) return;
219    CTimer::get("XIOS").resume();
[517]220    file_hdl->format.fromString(format_str);
[581]221    CTimer::get("XIOS").suspend();
[517]222  }
[581]223
[517]224  void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)
225  {
[581]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();
[517]230  }
[581]231
232  bool cxios_is_defined_file_format(file_Ptr file_hdl)
[517]233  {
234     CTimer::get("XIOS").resume();
[581]235     bool isDefined = file_hdl->format.hasInheritedValue();
[517]236     CTimer::get("XIOS").suspend();
[581]237     return isDefined;
[517]238  }
[581]239
240
[415]241  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
242  {
[581]243    CTimer::get("XIOS").resume();
[415]244    file_hdl->min_digits.setValue(min_digits);
[581]245    CTimer::get("XIOS").suspend();
[415]246  }
[581]247
[415]248  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
249  {
[581]250    CTimer::get("XIOS").resume();
[445]251    *min_digits = file_hdl->min_digits.getInheritedValue();
[581]252    CTimer::get("XIOS").suspend();
[415]253  }
[581]254
255  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl)
[432]256  {
257     CTimer::get("XIOS").resume();
[581]258     bool isDefined = file_hdl->min_digits.hasInheritedValue();
[432]259     CTimer::get("XIOS").suspend();
[581]260     return isDefined;
[432]261  }
[581]262
263
[598]264  void cxios_set_file_mode(file_Ptr file_hdl, const char * mode, int mode_size)
265  {
266    std::string mode_str;
267    if (!cstr2string(mode, mode_size, mode_str)) return;
268    CTimer::get("XIOS").resume();
269    file_hdl->mode.fromString(mode_str);
270    CTimer::get("XIOS").suspend();
271  }
272
273  void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)
274  {
275    CTimer::get("XIOS").resume();
276    if (!string_copy(file_hdl->mode.getInheritedStringValue(), mode, mode_size))
277      ERROR("void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)", << "Input string is too short");
278    CTimer::get("XIOS").suspend();
279  }
280
281  bool cxios_is_defined_file_mode(file_Ptr file_hdl)
282  {
283     CTimer::get("XIOS").resume();
284     bool isDefined = file_hdl->mode.hasInheritedValue();
285     CTimer::get("XIOS").suspend();
286     return isDefined;
287  }
288
289
[325]290  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
291  {
292    std::string name_str;
[581]293    if (!cstr2string(name, name_size, name_str)) return;
294    CTimer::get("XIOS").resume();
[325]295    file_hdl->name.setValue(name_str);
[581]296    CTimer::get("XIOS").suspend();
[325]297  }
[581]298
[325]299  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
300  {
[581]301    CTimer::get("XIOS").resume();
302    if (!string_copy(file_hdl->name.getInheritedValue(), name, name_size))
303      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", << "Input string is too short");
304    CTimer::get("XIOS").suspend();
[325]305  }
[581]306
307  bool cxios_is_defined_file_name(file_Ptr file_hdl)
[432]308  {
309     CTimer::get("XIOS").resume();
[581]310     bool isDefined = file_hdl->name.hasInheritedValue();
[432]311     CTimer::get("XIOS").suspend();
[581]312     return isDefined;
[432]313  }
[581]314
315
[325]316  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
317  {
318    std::string name_suffix_str;
[581]319    if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
320    CTimer::get("XIOS").resume();
[325]321    file_hdl->name_suffix.setValue(name_suffix_str);
[581]322    CTimer::get("XIOS").suspend();
[325]323  }
[581]324
[325]325  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
326  {
[581]327    CTimer::get("XIOS").resume();
328    if (!string_copy(file_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size))
329      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short");
330    CTimer::get("XIOS").suspend();
[325]331  }
[581]332
333  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl)
[432]334  {
335     CTimer::get("XIOS").resume();
[581]336     bool isDefined = file_hdl->name_suffix.hasInheritedValue();
[432]337     CTimer::get("XIOS").suspend();
[581]338     return isDefined;
[432]339  }
[581]340
341
[538]342  void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c)
[325]343  {
[538]344    CTimer::get("XIOS").resume();
345    file_hdl->output_freq.allocate();
346    CDuration& output_freq = file_hdl->output_freq.get();
347    output_freq.year = output_freq_c.year;
348    output_freq.month = output_freq_c.month;
349    output_freq.day = output_freq_c.day;
350    output_freq.hour = output_freq_c.hour;
351    output_freq.minute = output_freq_c.minute;
352    output_freq.second = output_freq_c.second;
353    output_freq.timestep = output_freq_c.timestep;
354    CTimer::get("XIOS").suspend();
[325]355  }
[581]356
[538]357  void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c)
[325]358  {
[538]359    CTimer::get("XIOS").resume();
360    CDuration output_freq = file_hdl->output_freq.getInheritedValue();
361    output_freq_c->year = output_freq.year;
362    output_freq_c->month = output_freq.month;
363    output_freq_c->day = output_freq.day;
364    output_freq_c->hour = output_freq.hour;
365    output_freq_c->minute = output_freq.minute;
366    output_freq_c->second = output_freq.second;
367    output_freq_c->timestep = output_freq.timestep;
368    CTimer::get("XIOS").suspend();
[325]369  }
[581]370
371  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl)
[432]372  {
373     CTimer::get("XIOS").resume();
[581]374     bool isDefined = file_hdl->output_freq.hasInheritedValue();
[432]375     CTimer::get("XIOS").suspend();
[581]376     return isDefined;
[432]377  }
[581]378
379
[325]380  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
381  {
[581]382    CTimer::get("XIOS").resume();
[325]383    file_hdl->output_level.setValue(output_level);
[581]384    CTimer::get("XIOS").suspend();
[325]385  }
[581]386
[325]387  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
388  {
[581]389    CTimer::get("XIOS").resume();
[445]390    *output_level = file_hdl->output_level.getInheritedValue();
[581]391    CTimer::get("XIOS").suspend();
[325]392  }
[581]393
394  bool cxios_is_defined_file_output_level(file_Ptr file_hdl)
[432]395  {
396     CTimer::get("XIOS").resume();
[581]397     bool isDefined = file_hdl->output_level.hasInheritedValue();
[432]398     CTimer::get("XIOS").suspend();
[581]399     return isDefined;
[432]400  }
[581]401
402
[336]403  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
404  {
405    std::string par_access_str;
[581]406    if (!cstr2string(par_access, par_access_size, par_access_str)) return;
407    CTimer::get("XIOS").resume();
[526]408    file_hdl->par_access.fromString(par_access_str);
[581]409    CTimer::get("XIOS").suspend();
[336]410  }
[581]411
[336]412  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
413  {
[581]414    CTimer::get("XIOS").resume();
415    if (!string_copy(file_hdl->par_access.getInheritedStringValue(), par_access, par_access_size))
416      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", << "Input string is too short");
417    CTimer::get("XIOS").suspend();
[336]418  }
[581]419
420  bool cxios_is_defined_file_par_access(file_Ptr file_hdl)
[432]421  {
422     CTimer::get("XIOS").resume();
[581]423     bool isDefined = file_hdl->par_access.hasInheritedValue();
[432]424     CTimer::get("XIOS").suspend();
[581]425     return isDefined;
[432]426  }
[581]427
428
[1492]429  void cxios_set_file_read_metadata_par(file_Ptr file_hdl, bool read_metadata_par)
430  {
431    CTimer::get("XIOS").resume();
432    file_hdl->read_metadata_par.setValue(read_metadata_par);
433    CTimer::get("XIOS").suspend();
434  }
435
436  void cxios_get_file_read_metadata_par(file_Ptr file_hdl, bool* read_metadata_par)
437  {
438    CTimer::get("XIOS").resume();
439    *read_metadata_par = file_hdl->read_metadata_par.getInheritedValue();
440    CTimer::get("XIOS").suspend();
441  }
442
443  bool cxios_is_defined_file_read_metadata_par(file_Ptr file_hdl)
444  {
445     CTimer::get("XIOS").resume();
446     bool isDefined = file_hdl->read_metadata_par.hasInheritedValue();
447     CTimer::get("XIOS").suspend();
448     return isDefined;
449  }
450
451
[779]452  void cxios_set_file_record_offset(file_Ptr file_hdl, int record_offset)
453  {
454    CTimer::get("XIOS").resume();
455    file_hdl->record_offset.setValue(record_offset);
456    CTimer::get("XIOS").suspend();
457  }
458
459  void cxios_get_file_record_offset(file_Ptr file_hdl, int* record_offset)
460  {
461    CTimer::get("XIOS").resume();
462    *record_offset = file_hdl->record_offset.getInheritedValue();
463    CTimer::get("XIOS").suspend();
464  }
465
466  bool cxios_is_defined_file_record_offset(file_Ptr file_hdl)
467  {
468     CTimer::get("XIOS").resume();
469     bool isDefined = file_hdl->record_offset.hasInheritedValue();
470     CTimer::get("XIOS").suspend();
471     return isDefined;
472  }
473
474
[1492]475  void cxios_set_file_split_end_offset(file_Ptr file_hdl, cxios_duration split_end_offset_c)
476  {
477    CTimer::get("XIOS").resume();
478    file_hdl->split_end_offset.allocate();
479    CDuration& split_end_offset = file_hdl->split_end_offset.get();
480    split_end_offset.year = split_end_offset_c.year;
481    split_end_offset.month = split_end_offset_c.month;
482    split_end_offset.day = split_end_offset_c.day;
483    split_end_offset.hour = split_end_offset_c.hour;
484    split_end_offset.minute = split_end_offset_c.minute;
485    split_end_offset.second = split_end_offset_c.second;
486    split_end_offset.timestep = split_end_offset_c.timestep;
487    CTimer::get("XIOS").suspend();
488  }
489
490  void cxios_get_file_split_end_offset(file_Ptr file_hdl, cxios_duration* split_end_offset_c)
491  {
492    CTimer::get("XIOS").resume();
493    CDuration split_end_offset = file_hdl->split_end_offset.getInheritedValue();
494    split_end_offset_c->year = split_end_offset.year;
495    split_end_offset_c->month = split_end_offset.month;
496    split_end_offset_c->day = split_end_offset.day;
497    split_end_offset_c->hour = split_end_offset.hour;
498    split_end_offset_c->minute = split_end_offset.minute;
499    split_end_offset_c->second = split_end_offset.second;
500    split_end_offset_c->timestep = split_end_offset.timestep;
501    CTimer::get("XIOS").suspend();
502  }
503
504  bool cxios_is_defined_file_split_end_offset(file_Ptr file_hdl)
505  {
506     CTimer::get("XIOS").resume();
507     bool isDefined = file_hdl->split_end_offset.hasInheritedValue();
508     CTimer::get("XIOS").suspend();
509     return isDefined;
510  }
511
512
[538]513  void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c)
[325]514  {
[538]515    CTimer::get("XIOS").resume();
516    file_hdl->split_freq.allocate();
517    CDuration& split_freq = file_hdl->split_freq.get();
518    split_freq.year = split_freq_c.year;
519    split_freq.month = split_freq_c.month;
520    split_freq.day = split_freq_c.day;
521    split_freq.hour = split_freq_c.hour;
522    split_freq.minute = split_freq_c.minute;
523    split_freq.second = split_freq_c.second;
524    split_freq.timestep = split_freq_c.timestep;
525    CTimer::get("XIOS").suspend();
[325]526  }
[581]527
[538]528  void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c)
[325]529  {
[538]530    CTimer::get("XIOS").resume();
531    CDuration split_freq = file_hdl->split_freq.getInheritedValue();
532    split_freq_c->year = split_freq.year;
533    split_freq_c->month = split_freq.month;
534    split_freq_c->day = split_freq.day;
535    split_freq_c->hour = split_freq.hour;
536    split_freq_c->minute = split_freq.minute;
537    split_freq_c->second = split_freq.second;
538    split_freq_c->timestep = split_freq.timestep;
539    CTimer::get("XIOS").suspend();
[325]540  }
[581]541
542  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl)
[432]543  {
544     CTimer::get("XIOS").resume();
[581]545     bool isDefined = file_hdl->split_freq.hasInheritedValue();
[432]546     CTimer::get("XIOS").suspend();
[581]547     return isDefined;
[432]548  }
[581]549
550
[432]551  void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size)
552  {
553    std::string split_freq_format_str;
[581]554    if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
555    CTimer::get("XIOS").resume();
[432]556    file_hdl->split_freq_format.setValue(split_freq_format_str);
[581]557    CTimer::get("XIOS").suspend();
[432]558  }
[581]559
[432]560  void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)
561  {
[581]562    CTimer::get("XIOS").resume();
563    if (!string_copy(file_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size))
564      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");
565    CTimer::get("XIOS").suspend();
[432]566  }
[581]567
568  bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl)
[432]569  {
570     CTimer::get("XIOS").resume();
[581]571     bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
[432]572     CTimer::get("XIOS").suspend();
[581]573     return isDefined;
[432]574  }
[581]575
576
[1492]577  void cxios_set_file_split_last_date(file_Ptr file_hdl, const char * split_last_date, int split_last_date_size)
578  {
579    std::string split_last_date_str;
580    if (!cstr2string(split_last_date, split_last_date_size, split_last_date_str)) return;
581    CTimer::get("XIOS").resume();
582    file_hdl->split_last_date.setValue(split_last_date_str);
583    CTimer::get("XIOS").suspend();
584  }
585
586  void cxios_get_file_split_last_date(file_Ptr file_hdl, char * split_last_date, int split_last_date_size)
587  {
588    CTimer::get("XIOS").resume();
589    if (!string_copy(file_hdl->split_last_date.getInheritedValue(), split_last_date, split_last_date_size))
590      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");
591    CTimer::get("XIOS").suspend();
592  }
593
594  bool cxios_is_defined_file_split_last_date(file_Ptr file_hdl)
595  {
596     CTimer::get("XIOS").resume();
597     bool isDefined = file_hdl->split_last_date.hasInheritedValue();
598     CTimer::get("XIOS").suspend();
599     return isDefined;
600  }
601
602
603  void cxios_set_file_split_start_offset(file_Ptr file_hdl, cxios_duration split_start_offset_c)
604  {
605    CTimer::get("XIOS").resume();
606    file_hdl->split_start_offset.allocate();
607    CDuration& split_start_offset = file_hdl->split_start_offset.get();
608    split_start_offset.year = split_start_offset_c.year;
609    split_start_offset.month = split_start_offset_c.month;
610    split_start_offset.day = split_start_offset_c.day;
611    split_start_offset.hour = split_start_offset_c.hour;
612    split_start_offset.minute = split_start_offset_c.minute;
613    split_start_offset.second = split_start_offset_c.second;
614    split_start_offset.timestep = split_start_offset_c.timestep;
615    CTimer::get("XIOS").suspend();
616  }
617
618  void cxios_get_file_split_start_offset(file_Ptr file_hdl, cxios_duration* split_start_offset_c)
619  {
620    CTimer::get("XIOS").resume();
621    CDuration split_start_offset = file_hdl->split_start_offset.getInheritedValue();
622    split_start_offset_c->year = split_start_offset.year;
623    split_start_offset_c->month = split_start_offset.month;
624    split_start_offset_c->day = split_start_offset.day;
625    split_start_offset_c->hour = split_start_offset.hour;
626    split_start_offset_c->minute = split_start_offset.minute;
627    split_start_offset_c->second = split_start_offset.second;
628    split_start_offset_c->timestep = split_start_offset.timestep;
629    CTimer::get("XIOS").suspend();
630  }
631
632  bool cxios_is_defined_file_split_start_offset(file_Ptr file_hdl)
633  {
634     CTimer::get("XIOS").resume();
635     bool isDefined = file_hdl->split_start_offset.hasInheritedValue();
636     CTimer::get("XIOS").suspend();
637     return isDefined;
638  }
639
640
[538]641  void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c)
[325]642  {
[538]643    CTimer::get("XIOS").resume();
644    file_hdl->sync_freq.allocate();
645    CDuration& sync_freq = file_hdl->sync_freq.get();
646    sync_freq.year = sync_freq_c.year;
647    sync_freq.month = sync_freq_c.month;
648    sync_freq.day = sync_freq_c.day;
649    sync_freq.hour = sync_freq_c.hour;
650    sync_freq.minute = sync_freq_c.minute;
651    sync_freq.second = sync_freq_c.second;
652    sync_freq.timestep = sync_freq_c.timestep;
653    CTimer::get("XIOS").suspend();
[325]654  }
[581]655
[538]656  void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c)
[325]657  {
[538]658    CTimer::get("XIOS").resume();
659    CDuration sync_freq = file_hdl->sync_freq.getInheritedValue();
660    sync_freq_c->year = sync_freq.year;
661    sync_freq_c->month = sync_freq.month;
662    sync_freq_c->day = sync_freq.day;
663    sync_freq_c->hour = sync_freq.hour;
664    sync_freq_c->minute = sync_freq.minute;
665    sync_freq_c->second = sync_freq.second;
666    sync_freq_c->timestep = sync_freq.timestep;
667    CTimer::get("XIOS").suspend();
[325]668  }
[581]669
670  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl)
[432]671  {
672     CTimer::get("XIOS").resume();
[581]673     bool isDefined = file_hdl->sync_freq.hasInheritedValue();
[432]674     CTimer::get("XIOS").suspend();
[581]675     return isDefined;
[432]676  }
[581]677
678
[699]679  void cxios_set_file_time_counter(file_Ptr file_hdl, const char * time_counter, int time_counter_size)
680  {
681    std::string time_counter_str;
682    if (!cstr2string(time_counter, time_counter_size, time_counter_str)) return;
683    CTimer::get("XIOS").resume();
684    file_hdl->time_counter.fromString(time_counter_str);
685    CTimer::get("XIOS").suspend();
686  }
687
688  void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)
689  {
690    CTimer::get("XIOS").resume();
691    if (!string_copy(file_hdl->time_counter.getInheritedStringValue(), time_counter, time_counter_size))
692      ERROR("void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)", << "Input string is too short");
693    CTimer::get("XIOS").suspend();
694  }
695
696  bool cxios_is_defined_file_time_counter(file_Ptr file_hdl)
697  {
698     CTimer::get("XIOS").resume();
699     bool isDefined = file_hdl->time_counter.hasInheritedValue();
700     CTimer::get("XIOS").suspend();
701     return isDefined;
702  }
703
704
[802]705  void cxios_set_file_time_counter_name(file_Ptr file_hdl, const char * time_counter_name, int time_counter_name_size)
706  {
707    std::string time_counter_name_str;
708    if (!cstr2string(time_counter_name, time_counter_name_size, time_counter_name_str)) return;
709    CTimer::get("XIOS").resume();
710    file_hdl->time_counter_name.setValue(time_counter_name_str);
711    CTimer::get("XIOS").suspend();
712  }
713
714  void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size)
715  {
716    CTimer::get("XIOS").resume();
717    if (!string_copy(file_hdl->time_counter_name.getInheritedValue(), time_counter_name, time_counter_name_size))
718      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");
719    CTimer::get("XIOS").suspend();
720  }
721
722  bool cxios_is_defined_file_time_counter_name(file_Ptr file_hdl)
723  {
724     CTimer::get("XIOS").resume();
725     bool isDefined = file_hdl->time_counter_name.hasInheritedValue();
726     CTimer::get("XIOS").suspend();
727     return isDefined;
728  }
729
730
[1158]731  void cxios_set_file_time_stamp_format(file_Ptr file_hdl, const char * time_stamp_format, int time_stamp_format_size)
732  {
733    std::string time_stamp_format_str;
734    if (!cstr2string(time_stamp_format, time_stamp_format_size, time_stamp_format_str)) return;
735    CTimer::get("XIOS").resume();
736    file_hdl->time_stamp_format.setValue(time_stamp_format_str);
737    CTimer::get("XIOS").suspend();
738  }
739
740  void cxios_get_file_time_stamp_format(file_Ptr file_hdl, char * time_stamp_format, int time_stamp_format_size)
741  {
742    CTimer::get("XIOS").resume();
743    if (!string_copy(file_hdl->time_stamp_format.getInheritedValue(), time_stamp_format, time_stamp_format_size))
744      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");
745    CTimer::get("XIOS").suspend();
746  }
747
748  bool cxios_is_defined_file_time_stamp_format(file_Ptr file_hdl)
749  {
750     CTimer::get("XIOS").resume();
751     bool isDefined = file_hdl->time_stamp_format.hasInheritedValue();
752     CTimer::get("XIOS").suspend();
753     return isDefined;
754  }
755
756
757  void cxios_set_file_time_stamp_name(file_Ptr file_hdl, const char * time_stamp_name, int time_stamp_name_size)
758  {
759    std::string time_stamp_name_str;
760    if (!cstr2string(time_stamp_name, time_stamp_name_size, time_stamp_name_str)) return;
761    CTimer::get("XIOS").resume();
762    file_hdl->time_stamp_name.setValue(time_stamp_name_str);
763    CTimer::get("XIOS").suspend();
764  }
765
766  void cxios_get_file_time_stamp_name(file_Ptr file_hdl, char * time_stamp_name, int time_stamp_name_size)
767  {
768    CTimer::get("XIOS").resume();
769    if (!string_copy(file_hdl->time_stamp_name.getInheritedValue(), time_stamp_name, time_stamp_name_size))
770      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");
771    CTimer::get("XIOS").suspend();
772  }
773
774  bool cxios_is_defined_file_time_stamp_name(file_Ptr file_hdl)
775  {
776     CTimer::get("XIOS").resume();
777     bool isDefined = file_hdl->time_stamp_name.hasInheritedValue();
778     CTimer::get("XIOS").suspend();
779     return isDefined;
780  }
781
782
783  void cxios_set_file_time_units(file_Ptr file_hdl, const char * time_units, int time_units_size)
784  {
785    std::string time_units_str;
786    if (!cstr2string(time_units, time_units_size, time_units_str)) return;
787    CTimer::get("XIOS").resume();
788    file_hdl->time_units.fromString(time_units_str);
789    CTimer::get("XIOS").suspend();
790  }
791
792  void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)
793  {
794    CTimer::get("XIOS").resume();
795    if (!string_copy(file_hdl->time_units.getInheritedStringValue(), time_units, time_units_size))
796      ERROR("void cxios_get_file_time_units(file_Ptr file_hdl, char * time_units, int time_units_size)", << "Input string is too short");
797    CTimer::get("XIOS").suspend();
798  }
799
800  bool cxios_is_defined_file_time_units(file_Ptr file_hdl)
801  {
802     CTimer::get("XIOS").resume();
803     bool isDefined = file_hdl->time_units.hasInheritedValue();
804     CTimer::get("XIOS").suspend();
805     return isDefined;
806  }
807
808
[711]809  void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size)
810  {
811    std::string timeseries_str;
812    if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return;
813    CTimer::get("XIOS").resume();
814    file_hdl->timeseries.fromString(timeseries_str);
815    CTimer::get("XIOS").suspend();
816  }
817
818  void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)
819  {
820    CTimer::get("XIOS").resume();
821    if (!string_copy(file_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size))
822      ERROR("void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)", << "Input string is too short");
823    CTimer::get("XIOS").suspend();
824  }
825
826  bool cxios_is_defined_file_timeseries(file_Ptr file_hdl)
827  {
828     CTimer::get("XIOS").resume();
829     bool isDefined = file_hdl->timeseries.hasInheritedValue();
830     CTimer::get("XIOS").suspend();
831     return isDefined;
832  }
833
834
835  void cxios_set_file_ts_prefix(file_Ptr file_hdl, const char * ts_prefix, int ts_prefix_size)
836  {
837    std::string ts_prefix_str;
838    if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return;
839    CTimer::get("XIOS").resume();
840    file_hdl->ts_prefix.setValue(ts_prefix_str);
841    CTimer::get("XIOS").suspend();
842  }
843
844  void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)
845  {
846    CTimer::get("XIOS").resume();
847    if (!string_copy(file_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size))
848      ERROR("void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short");
849    CTimer::get("XIOS").suspend();
850  }
851
852  bool cxios_is_defined_file_ts_prefix(file_Ptr file_hdl)
853  {
854     CTimer::get("XIOS").resume();
855     bool isDefined = file_hdl->ts_prefix.hasInheritedValue();
856     CTimer::get("XIOS").suspend();
857     return isDefined;
858  }
859
860
[325]861  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
862  {
863    std::string type_str;
[581]864    if (!cstr2string(type, type_size, type_str)) return;
865    CTimer::get("XIOS").resume();
[369]866    file_hdl->type.fromString(type_str);
[581]867    CTimer::get("XIOS").suspend();
[325]868  }
[581]869
[325]870  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
871  {
[581]872    CTimer::get("XIOS").resume();
873    if (!string_copy(file_hdl->type.getInheritedStringValue(), type, type_size))
874      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", << "Input string is too short");
875    CTimer::get("XIOS").suspend();
[325]876  }
[581]877
878  bool cxios_is_defined_file_type(file_Ptr file_hdl)
[432]879  {
880     CTimer::get("XIOS").resume();
[581]881     bool isDefined = file_hdl->type.hasInheritedValue();
[432]882     CTimer::get("XIOS").suspend();
[581]883     return isDefined;
[432]884  }
[1158]885
886
887  void cxios_set_file_uuid_format(file_Ptr file_hdl, const char * uuid_format, int uuid_format_size)
888  {
889    std::string uuid_format_str;
890    if (!cstr2string(uuid_format, uuid_format_size, uuid_format_str)) return;
891    CTimer::get("XIOS").resume();
892    file_hdl->uuid_format.setValue(uuid_format_str);
893    CTimer::get("XIOS").suspend();
894  }
895
896  void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)
897  {
898    CTimer::get("XIOS").resume();
899    if (!string_copy(file_hdl->uuid_format.getInheritedValue(), uuid_format, uuid_format_size))
900      ERROR("void cxios_get_file_uuid_format(file_Ptr file_hdl, char * uuid_format, int uuid_format_size)", << "Input string is too short");
901    CTimer::get("XIOS").suspend();
902  }
903
904  bool cxios_is_defined_file_uuid_format(file_Ptr file_hdl)
905  {
906     CTimer::get("XIOS").resume();
907     bool isDefined = file_hdl->uuid_format.hasInheritedValue();
908     CTimer::get("XIOS").suspend();
909     return isDefined;
910  }
911
912
913  void cxios_set_file_uuid_name(file_Ptr file_hdl, const char * uuid_name, int uuid_name_size)
914  {
915    std::string uuid_name_str;
916    if (!cstr2string(uuid_name, uuid_name_size, uuid_name_str)) return;
917    CTimer::get("XIOS").resume();
918    file_hdl->uuid_name.setValue(uuid_name_str);
919    CTimer::get("XIOS").suspend();
920  }
921
922  void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)
923  {
924    CTimer::get("XIOS").resume();
925    if (!string_copy(file_hdl->uuid_name.getInheritedValue(), uuid_name, uuid_name_size))
926      ERROR("void cxios_get_file_uuid_name(file_Ptr file_hdl, char * uuid_name, int uuid_name_size)", << "Input string is too short");
927    CTimer::get("XIOS").suspend();
928  }
929
930  bool cxios_is_defined_file_uuid_name(file_Ptr file_hdl)
931  {
932     CTimer::get("XIOS").resume();
933     bool isDefined = file_hdl->uuid_name.hasInheritedValue();
934     CTimer::get("XIOS").suspend();
935     return isDefined;
936  }
[325]937}
Note: See TracBrowser for help on using the repository browser.