source: XIOS1/trunk/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
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 "xmlioserver.hpp"
8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "icutil.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    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 
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 
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;
69     CTimer::get("XIOS").resume();
70    file_hdl->description.setValue(description_str);
71    file_hdl->sendAttributToServer(file_hdl->description);
72     CTimer::get("XIOS").suspend();
73  }
74 
75  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
76  {
77     CTimer::get("XIOS").resume();
78    if(!string_copy(file_hdl->description.getInheritedValue(),description , description_size))
79      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", <<"Input string is to short");
80     CTimer::get("XIOS").suspend();
81  }
82 
83  bool cxios_is_defined_file_description(file_Ptr file_hdl )
84  {
85    CTimer::get("XIOS").resume();
86    bool isDefined = file_hdl->description.hasInheritedValue();
87    CTimer::get("XIOS").suspend();
88    return isDefined;
89  }
90 
91 
92 
93  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
94  {
95     CTimer::get("XIOS").resume();
96    file_hdl->enabled.setValue(enabled);
97    file_hdl->sendAttributToServer(file_hdl->enabled);
98     CTimer::get("XIOS").suspend();
99  }
100 
101  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
102  {
103    *enabled = file_hdl->enabled.getInheritedValue();
104  }
105 
106  bool cxios_is_defined_file_enabled(file_Ptr file_hdl )
107  {
108    CTimer::get("XIOS").resume();
109    bool isDefined = file_hdl->enabled.hasInheritedValue();
110    CTimer::get("XIOS").suspend();
111    return isDefined;
112  }
113 
114 
115 
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  {
126    *min_digits = file_hdl->min_digits.getInheritedValue();
127  }
128 
129  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl )
130  {
131    CTimer::get("XIOS").resume();
132    bool isDefined = file_hdl->min_digits.hasInheritedValue();
133    CTimer::get("XIOS").suspend();
134    return isDefined;
135  }
136 
137 
138 
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;
143     CTimer::get("XIOS").resume();
144    file_hdl->name.setValue(name_str);
145    file_hdl->sendAttributToServer(file_hdl->name);
146     CTimer::get("XIOS").suspend();
147  }
148 
149  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
150  {
151     CTimer::get("XIOS").resume();
152    if(!string_copy(file_hdl->name.getInheritedValue(),name , name_size))
153      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", <<"Input string is to short");
154     CTimer::get("XIOS").suspend();
155  }
156 
157  bool cxios_is_defined_file_name(file_Ptr file_hdl )
158  {
159    CTimer::get("XIOS").resume();
160    bool isDefined = file_hdl->name.hasInheritedValue();
161    CTimer::get("XIOS").suspend();
162    return isDefined;
163  }
164 
165 
166 
167  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
168  {
169    std::string name_suffix_str;
170    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
171     CTimer::get("XIOS").resume();
172    file_hdl->name_suffix.setValue(name_suffix_str);
173    file_hdl->sendAttributToServer(file_hdl->name_suffix);
174     CTimer::get("XIOS").suspend();
175  }
176 
177  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
178  {
179     CTimer::get("XIOS").resume();
180    if(!string_copy(file_hdl->name_suffix.getInheritedValue(),name_suffix , name_suffix_size))
181      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
182     CTimer::get("XIOS").suspend();
183  }
184 
185  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl )
186  {
187    CTimer::get("XIOS").resume();
188    bool isDefined = file_hdl->name_suffix.hasInheritedValue();
189    CTimer::get("XIOS").suspend();
190    return isDefined;
191  }
192 
193 
194 
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;
199     CTimer::get("XIOS").resume();
200    file_hdl->output_freq.setValue(output_freq_str);
201    file_hdl->sendAttributToServer(file_hdl->output_freq);
202     CTimer::get("XIOS").suspend();
203  }
204 
205  void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)
206  {
207     CTimer::get("XIOS").resume();
208    if(!string_copy(file_hdl->output_freq.getInheritedValue(),output_freq , output_freq_size))
209      ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
210     CTimer::get("XIOS").suspend();
211  }
212 
213  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl )
214  {
215    CTimer::get("XIOS").resume();
216    bool isDefined = file_hdl->output_freq.hasInheritedValue();
217    CTimer::get("XIOS").suspend();
218    return isDefined;
219  }
220 
221 
222 
223  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
224  {
225     CTimer::get("XIOS").resume();
226    file_hdl->output_level.setValue(output_level);
227    file_hdl->sendAttributToServer(file_hdl->output_level);
228     CTimer::get("XIOS").suspend();
229  }
230 
231  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
232  {
233    *output_level = file_hdl->output_level.getInheritedValue();
234  }
235 
236  bool cxios_is_defined_file_output_level(file_Ptr file_hdl )
237  {
238    CTimer::get("XIOS").resume();
239    bool isDefined = file_hdl->output_level.hasInheritedValue();
240    CTimer::get("XIOS").suspend();
241    return isDefined;
242  }
243 
244 
245 
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;
250     CTimer::get("XIOS").resume();
251    file_hdl->par_access.setValue(par_access_str);
252    file_hdl->sendAttributToServer(file_hdl->par_access);
253     CTimer::get("XIOS").suspend();
254  }
255 
256  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
257  {
258     CTimer::get("XIOS").resume();
259    if(!string_copy(file_hdl->par_access.getInheritedValue(),par_access , par_access_size))
260      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short");
261     CTimer::get("XIOS").suspend();
262  }
263 
264  bool cxios_is_defined_file_par_access(file_Ptr file_hdl )
265  {
266    CTimer::get("XIOS").resume();
267    bool isDefined = file_hdl->par_access.hasInheritedValue();
268    CTimer::get("XIOS").suspend();
269    return isDefined;
270  }
271 
272 
273 
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;
278     CTimer::get("XIOS").resume();
279    file_hdl->split_freq.setValue(split_freq_str);
280    file_hdl->sendAttributToServer(file_hdl->split_freq);
281     CTimer::get("XIOS").suspend();
282  }
283 
284  void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)
285  {
286     CTimer::get("XIOS").resume();
287    if(!string_copy(file_hdl->split_freq.getInheritedValue(),split_freq , split_freq_size))
288      ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
289     CTimer::get("XIOS").suspend();
290  }
291 
292  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl )
293  {
294    CTimer::get("XIOS").resume();
295    bool isDefined = file_hdl->split_freq.hasInheritedValue();
296    CTimer::get("XIOS").suspend();
297    return isDefined;
298  }
299 
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();
315    if(!string_copy(file_hdl->split_freq_format.getInheritedValue(),split_freq_format , split_freq_format_size))
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  {
322    CTimer::get("XIOS").resume();
323    bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
324    CTimer::get("XIOS").suspend();
325    return isDefined;
326  }
327 
328 
329 
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;
334     CTimer::get("XIOS").resume();
335    file_hdl->sync_freq.setValue(sync_freq_str);
336    file_hdl->sendAttributToServer(file_hdl->sync_freq);
337     CTimer::get("XIOS").suspend();
338  }
339 
340  void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)
341  {
342     CTimer::get("XIOS").resume();
343    if(!string_copy(file_hdl->sync_freq.getInheritedValue(),sync_freq , sync_freq_size))
344      ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
345     CTimer::get("XIOS").suspend();
346  }
347 
348  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl )
349  {
350    CTimer::get("XIOS").resume();
351    bool isDefined = file_hdl->sync_freq.hasInheritedValue();
352    CTimer::get("XIOS").suspend();
353    return isDefined;
354  }
355 
356 
357 
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 
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;
390     CTimer::get("XIOS").resume();
391    file_hdl->type.fromString(type_str);
392    file_hdl->sendAttributToServer(file_hdl->type);
393     CTimer::get("XIOS").suspend();
394  }
395 
396  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
397  {
398     CTimer::get("XIOS").resume();
399    if(!string_copy(file_hdl->type.getInheritedStringValue(),type , type_size))
400      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short");
401     CTimer::get("XIOS").suspend();
402  }
403 
404  bool cxios_is_defined_file_type(file_Ptr file_hdl )
405  {
406    CTimer::get("XIOS").resume();
407    bool isDefined = file_hdl->type.hasInheritedValue();
408    CTimer::get("XIOS").suspend();
409    return isDefined;
410  }
411 
412 
413 
414 
415}
Note: See TracBrowser for help on using the repository browser.