source: XIOS/branchs/xios-1.0/src/interface/c_attr/icaxis_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: 9.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.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::CAxis*  axis_Ptr;
18 
19  void cxios_set_axis_bounds(axis_Ptr axis_hdl, double* bounds, int extent1, int extent2)
20  {
21    CTimer::get("XIOS").resume();
22    CArray<double,2> tmp(bounds,shape(extent1,extent2),neverDeleteData) ;
23    axis_hdl->bounds.reference(tmp.copy());
24    axis_hdl->sendAttributToServer(axis_hdl->bounds);
25     CTimer::get("XIOS").suspend();
26  }
27 
28  void cxios_get_axis_bounds(axis_Ptr axis_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=axis_hdl->bounds.getInheritedValue() ;
33     CTimer::get("XIOS").suspend();
34  }
35 
36  bool cxios_is_defined_axis_bounds(axis_Ptr axis_hdl )
37  {
38    CTimer::get("XIOS").resume();
39    bool isDefined = axis_hdl->bounds.hasInheritedValue();
40    CTimer::get("XIOS").suspend();
41    return isDefined;
42  }
43 
44 
45 
46  void cxios_set_axis_long_name(axis_Ptr axis_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    axis_hdl->long_name.setValue(long_name_str);
52    axis_hdl->sendAttributToServer(axis_hdl->long_name);
53     CTimer::get("XIOS").suspend();
54  }
55 
56  void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)
57  {
58     CTimer::get("XIOS").resume();
59    if(!string_copy(axis_hdl->long_name.getInheritedValue(),long_name , long_name_size))
60      ERROR("void cxios_get_axis_long_name(axis_Ptr axis_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_axis_long_name(axis_Ptr axis_hdl )
65  {
66    CTimer::get("XIOS").resume();
67    bool isDefined = axis_hdl->long_name.hasInheritedValue();
68    CTimer::get("XIOS").suspend();
69    return isDefined;
70  }
71 
72 
73 
74  void cxios_set_axis_name(axis_Ptr axis_hdl, const char * name, int name_size)
75  {
76    std::string name_str;
77    if(!cstr2string(name, name_size, name_str)) return;
78     CTimer::get("XIOS").resume();
79    axis_hdl->name.setValue(name_str);
80    axis_hdl->sendAttributToServer(axis_hdl->name);
81     CTimer::get("XIOS").suspend();
82  }
83 
84  void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)
85  {
86     CTimer::get("XIOS").resume();
87    if(!string_copy(axis_hdl->name.getInheritedValue(),name , name_size))
88      ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", <<"Input string is to short");
89     CTimer::get("XIOS").suspend();
90  }
91 
92  bool cxios_is_defined_axis_name(axis_Ptr axis_hdl )
93  {
94    CTimer::get("XIOS").resume();
95    bool isDefined = axis_hdl->name.hasInheritedValue();
96    CTimer::get("XIOS").suspend();
97    return isDefined;
98  }
99 
100 
101 
102  void cxios_set_axis_positive(axis_Ptr axis_hdl, const char * positive, int positive_size)
103  {
104    std::string positive_str;
105    if(!cstr2string(positive, positive_size, positive_str)) return;
106     CTimer::get("XIOS").resume();
107    axis_hdl->positive.fromString(positive_str);
108    axis_hdl->sendAttributToServer(axis_hdl->positive);
109     CTimer::get("XIOS").suspend();
110  }
111 
112  void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)
113  {
114     CTimer::get("XIOS").resume();
115    if(!string_copy(axis_hdl->positive.getInheritedStringValue(),positive , positive_size))
116      ERROR("void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)", <<"Input string is to short");
117     CTimer::get("XIOS").suspend();
118  }
119 
120  bool cxios_is_defined_axis_positive(axis_Ptr axis_hdl )
121  {
122    CTimer::get("XIOS").resume();
123    bool isDefined = axis_hdl->positive.hasInheritedValue();
124    CTimer::get("XIOS").suspend();
125    return isDefined;
126  }
127 
128 
129 
130  void cxios_set_axis_size(axis_Ptr axis_hdl, int size)
131  {
132     CTimer::get("XIOS").resume();
133    axis_hdl->size.setValue(size);
134    axis_hdl->sendAttributToServer(axis_hdl->size);
135     CTimer::get("XIOS").suspend();
136  }
137 
138  void cxios_get_axis_size(axis_Ptr axis_hdl, int* size)
139  {
140    *size = axis_hdl->size.getInheritedValue();
141  }
142 
143  bool cxios_is_defined_axis_size(axis_Ptr axis_hdl )
144  {
145    CTimer::get("XIOS").resume();
146    bool isDefined = axis_hdl->size.hasInheritedValue();
147    CTimer::get("XIOS").suspend();
148    return isDefined;
149  }
150 
151 
152 
153  void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size)
154  {
155    std::string standard_name_str;
156    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
157     CTimer::get("XIOS").resume();
158    axis_hdl->standard_name.setValue(standard_name_str);
159    axis_hdl->sendAttributToServer(axis_hdl->standard_name);
160     CTimer::get("XIOS").suspend();
161  }
162 
163  void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)
164  {
165     CTimer::get("XIOS").resume();
166    if(!string_copy(axis_hdl->standard_name.getInheritedValue(),standard_name , standard_name_size))
167      ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short");
168     CTimer::get("XIOS").suspend();
169  }
170 
171  bool cxios_is_defined_axis_standard_name(axis_Ptr axis_hdl )
172  {
173    CTimer::get("XIOS").resume();
174    bool isDefined = axis_hdl->standard_name.hasInheritedValue();
175    CTimer::get("XIOS").suspend();
176    return isDefined;
177  }
178 
179 
180 
181  void cxios_set_axis_unit(axis_Ptr axis_hdl, const char * unit, int unit_size)
182  {
183    std::string unit_str;
184    if(!cstr2string(unit, unit_size, unit_str)) return;
185     CTimer::get("XIOS").resume();
186    axis_hdl->unit.setValue(unit_str);
187    axis_hdl->sendAttributToServer(axis_hdl->unit);
188     CTimer::get("XIOS").suspend();
189  }
190 
191  void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)
192  {
193     CTimer::get("XIOS").resume();
194    if(!string_copy(axis_hdl->unit.getInheritedValue(),unit , unit_size))
195      ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", <<"Input string is to short");
196     CTimer::get("XIOS").suspend();
197  }
198 
199  bool cxios_is_defined_axis_unit(axis_Ptr axis_hdl )
200  {
201    CTimer::get("XIOS").resume();
202    bool isDefined = axis_hdl->unit.hasInheritedValue();
203    CTimer::get("XIOS").suspend();
204    return isDefined;
205  }
206 
207 
208 
209  void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1)
210  {
211    CTimer::get("XIOS").resume();
212    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
213    axis_hdl->value.reference(tmp.copy());
214    axis_hdl->sendAttributToServer(axis_hdl->value);
215     CTimer::get("XIOS").suspend();
216  }
217 
218  void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int extent1)
219  {
220    CTimer::get("XIOS").resume();
221    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
222    tmp=axis_hdl->value.getInheritedValue() ;
223     CTimer::get("XIOS").suspend();
224  }
225 
226  bool cxios_is_defined_axis_value(axis_Ptr axis_hdl )
227  {
228    CTimer::get("XIOS").resume();
229    bool isDefined = axis_hdl->value.hasInheritedValue();
230    CTimer::get("XIOS").suspend();
231    return isDefined;
232  }
233 
234 
235 
236  void cxios_set_axis_zoom_begin(axis_Ptr axis_hdl, int zoom_begin)
237  {
238     CTimer::get("XIOS").resume();
239    axis_hdl->zoom_begin.setValue(zoom_begin);
240    axis_hdl->sendAttributToServer(axis_hdl->zoom_begin);
241     CTimer::get("XIOS").suspend();
242  }
243 
244  void cxios_get_axis_zoom_begin(axis_Ptr axis_hdl, int* zoom_begin)
245  {
246    *zoom_begin = axis_hdl->zoom_begin.getInheritedValue();
247  }
248 
249  bool cxios_is_defined_axis_zoom_begin(axis_Ptr axis_hdl )
250  {
251    CTimer::get("XIOS").resume();
252    bool isDefined = axis_hdl->zoom_begin.hasInheritedValue();
253    CTimer::get("XIOS").suspend();
254    return isDefined;
255  }
256 
257 
258 
259  void cxios_set_axis_zoom_end(axis_Ptr axis_hdl, int zoom_end)
260  {
261     CTimer::get("XIOS").resume();
262    axis_hdl->zoom_end.setValue(zoom_end);
263    axis_hdl->sendAttributToServer(axis_hdl->zoom_end);
264     CTimer::get("XIOS").suspend();
265  }
266 
267  void cxios_get_axis_zoom_end(axis_Ptr axis_hdl, int* zoom_end)
268  {
269    *zoom_end = axis_hdl->zoom_end.getInheritedValue();
270  }
271 
272  bool cxios_is_defined_axis_zoom_end(axis_Ptr axis_hdl )
273  {
274    CTimer::get("XIOS").resume();
275    bool isDefined = axis_hdl->zoom_end.hasInheritedValue();
276    CTimer::get("XIOS").suspend();
277    return isDefined;
278  }
279 
280 
281 
282  void cxios_set_axis_zoom_size(axis_Ptr axis_hdl, int zoom_size)
283  {
284     CTimer::get("XIOS").resume();
285    axis_hdl->zoom_size.setValue(zoom_size);
286    axis_hdl->sendAttributToServer(axis_hdl->zoom_size);
287     CTimer::get("XIOS").suspend();
288  }
289 
290  void cxios_get_axis_zoom_size(axis_Ptr axis_hdl, int* zoom_size)
291  {
292    *zoom_size = axis_hdl->zoom_size.getInheritedValue();
293  }
294 
295  bool cxios_is_defined_axis_zoom_size(axis_Ptr axis_hdl )
296  {
297    CTimer::get("XIOS").resume();
298    bool isDefined = axis_hdl->zoom_size.hasInheritedValue();
299    CTimer::get("XIOS").suspend();
300    return isDefined;
301  }
302 
303 
304 
305 
306}
Note: See TracBrowser for help on using the repository browser.