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

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

Fix the Fortran interface generation to avoid generating dead code that caused a timer not to be stopped.

  • 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: 11.3 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_description(file_Ptr file_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    file_hdl->description.setValue(description_str);
25    file_hdl->sendAttributToServer(file_hdl->description);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(file_hdl->description.getInheritedValue(),description , description_size))
33      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37  bool cxios_is_defined_file_description(file_Ptr file_hdl )
38  {
39    CTimer::get("XIOS").resume();
40    bool isDefined = file_hdl->description.hasInheritedValue();
41    CTimer::get("XIOS").suspend();
42    return isDefined;
43  }
44 
45 
46 
47  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
48  {
49     CTimer::get("XIOS").resume();
50    file_hdl->enabled.setValue(enabled);
51    file_hdl->sendAttributToServer(file_hdl->enabled);
52     CTimer::get("XIOS").suspend();
53  }
54 
55  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
56  {
57    *enabled = file_hdl->enabled.getInheritedValue();
58  }
59 
60  bool cxios_is_defined_file_enabled(file_Ptr file_hdl )
61  {
62    CTimer::get("XIOS").resume();
63    bool isDefined = file_hdl->enabled.hasInheritedValue();
64    CTimer::get("XIOS").suspend();
65    return isDefined;
66  }
67 
68 
69 
70  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
71  {
72     CTimer::get("XIOS").resume();
73    file_hdl->min_digits.setValue(min_digits);
74    file_hdl->sendAttributToServer(file_hdl->min_digits);
75     CTimer::get("XIOS").suspend();
76  }
77 
78  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
79  {
80    *min_digits = file_hdl->min_digits.getInheritedValue();
81  }
82 
83  bool cxios_is_defined_file_min_digits(file_Ptr file_hdl )
84  {
85    CTimer::get("XIOS").resume();
86    bool isDefined = file_hdl->min_digits.hasInheritedValue();
87    CTimer::get("XIOS").suspend();
88    return isDefined;
89  }
90 
91 
92 
93  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
94  {
95    std::string name_str;
96    if(!cstr2string(name, name_size, name_str)) return;
97     CTimer::get("XIOS").resume();
98    file_hdl->name.setValue(name_str);
99    file_hdl->sendAttributToServer(file_hdl->name);
100     CTimer::get("XIOS").suspend();
101  }
102 
103  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
104  {
105     CTimer::get("XIOS").resume();
106    if(!string_copy(file_hdl->name.getInheritedValue(),name , name_size))
107      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", <<"Input string is to short");
108     CTimer::get("XIOS").suspend();
109  }
110 
111  bool cxios_is_defined_file_name(file_Ptr file_hdl )
112  {
113    CTimer::get("XIOS").resume();
114    bool isDefined = file_hdl->name.hasInheritedValue();
115    CTimer::get("XIOS").suspend();
116    return isDefined;
117  }
118 
119 
120 
121  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
122  {
123    std::string name_suffix_str;
124    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
125     CTimer::get("XIOS").resume();
126    file_hdl->name_suffix.setValue(name_suffix_str);
127    file_hdl->sendAttributToServer(file_hdl->name_suffix);
128     CTimer::get("XIOS").suspend();
129  }
130 
131  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
132  {
133     CTimer::get("XIOS").resume();
134    if(!string_copy(file_hdl->name_suffix.getInheritedValue(),name_suffix , name_suffix_size))
135      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
136     CTimer::get("XIOS").suspend();
137  }
138 
139  bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl )
140  {
141    CTimer::get("XIOS").resume();
142    bool isDefined = file_hdl->name_suffix.hasInheritedValue();
143    CTimer::get("XIOS").suspend();
144    return isDefined;
145  }
146 
147 
148 
149  void cxios_set_file_output_freq(file_Ptr file_hdl, const char * output_freq, int output_freq_size)
150  {
151    std::string output_freq_str;
152    if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return;
153     CTimer::get("XIOS").resume();
154    file_hdl->output_freq.setValue(output_freq_str);
155    file_hdl->sendAttributToServer(file_hdl->output_freq);
156     CTimer::get("XIOS").suspend();
157  }
158 
159  void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)
160  {
161     CTimer::get("XIOS").resume();
162    if(!string_copy(file_hdl->output_freq.getInheritedValue(),output_freq , output_freq_size))
163      ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
164     CTimer::get("XIOS").suspend();
165  }
166 
167  bool cxios_is_defined_file_output_freq(file_Ptr file_hdl )
168  {
169    CTimer::get("XIOS").resume();
170    bool isDefined = file_hdl->output_freq.hasInheritedValue();
171    CTimer::get("XIOS").suspend();
172    return isDefined;
173  }
174 
175 
176 
177  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
178  {
179     CTimer::get("XIOS").resume();
180    file_hdl->output_level.setValue(output_level);
181    file_hdl->sendAttributToServer(file_hdl->output_level);
182     CTimer::get("XIOS").suspend();
183  }
184 
185  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
186  {
187    *output_level = file_hdl->output_level.getInheritedValue();
188  }
189 
190  bool cxios_is_defined_file_output_level(file_Ptr file_hdl )
191  {
192    CTimer::get("XIOS").resume();
193    bool isDefined = file_hdl->output_level.hasInheritedValue();
194    CTimer::get("XIOS").suspend();
195    return isDefined;
196  }
197 
198 
199 
200  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
201  {
202    std::string par_access_str;
203    if(!cstr2string(par_access, par_access_size, par_access_str)) return;
204     CTimer::get("XIOS").resume();
205    file_hdl->par_access.setValue(par_access_str);
206    file_hdl->sendAttributToServer(file_hdl->par_access);
207     CTimer::get("XIOS").suspend();
208  }
209 
210  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
211  {
212     CTimer::get("XIOS").resume();
213    if(!string_copy(file_hdl->par_access.getInheritedValue(),par_access , par_access_size))
214      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short");
215     CTimer::get("XIOS").suspend();
216  }
217 
218  bool cxios_is_defined_file_par_access(file_Ptr file_hdl )
219  {
220    CTimer::get("XIOS").resume();
221    bool isDefined = file_hdl->par_access.hasInheritedValue();
222    CTimer::get("XIOS").suspend();
223    return isDefined;
224  }
225 
226 
227 
228  void cxios_set_file_split_freq(file_Ptr file_hdl, const char * split_freq, int split_freq_size)
229  {
230    std::string split_freq_str;
231    if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return;
232     CTimer::get("XIOS").resume();
233    file_hdl->split_freq.setValue(split_freq_str);
234    file_hdl->sendAttributToServer(file_hdl->split_freq);
235     CTimer::get("XIOS").suspend();
236  }
237 
238  void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)
239  {
240     CTimer::get("XIOS").resume();
241    if(!string_copy(file_hdl->split_freq.getInheritedValue(),split_freq , split_freq_size))
242      ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
243     CTimer::get("XIOS").suspend();
244  }
245 
246  bool cxios_is_defined_file_split_freq(file_Ptr file_hdl )
247  {
248    CTimer::get("XIOS").resume();
249    bool isDefined = file_hdl->split_freq.hasInheritedValue();
250    CTimer::get("XIOS").suspend();
251    return isDefined;
252  }
253 
254 
255 
256  void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size)
257  {
258    std::string split_freq_format_str;
259    if(!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return;
260     CTimer::get("XIOS").resume();
261    file_hdl->split_freq_format.setValue(split_freq_format_str);
262    file_hdl->sendAttributToServer(file_hdl->split_freq_format);
263     CTimer::get("XIOS").suspend();
264  }
265 
266  void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)
267  {
268     CTimer::get("XIOS").resume();
269    if(!string_copy(file_hdl->split_freq_format.getInheritedValue(),split_freq_format , split_freq_format_size))
270      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");
271     CTimer::get("XIOS").suspend();
272  }
273 
274  bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl )
275  {
276    CTimer::get("XIOS").resume();
277    bool isDefined = file_hdl->split_freq_format.hasInheritedValue();
278    CTimer::get("XIOS").suspend();
279    return isDefined;
280  }
281 
282 
283 
284  void cxios_set_file_sync_freq(file_Ptr file_hdl, const char * sync_freq, int sync_freq_size)
285  {
286    std::string sync_freq_str;
287    if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return;
288     CTimer::get("XIOS").resume();
289    file_hdl->sync_freq.setValue(sync_freq_str);
290    file_hdl->sendAttributToServer(file_hdl->sync_freq);
291     CTimer::get("XIOS").suspend();
292  }
293 
294  void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)
295  {
296     CTimer::get("XIOS").resume();
297    if(!string_copy(file_hdl->sync_freq.getInheritedValue(),sync_freq , sync_freq_size))
298      ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
299     CTimer::get("XIOS").suspend();
300  }
301 
302  bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl )
303  {
304    CTimer::get("XIOS").resume();
305    bool isDefined = file_hdl->sync_freq.hasInheritedValue();
306    CTimer::get("XIOS").suspend();
307    return isDefined;
308  }
309 
310 
311 
312  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
313  {
314    std::string type_str;
315    if(!cstr2string(type, type_size, type_str)) return;
316     CTimer::get("XIOS").resume();
317    file_hdl->type.fromString(type_str);
318    file_hdl->sendAttributToServer(file_hdl->type);
319     CTimer::get("XIOS").suspend();
320  }
321 
322  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
323  {
324     CTimer::get("XIOS").resume();
325    if(!string_copy(file_hdl->type.getInheritedStringValue(),type , type_size))
326      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short");
327     CTimer::get("XIOS").suspend();
328  }
329 
330  bool cxios_is_defined_file_type(file_Ptr file_hdl )
331  {
332    CTimer::get("XIOS").resume();
333    bool isDefined = file_hdl->type.hasInheritedValue();
334    CTimer::get("XIOS").suspend();
335    return isDefined;
336  }
337 
338 
339 
340 
341}
Note: See TracBrowser for help on using the repository browser.