source: XIOS/trunk/src/interface/c_attr/icfile_attr.cpp @ 501

Last change on this file since 501 was 501, checked in by ymipsl, 10 years ago

Add licence copyright to all file ond directory src using the command :
svn propset -R copyright -F header_licence src

XIOS is now officialy under CeCILL licence

YM

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