source: XIOS/trunk/src/interface/c_attr/icfield_attr.cpp @ 347

Last change on this file since 347 was 347, checked in by ymipsl, 10 years ago
  • Supress lot of shared_ptr
  • instrument code for vampir-trace and timer diagnostic

YM

  • Property svn:eol-style set to native
File size: 10.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_impl.hpp"
9#include "object_template_impl.hpp"
10#include "group_template_impl.hpp"
11#include "icutil.hpp"
12#include "timer.hpp"
13
14extern "C"
15{
16  typedef xios::CField*  field_Ptr;
17 
18  void cxios_set_field_axis_ref(field_Ptr field_hdl, const char * axis_ref, int axis_ref_size)
19  {
20    std::string axis_ref_str;
21    if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
22     CTimer::get("XIOS").resume();
23    field_hdl->axis_ref.setValue(axis_ref_str);
24    field_hdl->sendAttributToServer(field_hdl->axis_ref);
25     CTimer::get("XIOS").suspend();
26  }
27 
28  void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size)
29  {
30     CTimer::get("XIOS").resume();
31    if(!string_copy(field_hdl->axis_ref.getValue(),axis_ref , axis_ref_size))
32      ERROR("void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");
33     CTimer::get("XIOS").suspend();
34  }
35 
36 
37  void cxios_set_field_default_value(field_Ptr field_hdl, double default_value)
38  {
39     CTimer::get("XIOS").resume();
40    field_hdl->default_value.setValue(default_value);
41    field_hdl->sendAttributToServer(field_hdl->default_value);
42     CTimer::get("XIOS").suspend();
43  }
44 
45  void cxios_get_field_default_value(field_Ptr field_hdl, double* default_value)
46  {
47    *default_value = field_hdl->default_value.getValue();
48  }
49 
50 
51  void cxios_set_field_domain_ref(field_Ptr field_hdl, const char * domain_ref, int domain_ref_size)
52  {
53    std::string domain_ref_str;
54    if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
55     CTimer::get("XIOS").resume();
56    field_hdl->domain_ref.setValue(domain_ref_str);
57    field_hdl->sendAttributToServer(field_hdl->domain_ref);
58     CTimer::get("XIOS").suspend();
59  }
60 
61  void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size)
62  {
63     CTimer::get("XIOS").resume();
64    if(!string_copy(field_hdl->domain_ref.getValue(),domain_ref , domain_ref_size))
65      ERROR("void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");
66     CTimer::get("XIOS").suspend();
67  }
68 
69 
70  void cxios_set_field_enabled(field_Ptr field_hdl, bool enabled)
71  {
72     CTimer::get("XIOS").resume();
73    field_hdl->enabled.setValue(enabled);
74    field_hdl->sendAttributToServer(field_hdl->enabled);
75     CTimer::get("XIOS").suspend();
76  }
77 
78  void cxios_get_field_enabled(field_Ptr field_hdl, bool* enabled)
79  {
80    *enabled = field_hdl->enabled.getValue();
81  }
82 
83 
84  void cxios_set_field_field_ref(field_Ptr field_hdl, const char * field_ref, int field_ref_size)
85  {
86    std::string field_ref_str;
87    if(!cstr2string(field_ref, field_ref_size, field_ref_str)) return;
88     CTimer::get("XIOS").resume();
89    field_hdl->field_ref.setValue(field_ref_str);
90    field_hdl->sendAttributToServer(field_hdl->field_ref);
91     CTimer::get("XIOS").suspend();
92  }
93 
94  void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size)
95  {
96     CTimer::get("XIOS").resume();
97    if(!string_copy(field_hdl->field_ref.getValue(),field_ref , field_ref_size))
98      ERROR("void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size)", <<"Input string is to short");
99     CTimer::get("XIOS").suspend();
100  }
101 
102 
103  void cxios_set_field_freq_offset(field_Ptr field_hdl, const char * freq_offset, int freq_offset_size)
104  {
105    std::string freq_offset_str;
106    if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return;
107     CTimer::get("XIOS").resume();
108    field_hdl->freq_offset.setValue(freq_offset_str);
109    field_hdl->sendAttributToServer(field_hdl->freq_offset);
110     CTimer::get("XIOS").suspend();
111  }
112 
113  void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size)
114  {
115     CTimer::get("XIOS").resume();
116    if(!string_copy(field_hdl->freq_offset.getValue(),freq_offset , freq_offset_size))
117      ERROR("void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short");
118     CTimer::get("XIOS").suspend();
119  }
120 
121 
122  void cxios_set_field_freq_op(field_Ptr field_hdl, const char * freq_op, int freq_op_size)
123  {
124    std::string freq_op_str;
125    if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return;
126     CTimer::get("XIOS").resume();
127    field_hdl->freq_op.setValue(freq_op_str);
128    field_hdl->sendAttributToServer(field_hdl->freq_op);
129     CTimer::get("XIOS").suspend();
130  }
131 
132  void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size)
133  {
134     CTimer::get("XIOS").resume();
135    if(!string_copy(field_hdl->freq_op.getValue(),freq_op , freq_op_size))
136      ERROR("void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short");
137     CTimer::get("XIOS").suspend();
138  }
139 
140 
141  void cxios_set_field_grid_ref(field_Ptr field_hdl, const char * grid_ref, int grid_ref_size)
142  {
143    std::string grid_ref_str;
144    if(!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;
145     CTimer::get("XIOS").resume();
146    field_hdl->grid_ref.setValue(grid_ref_str);
147    field_hdl->sendAttributToServer(field_hdl->grid_ref);
148     CTimer::get("XIOS").suspend();
149  }
150 
151  void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size)
152  {
153     CTimer::get("XIOS").resume();
154    if(!string_copy(field_hdl->grid_ref.getValue(),grid_ref , grid_ref_size))
155      ERROR("void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size)", <<"Input string is to short");
156     CTimer::get("XIOS").suspend();
157  }
158 
159 
160  void cxios_set_field_level(field_Ptr field_hdl, int level)
161  {
162     CTimer::get("XIOS").resume();
163    field_hdl->level.setValue(level);
164    field_hdl->sendAttributToServer(field_hdl->level);
165     CTimer::get("XIOS").suspend();
166  }
167 
168  void cxios_get_field_level(field_Ptr field_hdl, int* level)
169  {
170    *level = field_hdl->level.getValue();
171  }
172 
173 
174  void cxios_set_field_long_name(field_Ptr field_hdl, const char * long_name, int long_name_size)
175  {
176    std::string long_name_str;
177    if(!cstr2string(long_name, long_name_size, long_name_str)) return;
178     CTimer::get("XIOS").resume();
179    field_hdl->long_name.setValue(long_name_str);
180    field_hdl->sendAttributToServer(field_hdl->long_name);
181     CTimer::get("XIOS").suspend();
182  }
183 
184  void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size)
185  {
186     CTimer::get("XIOS").resume();
187    if(!string_copy(field_hdl->long_name.getValue(),long_name , long_name_size))
188      ERROR("void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size)", <<"Input string is to short");
189     CTimer::get("XIOS").suspend();
190  }
191 
192 
193  void cxios_set_field_name(field_Ptr field_hdl, const char * name, int name_size)
194  {
195    std::string name_str;
196    if(!cstr2string(name, name_size, name_str)) return;
197     CTimer::get("XIOS").resume();
198    field_hdl->name.setValue(name_str);
199    field_hdl->sendAttributToServer(field_hdl->name);
200     CTimer::get("XIOS").suspend();
201  }
202 
203  void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size)
204  {
205     CTimer::get("XIOS").resume();
206    if(!string_copy(field_hdl->name.getValue(),name , name_size))
207      ERROR("void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size)", <<"Input string is to short");
208     CTimer::get("XIOS").suspend();
209  }
210 
211 
212  void cxios_set_field_operation(field_Ptr field_hdl, const char * operation, int operation_size)
213  {
214    std::string operation_str;
215    if(!cstr2string(operation, operation_size, operation_str)) return;
216     CTimer::get("XIOS").resume();
217    field_hdl->operation.setValue(operation_str);
218    field_hdl->sendAttributToServer(field_hdl->operation);
219     CTimer::get("XIOS").suspend();
220  }
221 
222  void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size)
223  {
224     CTimer::get("XIOS").resume();
225    if(!string_copy(field_hdl->operation.getValue(),operation , operation_size))
226      ERROR("void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size)", <<"Input string is to short");
227     CTimer::get("XIOS").suspend();
228  }
229 
230 
231  void cxios_set_field_prec(field_Ptr field_hdl, int prec)
232  {
233     CTimer::get("XIOS").resume();
234    field_hdl->prec.setValue(prec);
235    field_hdl->sendAttributToServer(field_hdl->prec);
236     CTimer::get("XIOS").suspend();
237  }
238 
239  void cxios_get_field_prec(field_Ptr field_hdl, int* prec)
240  {
241    *prec = field_hdl->prec.getValue();
242  }
243 
244 
245  void cxios_set_field_standard_name(field_Ptr field_hdl, const char * standard_name, int standard_name_size)
246  {
247    std::string standard_name_str;
248    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
249     CTimer::get("XIOS").resume();
250    field_hdl->standard_name.setValue(standard_name_str);
251    field_hdl->sendAttributToServer(field_hdl->standard_name);
252     CTimer::get("XIOS").suspend();
253  }
254 
255  void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size)
256  {
257     CTimer::get("XIOS").resume();
258    if(!string_copy(field_hdl->standard_name.getValue(),standard_name , standard_name_size))
259      ERROR("void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short");
260     CTimer::get("XIOS").suspend();
261  }
262 
263 
264  void cxios_set_field_unit(field_Ptr field_hdl, const char * unit, int unit_size)
265  {
266    std::string unit_str;
267    if(!cstr2string(unit, unit_size, unit_str)) return;
268     CTimer::get("XIOS").resume();
269    field_hdl->unit.setValue(unit_str);
270    field_hdl->sendAttributToServer(field_hdl->unit);
271     CTimer::get("XIOS").suspend();
272  }
273 
274  void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size)
275  {
276     CTimer::get("XIOS").resume();
277    if(!string_copy(field_hdl->unit.getValue(),unit , unit_size))
278      ERROR("void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size)", <<"Input string is to short");
279     CTimer::get("XIOS").suspend();
280  }
281 
282 
283 
284}
Note: See TracBrowser for help on using the repository browser.