source: XIOS/branchs/xios-1.0/src/interface/c_attr/icfile_attr.cpp @ 2356

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

Append mode

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 13.7 KB
RevLine 
[325]1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                   *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
7#include "xmlioserver.hpp"
[352]8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
[325]11#include "icutil.hpp"
[347]12#include "timer.hpp"
[369]13#include "node_type.hpp"
[325]14
15extern "C"
16{
[345]17  typedef xios::CFile*  file_Ptr;
[325]18 
[798]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    file_hdl->sendAttributToServer(file_hdl->append);
24     CTimer::get("XIOS").suspend();
25  }
26 
27  void cxios_get_file_append(file_Ptr file_hdl, bool* append)
28  {
29    *append = file_hdl->append.getInheritedValue();
30  }
31 
32  bool cxios_is_defined_file_append(file_Ptr file_hdl )
33  {
34    CTimer::get("XIOS").resume();
35    bool isDefined = file_hdl->append.hasInheritedValue();
36    CTimer::get("XIOS").suspend();
37    return isDefined;
38  }
39 
40 
41 
[608]42  void cxios_set_file_compression_level(file_Ptr file_hdl, int compression_level)
43  {
44     CTimer::get("XIOS").resume();
45    file_hdl->compression_level.setValue(compression_level);
46    file_hdl->sendAttributToServer(file_hdl->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    *compression_level = file_hdl->compression_level.getInheritedValue();
53  }
54 
55  bool cxios_is_defined_file_compression_level(file_Ptr file_hdl )
56  {
57    CTimer::get("XIOS").resume();
58    bool isDefined = file_hdl->compression_level.hasInheritedValue();
59    CTimer::get("XIOS").suspend();
60    return isDefined;
61  }
62 
63 
64 
[325]65  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size)
66  {
67    std::string description_str;
68    if(!cstr2string(description, description_size, description_str)) return;
[347]69     CTimer::get("XIOS").resume();
[325]70    file_hdl->description.setValue(description_str);
71    file_hdl->sendAttributToServer(file_hdl->description);
[347]72     CTimer::get("XIOS").suspend();
[325]73  }
74 
75  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
76  {
[347]77     CTimer::get("XIOS").resume();
[445]78    if(!string_copy(file_hdl->description.getInheritedValue(),description , description_size))
[325]79      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", <<"Input string is to short");
[347]80     CTimer::get("XIOS").suspend();
[325]81  }
82 
[432]83  bool cxios_is_defined_file_description(file_Ptr file_hdl )
84  {
[581]85    CTimer::get("XIOS").resume();
86    bool isDefined = file_hdl->description.hasInheritedValue();
87    CTimer::get("XIOS").suspend();
88    return isDefined;
[432]89  }
[325]90 
[432]91 
92 
[325]93  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
94  {
[347]95     CTimer::get("XIOS").resume();
[325]96    file_hdl->enabled.setValue(enabled);
97    file_hdl->sendAttributToServer(file_hdl->enabled);
[347]98     CTimer::get("XIOS").suspend();
[325]99  }
100 
101  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
102  {
[445]103    *enabled = file_hdl->enabled.getInheritedValue();
[325]104  }
105 
[432]106  bool cxios_is_defined_file_enabled(file_Ptr file_hdl )
107  {
[581]108    CTimer::get("XIOS").resume();
109    bool isDefined = file_hdl->enabled.hasInheritedValue();
110    CTimer::get("XIOS").suspend();
111    return isDefined;
[432]112  }
[325]113 
[432]114 
115 
[415]116  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
117  {
118     CTimer::get("XIOS").resume();
119    file_hdl->min_digits.setValue(min_digits);
120    file_hdl->sendAttributToServer(file_hdl->min_digits);
121     CTimer::get("XIOS").suspend();
122  }
123 
124  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
125  {
[445]126    *min_digits = file_hdl->min_digits.getInheritedValue();
[415]127  }
128 
[432]129  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl )
130  {
[581]131    CTimer::get("XIOS").resume();
132    bool isDefined = file_hdl->min_digits.hasInheritedValue();
133    CTimer::get("XIOS").suspend();
134    return isDefined;
[432]135  }
[415]136 
[432]137 
138 
[325]139  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
140  {
141    std::string name_str;
142    if(!cstr2string(name, name_size, name_str)) return;
[347]143     CTimer::get("XIOS").resume();
[325]144    file_hdl->name.setValue(name_str);
145    file_hdl->sendAttributToServer(file_hdl->name);
[347]146     CTimer::get("XIOS").suspend();
[325]147  }
148 
149  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
150  {
[347]151     CTimer::get("XIOS").resume();
[445]152    if(!string_copy(file_hdl->name.getInheritedValue(),name , name_size))
[325]153      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", <<"Input string is to short");
[347]154     CTimer::get("XIOS").suspend();
[325]155  }
156 
[432]157  bool cxios_is_defined_file_name(file_Ptr file_hdl )
158  {
[581]159    CTimer::get("XIOS").resume();
160    bool isDefined = file_hdl->name.hasInheritedValue();
161    CTimer::get("XIOS").suspend();
162    return isDefined;
[432]163  }
[325]164 
[432]165 
166 
[325]167  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
168  {
169    std::string name_suffix_str;
170    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
[347]171     CTimer::get("XIOS").resume();
[325]172    file_hdl->name_suffix.setValue(name_suffix_str);
173    file_hdl->sendAttributToServer(file_hdl->name_suffix);
[347]174     CTimer::get("XIOS").suspend();
[325]175  }
176 
177  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
178  {
[347]179     CTimer::get("XIOS").resume();
[445]180    if(!string_copy(file_hdl->name_suffix.getInheritedValue(),name_suffix , name_suffix_size))
[325]181      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
[347]182     CTimer::get("XIOS").suspend();
[325]183  }
184 
[432]185  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl )
186  {
[581]187    CTimer::get("XIOS").resume();
188    bool isDefined = file_hdl->name_suffix.hasInheritedValue();
189    CTimer::get("XIOS").suspend();
190    return isDefined;
[432]191  }
[325]192 
[432]193 
194 
[325]195  void cxios_set_file_output_freq(file_Ptr file_hdl, const char * output_freq, int output_freq_size)
196  {
197    std::string output_freq_str;
198    if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return;
[347]199     CTimer::get("XIOS").resume();
[325]200    file_hdl->output_freq.setValue(output_freq_str);
201    file_hdl->sendAttributToServer(file_hdl->output_freq);
[347]202     CTimer::get("XIOS").suspend();
[325]203  }
204 
205  void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)
206  {
[347]207     CTimer::get("XIOS").resume();
[445]208    if(!string_copy(file_hdl->output_freq.getInheritedValue(),output_freq , output_freq_size))
[325]209      ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
[347]210     CTimer::get("XIOS").suspend();
[325]211  }
212 
[432]213  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl )
214  {
[581]215    CTimer::get("XIOS").resume();
216    bool isDefined = file_hdl->output_freq.hasInheritedValue();
217    CTimer::get("XIOS").suspend();
218    return isDefined;
[432]219  }
[325]220 
[432]221 
222 
[325]223  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
224  {
[347]225     CTimer::get("XIOS").resume();
[325]226    file_hdl->output_level.setValue(output_level);
227    file_hdl->sendAttributToServer(file_hdl->output_level);
[347]228     CTimer::get("XIOS").suspend();
[325]229  }
230 
231  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
232  {
[445]233    *output_level = file_hdl->output_level.getInheritedValue();
[325]234  }
235 
[432]236  bool cxios_is_defined_file_output_level(file_Ptr file_hdl )
237  {
[581]238    CTimer::get("XIOS").resume();
239    bool isDefined = file_hdl->output_level.hasInheritedValue();
240    CTimer::get("XIOS").suspend();
241    return isDefined;
[432]242  }
[325]243 
[432]244 
245 
[336]246  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
247  {
248    std::string par_access_str;
249    if(!cstr2string(par_access, par_access_size, par_access_str)) return;
[347]250     CTimer::get("XIOS").resume();
[336]251    file_hdl->par_access.setValue(par_access_str);
252    file_hdl->sendAttributToServer(file_hdl->par_access);
[347]253     CTimer::get("XIOS").suspend();
[336]254  }
255 
256  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
257  {
[347]258     CTimer::get("XIOS").resume();
[445]259    if(!string_copy(file_hdl->par_access.getInheritedValue(),par_access , par_access_size))
[336]260      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short");
[347]261     CTimer::get("XIOS").suspend();
[336]262  }
263 
[432]264  bool cxios_is_defined_file_par_access(file_Ptr file_hdl )
265  {
[581]266    CTimer::get("XIOS").resume();
267    bool isDefined = file_hdl->par_access.hasInheritedValue();
268    CTimer::get("XIOS").suspend();
269    return isDefined;
[432]270  }
[336]271 
[432]272 
273 
[325]274  void cxios_set_file_split_freq(file_Ptr file_hdl, const char * split_freq, int split_freq_size)
275  {
276    std::string split_freq_str;
277    if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return;
[347]278     CTimer::get("XIOS").resume();
[325]279    file_hdl->split_freq.setValue(split_freq_str);
280    file_hdl->sendAttributToServer(file_hdl->split_freq);
[347]281     CTimer::get("XIOS").suspend();
[325]282  }
283 
284  void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)
285  {
[347]286     CTimer::get("XIOS").resume();
[445]287    if(!string_copy(file_hdl->split_freq.getInheritedValue(),split_freq , split_freq_size))
[325]288      ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
[347]289     CTimer::get("XIOS").suspend();
[325]290  }
291 
[432]292  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl )
293  {
[581]294    CTimer::get("XIOS").resume();
295    bool isDefined = file_hdl->split_freq.hasInheritedValue();
296    CTimer::get("XIOS").suspend();
297    return isDefined;
[432]298  }
[325]299 
[432]300 
301 
302  void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size)
303  {
304    std::string split_freq_format_str;
305    if(!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
306     CTimer::get("XIOS").resume();
307    file_hdl->split_freq_format.setValue(split_freq_format_str);
308    file_hdl->sendAttributToServer(file_hdl->split_freq_format);
309     CTimer::get("XIOS").suspend();
310  }
311 
312  void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)
313  {
314     CTimer::get("XIOS").resume();
[445]315    if(!string_copy(file_hdl->split_freq_format.getInheritedValue(),split_freq_format , split_freq_format_size))
[432]316      ERROR("void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)", <<"Input string is to short");
317     CTimer::get("XIOS").suspend();
318  }
319 
320  bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl )
321  {
[581]322    CTimer::get("XIOS").resume();
323    bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
324    CTimer::get("XIOS").suspend();
325    return isDefined;
[432]326  }
327 
328 
329 
[325]330  void cxios_set_file_sync_freq(file_Ptr file_hdl, const char * sync_freq, int sync_freq_size)
331  {
332    std::string sync_freq_str;
333    if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return;
[347]334     CTimer::get("XIOS").resume();
[325]335    file_hdl->sync_freq.setValue(sync_freq_str);
336    file_hdl->sendAttributToServer(file_hdl->sync_freq);
[347]337     CTimer::get("XIOS").suspend();
[325]338  }
339 
340  void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)
341  {
[347]342     CTimer::get("XIOS").resume();
[445]343    if(!string_copy(file_hdl->sync_freq.getInheritedValue(),sync_freq , sync_freq_size))
[325]344      ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
[347]345     CTimer::get("XIOS").suspend();
[325]346  }
347 
[432]348  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl )
349  {
[581]350    CTimer::get("XIOS").resume();
351    bool isDefined = file_hdl->sync_freq.hasInheritedValue();
352    CTimer::get("XIOS").suspend();
353    return isDefined;
[432]354  }
[325]355 
[432]356 
357 
[703]358  void cxios_set_file_time_counter(file_Ptr file_hdl, const char * time_counter, int time_counter_size)
359  {
360    std::string time_counter_str;
361    if(!cstr2string(time_counter, time_counter_size, time_counter_str)) return;
362     CTimer::get("XIOS").resume();
363    file_hdl->time_counter.fromString(time_counter_str);
364    file_hdl->sendAttributToServer(file_hdl->time_counter);
365     CTimer::get("XIOS").suspend();
366  }
367 
368  void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)
369  {
370     CTimer::get("XIOS").resume();
371    if(!string_copy(file_hdl->time_counter.getInheritedStringValue(),time_counter , time_counter_size))
372      ERROR("void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)", <<"Input string is to short");
373     CTimer::get("XIOS").suspend();
374  }
375 
376  bool cxios_is_defined_file_time_counter(file_Ptr file_hdl )
377  {
378    CTimer::get("XIOS").resume();
379    bool isDefined = file_hdl->time_counter.hasInheritedValue();
380    CTimer::get("XIOS").suspend();
381    return isDefined;
382  }
383 
384 
385 
[325]386  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
387  {
388    std::string type_str;
389    if(!cstr2string(type, type_size, type_str)) return;
[347]390     CTimer::get("XIOS").resume();
[369]391    file_hdl->type.fromString(type_str);
[325]392    file_hdl->sendAttributToServer(file_hdl->type);
[347]393     CTimer::get("XIOS").suspend();
[325]394  }
395 
396  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
397  {
[347]398     CTimer::get("XIOS").resume();
[445]399    if(!string_copy(file_hdl->type.getInheritedStringValue(),type , type_size))
[325]400      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short");
[347]401     CTimer::get("XIOS").suspend();
[325]402  }
403 
[432]404  bool cxios_is_defined_file_type(file_Ptr file_hdl )
405  {
[581]406    CTimer::get("XIOS").resume();
407    bool isDefined = file_hdl->type.hasInheritedValue();
408    CTimer::get("XIOS").suspend();
409    return isDefined;
[432]410  }
[325]411 
412 
[432]413 
414 
[325]415}
Note: See TracBrowser for help on using the repository browser.