source: XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp @ 445

Last change on this file since 445 was 445, checked in by ymipsl, 11 years ago

Add possibility to make inheritance of attributes and reference before closing the context definition.
New fortran fonction : xios_solve inheritance()
After this call, the value of attribute have the inherited value of their parent.

YM

  • Property svn:eol-style set to native
File size: 10.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::CAxisGroup*  axisgroup_Ptr;
18 
19  void cxios_set_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, const char * group_ref, int group_ref_size)
20  {
21    std::string group_ref_str;
22    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
23     CTimer::get("XIOS").resume();
24    axisgroup_hdl->group_ref.setValue(group_ref_str);
25    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->group_ref);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(axisgroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size))
33      ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37  bool cxios_is_defined_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl )
38  {
39     CTimer::get("XIOS").resume();
40    return axisgroup_hdl->group_ref.hasInheritedValue();
41     CTimer::get("XIOS").suspend();
42  }
43 
44 
45 
46  void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size)
47  {
48    std::string long_name_str;
49    if(!cstr2string(long_name, long_name_size, long_name_str)) return;
50     CTimer::get("XIOS").resume();
51    axisgroup_hdl->long_name.setValue(long_name_str);
52    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->long_name);
53     CTimer::get("XIOS").suspend();
54  }
55 
56  void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)
57  {
58     CTimer::get("XIOS").resume();
59    if(!string_copy(axisgroup_hdl->long_name.getInheritedValue(),long_name , long_name_size))
60      ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short");
61     CTimer::get("XIOS").suspend();
62  }
63 
64  bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl )
65  {
66     CTimer::get("XIOS").resume();
67    return axisgroup_hdl->long_name.hasInheritedValue();
68     CTimer::get("XIOS").suspend();
69  }
70 
71 
72 
73  void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size)
74  {
75    std::string name_str;
76    if(!cstr2string(name, name_size, name_str)) return;
77     CTimer::get("XIOS").resume();
78    axisgroup_hdl->name.setValue(name_str);
79    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->name);
80     CTimer::get("XIOS").suspend();
81  }
82 
83  void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)
84  {
85     CTimer::get("XIOS").resume();
86    if(!string_copy(axisgroup_hdl->name.getInheritedValue(),name , name_size))
87      ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", <<"Input string is to short");
88     CTimer::get("XIOS").suspend();
89  }
90 
91  bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl )
92  {
93     CTimer::get("XIOS").resume();
94    return axisgroup_hdl->name.hasInheritedValue();
95     CTimer::get("XIOS").suspend();
96  }
97 
98 
99 
100  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size)
101  {
102    std::string positive_str;
103    if(!cstr2string(positive, positive_size, positive_str)) return;
104     CTimer::get("XIOS").resume();
105    axisgroup_hdl->positive.fromString(positive_str);
106    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->positive);
107     CTimer::get("XIOS").suspend();
108  }
109 
110  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)
111  {
112     CTimer::get("XIOS").resume();
113    if(!string_copy(axisgroup_hdl->positive.getInheritedStringValue(),positive , positive_size))
114      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", <<"Input string is to short");
115     CTimer::get("XIOS").suspend();
116  }
117 
118  bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl )
119  {
120     CTimer::get("XIOS").resume();
121    return axisgroup_hdl->positive.hasInheritedValue();
122     CTimer::get("XIOS").suspend();
123  }
124 
125 
126 
127  void cxios_set_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int size)
128  {
129     CTimer::get("XIOS").resume();
130    axisgroup_hdl->size.setValue(size);
131    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->size);
132     CTimer::get("XIOS").suspend();
133  }
134 
135  void cxios_get_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int* size)
136  {
137    *size = axisgroup_hdl->size.getInheritedValue();
138  }
139 
140  bool cxios_is_defined_axisgroup_size(axisgroup_Ptr axisgroup_hdl )
141  {
142     CTimer::get("XIOS").resume();
143    return axisgroup_hdl->size.hasInheritedValue();
144     CTimer::get("XIOS").suspend();
145  }
146 
147 
148 
149  void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size)
150  {
151    std::string standard_name_str;
152    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
153     CTimer::get("XIOS").resume();
154    axisgroup_hdl->standard_name.setValue(standard_name_str);
155    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->standard_name);
156     CTimer::get("XIOS").suspend();
157  }
158 
159  void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)
160  {
161     CTimer::get("XIOS").resume();
162    if(!string_copy(axisgroup_hdl->standard_name.getInheritedValue(),standard_name , standard_name_size))
163      ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short");
164     CTimer::get("XIOS").suspend();
165  }
166 
167  bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl )
168  {
169     CTimer::get("XIOS").resume();
170    return axisgroup_hdl->standard_name.hasInheritedValue();
171     CTimer::get("XIOS").suspend();
172  }
173 
174 
175 
176  void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size)
177  {
178    std::string unit_str;
179    if(!cstr2string(unit, unit_size, unit_str)) return;
180     CTimer::get("XIOS").resume();
181    axisgroup_hdl->unit.setValue(unit_str);
182    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->unit);
183     CTimer::get("XIOS").suspend();
184  }
185 
186  void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)
187  {
188     CTimer::get("XIOS").resume();
189    if(!string_copy(axisgroup_hdl->unit.getInheritedValue(),unit , unit_size))
190      ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", <<"Input string is to short");
191     CTimer::get("XIOS").suspend();
192  }
193 
194  bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl )
195  {
196     CTimer::get("XIOS").resume();
197    return axisgroup_hdl->unit.hasInheritedValue();
198     CTimer::get("XIOS").suspend();
199  }
200 
201 
202 
203  void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1)
204  {
205    CTimer::get("XIOS").resume();
206    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
207    axisgroup_hdl->value.reference(tmp.copy());
208    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->value);
209     CTimer::get("XIOS").suspend();
210  }
211 
212  void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1)
213  {
214    CTimer::get("XIOS").resume();
215    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
216    tmp=axisgroup_hdl->value.getInheritedValue() ;
217     CTimer::get("XIOS").suspend();
218  }
219 
220  bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl )
221  {
222     CTimer::get("XIOS").resume();
223    return axisgroup_hdl->value.hasInheritedValue();
224     CTimer::get("XIOS").suspend();
225  }
226 
227 
228 
229  void cxios_set_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl, int zoom_begin)
230  {
231     CTimer::get("XIOS").resume();
232    axisgroup_hdl->zoom_begin.setValue(zoom_begin);
233    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->zoom_begin);
234     CTimer::get("XIOS").suspend();
235  }
236 
237  void cxios_get_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl, int* zoom_begin)
238  {
239    *zoom_begin = axisgroup_hdl->zoom_begin.getInheritedValue();
240  }
241 
242  bool cxios_is_defined_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl )
243  {
244     CTimer::get("XIOS").resume();
245    return axisgroup_hdl->zoom_begin.hasInheritedValue();
246     CTimer::get("XIOS").suspend();
247  }
248 
249 
250 
251  void cxios_set_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl, int zoom_end)
252  {
253     CTimer::get("XIOS").resume();
254    axisgroup_hdl->zoom_end.setValue(zoom_end);
255    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->zoom_end);
256     CTimer::get("XIOS").suspend();
257  }
258 
259  void cxios_get_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl, int* zoom_end)
260  {
261    *zoom_end = axisgroup_hdl->zoom_end.getInheritedValue();
262  }
263 
264  bool cxios_is_defined_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl )
265  {
266     CTimer::get("XIOS").resume();
267    return axisgroup_hdl->zoom_end.hasInheritedValue();
268     CTimer::get("XIOS").suspend();
269  }
270 
271 
272 
273  void cxios_set_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl, int zoom_size)
274  {
275     CTimer::get("XIOS").resume();
276    axisgroup_hdl->zoom_size.setValue(zoom_size);
277    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->zoom_size);
278     CTimer::get("XIOS").suspend();
279  }
280 
281  void cxios_get_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl, int* zoom_size)
282  {
283    *zoom_size = axisgroup_hdl->zoom_size.getInheritedValue();
284  }
285 
286  bool cxios_is_defined_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl )
287  {
288     CTimer::get("XIOS").resume();
289    return axisgroup_hdl->zoom_size.hasInheritedValue();
290     CTimer::get("XIOS").suspend();
291  }
292 
293 
294 
295 
296}
Note: See TracBrowser for help on using the repository browser.