source: XIOS/branchs/xios-1.0/src/interface/c_attr/icaxisgroup_attr.cpp @ 609

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

Improve CF compliance: add a new axis attribute "bounds".

Fixes ticket #67.

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