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

Last change on this file since 526 was 526, checked in by rlacroix, 10 years ago

Convert some attributes to enumerations:

  • file: par_access
  • context: calendar_type

Those changes should have no effect on existing XML configuration files and ensure that a proper error message is always displayed during parsing if the value is not supported.

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