source: XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp @ 529

Last change on this file since 529 was 528, checked in by rlacroix, 9 years ago

Add the ability to append data to existing output file(s).

By default existing file(s) will still be overwritten. Set the new file attribute "append" to true if you wish to append data to existing NetCDF file(s).

Note that the append mode is currently not supported when file splitting is used and that the structure of the output file cannot be changed.

  • 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.6 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::CFileGroup*  filegroup_Ptr;
18 
19  void cxios_set_filegroup_append(filegroup_Ptr filegroup_hdl, bool append)
20  {
21     CTimer::get("XIOS").resume();
22    filegroup_hdl->append.setValue(append);
23     CTimer::get("XIOS").suspend();
24  }
25 
26  void cxios_get_filegroup_append(filegroup_Ptr filegroup_hdl, bool* append)
27  {
28    *append = filegroup_hdl->append.getInheritedValue();
29  }
30 
31  bool cxios_is_defined_filegroup_append(filegroup_Ptr filegroup_hdl )
32  {
33     CTimer::get("XIOS").resume();
34    return filegroup_hdl->append.hasInheritedValue();
35     CTimer::get("XIOS").suspend();
36  }
37 
38 
39 
40  void cxios_set_filegroup_description(filegroup_Ptr filegroup_hdl, const char * description, int description_size)
41  {
42    std::string description_str;
43    if(!cstr2string(description, description_size, description_str)) return;
44     CTimer::get("XIOS").resume();
45    filegroup_hdl->description.setValue(description_str);
46     CTimer::get("XIOS").suspend();
47  }
48 
49  void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)
50  {
51     CTimer::get("XIOS").resume();
52    if(!string_copy(filegroup_hdl->description.getInheritedValue(),description , description_size))
53      ERROR("void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)", <<"Input string is to short");
54     CTimer::get("XIOS").suspend();
55  }
56 
57  bool cxios_is_defined_filegroup_description(filegroup_Ptr filegroup_hdl )
58  {
59     CTimer::get("XIOS").resume();
60    return filegroup_hdl->description.hasInheritedValue();
61     CTimer::get("XIOS").suspend();
62  }
63 
64 
65 
66  void cxios_set_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool enabled)
67  {
68     CTimer::get("XIOS").resume();
69    filegroup_hdl->enabled.setValue(enabled);
70     CTimer::get("XIOS").suspend();
71  }
72 
73  void cxios_get_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool* enabled)
74  {
75    *enabled = filegroup_hdl->enabled.getInheritedValue();
76  }
77 
78  bool cxios_is_defined_filegroup_enabled(filegroup_Ptr filegroup_hdl )
79  {
80     CTimer::get("XIOS").resume();
81    return filegroup_hdl->enabled.hasInheritedValue();
82     CTimer::get("XIOS").suspend();
83  }
84 
85 
86 
87  void cxios_set_filegroup_format(filegroup_Ptr filegroup_hdl, const char * format, int format_size)
88  {
89    std::string format_str;
90    if(!cstr2string(format, format_size, format_str)) return;
91     CTimer::get("XIOS").resume();
92    filegroup_hdl->format.fromString(format_str);
93     CTimer::get("XIOS").suspend();
94  }
95 
96  void cxios_get_filegroup_format(filegroup_Ptr filegroup_hdl, char * format, int format_size)
97  {
98     CTimer::get("XIOS").resume();
99    if(!string_copy(filegroup_hdl->format.getInheritedStringValue(),format , format_size))
100      ERROR("void cxios_get_filegroup_format(filegroup_Ptr filegroup_hdl, char * format, int format_size)", <<"Input string is to short");
101     CTimer::get("XIOS").suspend();
102  }
103 
104  bool cxios_is_defined_filegroup_format(filegroup_Ptr filegroup_hdl )
105  {
106     CTimer::get("XIOS").resume();
107    return filegroup_hdl->format.hasInheritedValue();
108     CTimer::get("XIOS").suspend();
109  }
110 
111 
112 
113  void cxios_set_filegroup_group_ref(filegroup_Ptr filegroup_hdl, const char * group_ref, int group_ref_size)
114  {
115    std::string group_ref_str;
116    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
117     CTimer::get("XIOS").resume();
118    filegroup_hdl->group_ref.setValue(group_ref_str);
119     CTimer::get("XIOS").suspend();
120  }
121 
122  void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)
123  {
124     CTimer::get("XIOS").resume();
125    if(!string_copy(filegroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size))
126      ERROR("void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
127     CTimer::get("XIOS").suspend();
128  }
129 
130  bool cxios_is_defined_filegroup_group_ref(filegroup_Ptr filegroup_hdl )
131  {
132     CTimer::get("XIOS").resume();
133    return filegroup_hdl->group_ref.hasInheritedValue();
134     CTimer::get("XIOS").suspend();
135  }
136 
137 
138 
139  void cxios_set_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int min_digits)
140  {
141     CTimer::get("XIOS").resume();
142    filegroup_hdl->min_digits.setValue(min_digits);
143     CTimer::get("XIOS").suspend();
144  }
145 
146  void cxios_get_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int* min_digits)
147  {
148    *min_digits = filegroup_hdl->min_digits.getInheritedValue();
149  }
150 
151  bool cxios_is_defined_filegroup_min_digits(filegroup_Ptr filegroup_hdl )
152  {
153     CTimer::get("XIOS").resume();
154    return filegroup_hdl->min_digits.hasInheritedValue();
155     CTimer::get("XIOS").suspend();
156  }
157 
158 
159 
160  void cxios_set_filegroup_name(filegroup_Ptr filegroup_hdl, const char * name, int name_size)
161  {
162    std::string name_str;
163    if(!cstr2string(name, name_size, name_str)) return;
164     CTimer::get("XIOS").resume();
165    filegroup_hdl->name.setValue(name_str);
166     CTimer::get("XIOS").suspend();
167  }
168 
169  void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)
170  {
171     CTimer::get("XIOS").resume();
172    if(!string_copy(filegroup_hdl->name.getInheritedValue(),name , name_size))
173      ERROR("void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)", <<"Input string is to short");
174     CTimer::get("XIOS").suspend();
175  }
176 
177  bool cxios_is_defined_filegroup_name(filegroup_Ptr filegroup_hdl )
178  {
179     CTimer::get("XIOS").resume();
180    return filegroup_hdl->name.hasInheritedValue();
181     CTimer::get("XIOS").suspend();
182  }
183 
184 
185 
186  void cxios_set_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, const char * name_suffix, int name_suffix_size)
187  {
188    std::string name_suffix_str;
189    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
190     CTimer::get("XIOS").resume();
191    filegroup_hdl->name_suffix.setValue(name_suffix_str);
192     CTimer::get("XIOS").suspend();
193  }
194 
195  void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)
196  {
197     CTimer::get("XIOS").resume();
198    if(!string_copy(filegroup_hdl->name_suffix.getInheritedValue(),name_suffix , name_suffix_size))
199      ERROR("void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
200     CTimer::get("XIOS").suspend();
201  }
202 
203  bool cxios_is_defined_filegroup_name_suffix(filegroup_Ptr filegroup_hdl )
204  {
205     CTimer::get("XIOS").resume();
206    return filegroup_hdl->name_suffix.hasInheritedValue();
207     CTimer::get("XIOS").suspend();
208  }
209 
210 
211 
212  void cxios_set_filegroup_output_freq(filegroup_Ptr filegroup_hdl, const char * output_freq, int output_freq_size)
213  {
214    std::string output_freq_str;
215    if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return;
216     CTimer::get("XIOS").resume();
217    filegroup_hdl->output_freq.setValue(output_freq_str);
218     CTimer::get("XIOS").suspend();
219  }
220 
221  void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size)
222  {
223     CTimer::get("XIOS").resume();
224    if(!string_copy(filegroup_hdl->output_freq.getInheritedValue(),output_freq , output_freq_size))
225      ERROR("void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
226     CTimer::get("XIOS").suspend();
227  }
228 
229  bool cxios_is_defined_filegroup_output_freq(filegroup_Ptr filegroup_hdl )
230  {
231     CTimer::get("XIOS").resume();
232    return filegroup_hdl->output_freq.hasInheritedValue();
233     CTimer::get("XIOS").suspend();
234  }
235 
236 
237 
238  void cxios_set_filegroup_output_level(filegroup_Ptr filegroup_hdl, int output_level)
239  {
240     CTimer::get("XIOS").resume();
241    filegroup_hdl->output_level.setValue(output_level);
242     CTimer::get("XIOS").suspend();
243  }
244 
245  void cxios_get_filegroup_output_level(filegroup_Ptr filegroup_hdl, int* output_level)
246  {
247    *output_level = filegroup_hdl->output_level.getInheritedValue();
248  }
249 
250  bool cxios_is_defined_filegroup_output_level(filegroup_Ptr filegroup_hdl )
251  {
252     CTimer::get("XIOS").resume();
253    return filegroup_hdl->output_level.hasInheritedValue();
254     CTimer::get("XIOS").suspend();
255  }
256 
257 
258 
259  void cxios_set_filegroup_par_access(filegroup_Ptr filegroup_hdl, const char * par_access, int par_access_size)
260  {
261    std::string par_access_str;
262    if(!cstr2string(par_access, par_access_size, par_access_str)) return;
263     CTimer::get("XIOS").resume();
264    filegroup_hdl->par_access.fromString(par_access_str);
265     CTimer::get("XIOS").suspend();
266  }
267 
268  void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)
269  {
270     CTimer::get("XIOS").resume();
271    if(!string_copy(filegroup_hdl->par_access.getInheritedStringValue(),par_access , par_access_size))
272      ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", <<"Input string is to short");
273     CTimer::get("XIOS").suspend();
274  }
275 
276  bool cxios_is_defined_filegroup_par_access(filegroup_Ptr filegroup_hdl )
277  {
278     CTimer::get("XIOS").resume();
279    return filegroup_hdl->par_access.hasInheritedValue();
280     CTimer::get("XIOS").suspend();
281  }
282 
283 
284 
285  void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, const char * split_freq, int split_freq_size)
286  {
287    std::string split_freq_str;
288    if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return;
289     CTimer::get("XIOS").resume();
290    filegroup_hdl->split_freq.setValue(split_freq_str);
291     CTimer::get("XIOS").suspend();
292  }
293 
294  void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size)
295  {
296     CTimer::get("XIOS").resume();
297    if(!string_copy(filegroup_hdl->split_freq.getInheritedValue(),split_freq , split_freq_size))
298      ERROR("void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
299     CTimer::get("XIOS").suspend();
300  }
301 
302  bool cxios_is_defined_filegroup_split_freq(filegroup_Ptr filegroup_hdl )
303  {
304     CTimer::get("XIOS").resume();
305    return filegroup_hdl->split_freq.hasInheritedValue();
306     CTimer::get("XIOS").suspend();
307  }
308 
309 
310 
311  void cxios_set_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, const char * split_freq_format, int split_freq_format_size)
312  {
313    std::string split_freq_format_str;
314    if(!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
315     CTimer::get("XIOS").resume();
316    filegroup_hdl->split_freq_format.setValue(split_freq_format_str);
317     CTimer::get("XIOS").suspend();
318  }
319 
320  void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size)
321  {
322     CTimer::get("XIOS").resume();
323    if(!string_copy(filegroup_hdl->split_freq_format.getInheritedValue(),split_freq_format , split_freq_format_size))
324      ERROR("void cxios_get_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl, char * split_freq_format, int split_freq_format_size)", <<"Input string is to short");
325     CTimer::get("XIOS").suspend();
326  }
327 
328  bool cxios_is_defined_filegroup_split_freq_format(filegroup_Ptr filegroup_hdl )
329  {
330     CTimer::get("XIOS").resume();
331    return filegroup_hdl->split_freq_format.hasInheritedValue();
332     CTimer::get("XIOS").suspend();
333  }
334 
335 
336 
337  void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, const char * sync_freq, int sync_freq_size)
338  {
339    std::string sync_freq_str;
340    if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return;
341     CTimer::get("XIOS").resume();
342    filegroup_hdl->sync_freq.setValue(sync_freq_str);
343     CTimer::get("XIOS").suspend();
344  }
345 
346  void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size)
347  {
348     CTimer::get("XIOS").resume();
349    if(!string_copy(filegroup_hdl->sync_freq.getInheritedValue(),sync_freq , sync_freq_size))
350      ERROR("void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
351     CTimer::get("XIOS").suspend();
352  }
353 
354  bool cxios_is_defined_filegroup_sync_freq(filegroup_Ptr filegroup_hdl )
355  {
356     CTimer::get("XIOS").resume();
357    return filegroup_hdl->sync_freq.hasInheritedValue();
358     CTimer::get("XIOS").suspend();
359  }
360 
361 
362 
363  void cxios_set_filegroup_type(filegroup_Ptr filegroup_hdl, const char * type, int type_size)
364  {
365    std::string type_str;
366    if(!cstr2string(type, type_size, type_str)) return;
367     CTimer::get("XIOS").resume();
368    filegroup_hdl->type.fromString(type_str);
369     CTimer::get("XIOS").suspend();
370  }
371 
372  void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)
373  {
374     CTimer::get("XIOS").resume();
375    if(!string_copy(filegroup_hdl->type.getInheritedStringValue(),type , type_size))
376      ERROR("void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)", <<"Input string is to short");
377     CTimer::get("XIOS").suspend();
378  }
379 
380  bool cxios_is_defined_filegroup_type(filegroup_Ptr filegroup_hdl )
381  {
382     CTimer::get("XIOS").resume();
383    return filegroup_hdl->type.hasInheritedValue();
384     CTimer::get("XIOS").suspend();
385  }
386 
387 
388 
389 
390}
Note: See TracBrowser for help on using the repository browser.