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

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

XIOS 1.0: Add the Fortran interface for the new "time_counter" file attribute.

I forgot that the change had been made in XIOS 1.0 too...

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