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

Last change on this file since 934 was 817, checked in by mhnguyen, 8 years ago

Adding some attributes for axis and grid (ticket 71, 78)

+) Add index attribute for axis
+) Change mask?d to mask_?d for grid

Test
+) On Curie
+) Test passes

  • 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: 15.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 "xios.hpp"
8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "icutil.hpp"
12#include "icdate.hpp"
13#include "timer.hpp"
14#include "node_type.hpp"
15
16extern "C"
17{
18  typedef xios::CAxisGroup* axisgroup_Ptr;
19
20  void cxios_set_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, const char * axis_ref, int axis_ref_size)
21  {
22    std::string axis_ref_str;
23    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
24    CTimer::get("XIOS").resume();
25    axisgroup_hdl->axis_ref.setValue(axis_ref_str);
26    CTimer::get("XIOS").suspend();
27  }
28
29  void cxios_get_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, char * axis_ref, int axis_ref_size)
30  {
31    CTimer::get("XIOS").resume();
32    if (!string_copy(axisgroup_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
33      ERROR("void cxios_get_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, char * axis_ref, int axis_ref_size)", << "Input string is too short");
34    CTimer::get("XIOS").suspend();
35  }
36
37  bool cxios_is_defined_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl)
38  {
39     CTimer::get("XIOS").resume();
40     bool isDefined = axisgroup_hdl->axis_ref.hasInheritedValue();
41     CTimer::get("XIOS").suspend();
42     return isDefined;
43  }
44
45
46  void cxios_set_axisgroup_begin(axisgroup_Ptr axisgroup_hdl, int begin)
47  {
48    CTimer::get("XIOS").resume();
49    axisgroup_hdl->begin.setValue(begin);
50    CTimer::get("XIOS").suspend();
51  }
52
53  void cxios_get_axisgroup_begin(axisgroup_Ptr axisgroup_hdl, int* begin)
54  {
55    CTimer::get("XIOS").resume();
56    *begin = axisgroup_hdl->begin.getInheritedValue();
57    CTimer::get("XIOS").suspend();
58  }
59
60  bool cxios_is_defined_axisgroup_begin(axisgroup_Ptr axisgroup_hdl)
61  {
62     CTimer::get("XIOS").resume();
63     bool isDefined = axisgroup_hdl->begin.hasInheritedValue();
64     CTimer::get("XIOS").suspend();
65     return isDefined;
66  }
67
68
69  void cxios_set_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
70  {
71    CTimer::get("XIOS").resume();
72    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
73    axisgroup_hdl->bounds.reference(tmp.copy());
74     CTimer::get("XIOS").suspend();
75  }
76
77  void cxios_get_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
78  {
79    CTimer::get("XIOS").resume();
80    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
81    tmp=axisgroup_hdl->bounds.getInheritedValue();
82     CTimer::get("XIOS").suspend();
83  }
84
85  bool cxios_is_defined_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl)
86  {
87     CTimer::get("XIOS").resume();
88     bool isDefined = axisgroup_hdl->bounds.hasInheritedValue();
89     CTimer::get("XIOS").suspend();
90     return isDefined;
91  }
92
93
94  void cxios_set_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int data_begin)
95  {
96    CTimer::get("XIOS").resume();
97    axisgroup_hdl->data_begin.setValue(data_begin);
98    CTimer::get("XIOS").suspend();
99  }
100
101  void cxios_get_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int* data_begin)
102  {
103    CTimer::get("XIOS").resume();
104    *data_begin = axisgroup_hdl->data_begin.getInheritedValue();
105    CTimer::get("XIOS").suspend();
106  }
107
108  bool cxios_is_defined_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl)
109  {
110     CTimer::get("XIOS").resume();
111     bool isDefined = axisgroup_hdl->data_begin.hasInheritedValue();
112     CTimer::get("XIOS").suspend();
113     return isDefined;
114  }
115
116
117  void cxios_set_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
118  {
119    CTimer::get("XIOS").resume();
120    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
121    axisgroup_hdl->data_index.reference(tmp.copy());
122     CTimer::get("XIOS").suspend();
123  }
124
125  void cxios_get_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
126  {
127    CTimer::get("XIOS").resume();
128    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
129    tmp=axisgroup_hdl->data_index.getInheritedValue();
130     CTimer::get("XIOS").suspend();
131  }
132
133  bool cxios_is_defined_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl)
134  {
135     CTimer::get("XIOS").resume();
136     bool isDefined = axisgroup_hdl->data_index.hasInheritedValue();
137     CTimer::get("XIOS").suspend();
138     return isDefined;
139  }
140
141
142  void cxios_set_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int data_n)
143  {
144    CTimer::get("XIOS").resume();
145    axisgroup_hdl->data_n.setValue(data_n);
146    CTimer::get("XIOS").suspend();
147  }
148
149  void cxios_get_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int* data_n)
150  {
151    CTimer::get("XIOS").resume();
152    *data_n = axisgroup_hdl->data_n.getInheritedValue();
153    CTimer::get("XIOS").suspend();
154  }
155
156  bool cxios_is_defined_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl)
157  {
158     CTimer::get("XIOS").resume();
159     bool isDefined = axisgroup_hdl->data_n.hasInheritedValue();
160     CTimer::get("XIOS").suspend();
161     return isDefined;
162  }
163
164
165  void cxios_set_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, const char * group_ref, int group_ref_size)
166  {
167    std::string group_ref_str;
168    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
169    CTimer::get("XIOS").resume();
170    axisgroup_hdl->group_ref.setValue(group_ref_str);
171    CTimer::get("XIOS").suspend();
172  }
173
174  void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)
175  {
176    CTimer::get("XIOS").resume();
177    if (!string_copy(axisgroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
178      ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
179    CTimer::get("XIOS").suspend();
180  }
181
182  bool cxios_is_defined_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl)
183  {
184     CTimer::get("XIOS").resume();
185     bool isDefined = axisgroup_hdl->group_ref.hasInheritedValue();
186     CTimer::get("XIOS").suspend();
187     return isDefined;
188  }
189
190
191  void cxios_set_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent)
192  {
193    CTimer::get("XIOS").resume();
194    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
195    axisgroup_hdl->index.reference(tmp.copy());
196     CTimer::get("XIOS").suspend();
197  }
198
199  void cxios_get_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent)
200  {
201    CTimer::get("XIOS").resume();
202    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
203    tmp=axisgroup_hdl->index.getInheritedValue();
204     CTimer::get("XIOS").suspend();
205  }
206
207  bool cxios_is_defined_axisgroup_index(axisgroup_Ptr axisgroup_hdl)
208  {
209     CTimer::get("XIOS").resume();
210     bool isDefined = axisgroup_hdl->index.hasInheritedValue();
211     CTimer::get("XIOS").suspend();
212     return isDefined;
213  }
214
215
216  void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size)
217  {
218    std::string long_name_str;
219    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
220    CTimer::get("XIOS").resume();
221    axisgroup_hdl->long_name.setValue(long_name_str);
222    CTimer::get("XIOS").suspend();
223  }
224
225  void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)
226  {
227    CTimer::get("XIOS").resume();
228    if (!string_copy(axisgroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
229      ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
230    CTimer::get("XIOS").suspend();
231  }
232
233  bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl)
234  {
235     CTimer::get("XIOS").resume();
236     bool isDefined = axisgroup_hdl->long_name.hasInheritedValue();
237     CTimer::get("XIOS").suspend();
238     return isDefined;
239  }
240
241
242  void cxios_set_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
243  {
244    CTimer::get("XIOS").resume();
245    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
246    axisgroup_hdl->mask.reference(tmp.copy());
247     CTimer::get("XIOS").suspend();
248  }
249
250  void cxios_get_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
251  {
252    CTimer::get("XIOS").resume();
253    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
254    tmp=axisgroup_hdl->mask.getInheritedValue();
255     CTimer::get("XIOS").suspend();
256  }
257
258  bool cxios_is_defined_axisgroup_mask(axisgroup_Ptr axisgroup_hdl)
259  {
260     CTimer::get("XIOS").resume();
261     bool isDefined = axisgroup_hdl->mask.hasInheritedValue();
262     CTimer::get("XIOS").suspend();
263     return isDefined;
264  }
265
266
267  void cxios_set_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int n)
268  {
269    CTimer::get("XIOS").resume();
270    axisgroup_hdl->n.setValue(n);
271    CTimer::get("XIOS").suspend();
272  }
273
274  void cxios_get_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int* n)
275  {
276    CTimer::get("XIOS").resume();
277    *n = axisgroup_hdl->n.getInheritedValue();
278    CTimer::get("XIOS").suspend();
279  }
280
281  bool cxios_is_defined_axisgroup_n(axisgroup_Ptr axisgroup_hdl)
282  {
283     CTimer::get("XIOS").resume();
284     bool isDefined = axisgroup_hdl->n.hasInheritedValue();
285     CTimer::get("XIOS").suspend();
286     return isDefined;
287  }
288
289
290  void cxios_set_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int n_distributed_partition)
291  {
292    CTimer::get("XIOS").resume();
293    axisgroup_hdl->n_distributed_partition.setValue(n_distributed_partition);
294    CTimer::get("XIOS").suspend();
295  }
296
297  void cxios_get_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int* n_distributed_partition)
298  {
299    CTimer::get("XIOS").resume();
300    *n_distributed_partition = axisgroup_hdl->n_distributed_partition.getInheritedValue();
301    CTimer::get("XIOS").suspend();
302  }
303
304  bool cxios_is_defined_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl)
305  {
306     CTimer::get("XIOS").resume();
307     bool isDefined = axisgroup_hdl->n_distributed_partition.hasInheritedValue();
308     CTimer::get("XIOS").suspend();
309     return isDefined;
310  }
311
312
313  void cxios_set_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int n_glo)
314  {
315    CTimer::get("XIOS").resume();
316    axisgroup_hdl->n_glo.setValue(n_glo);
317    CTimer::get("XIOS").suspend();
318  }
319
320  void cxios_get_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int* n_glo)
321  {
322    CTimer::get("XIOS").resume();
323    *n_glo = axisgroup_hdl->n_glo.getInheritedValue();
324    CTimer::get("XIOS").suspend();
325  }
326
327  bool cxios_is_defined_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl)
328  {
329     CTimer::get("XIOS").resume();
330     bool isDefined = axisgroup_hdl->n_glo.hasInheritedValue();
331     CTimer::get("XIOS").suspend();
332     return isDefined;
333  }
334
335
336  void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size)
337  {
338    std::string name_str;
339    if (!cstr2string(name, name_size, name_str)) return;
340    CTimer::get("XIOS").resume();
341    axisgroup_hdl->name.setValue(name_str);
342    CTimer::get("XIOS").suspend();
343  }
344
345  void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)
346  {
347    CTimer::get("XIOS").resume();
348    if (!string_copy(axisgroup_hdl->name.getInheritedValue(), name, name_size))
349      ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", << "Input string is too short");
350    CTimer::get("XIOS").suspend();
351  }
352
353  bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl)
354  {
355     CTimer::get("XIOS").resume();
356     bool isDefined = axisgroup_hdl->name.hasInheritedValue();
357     CTimer::get("XIOS").suspend();
358     return isDefined;
359  }
360
361
362  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size)
363  {
364    std::string positive_str;
365    if (!cstr2string(positive, positive_size, positive_str)) return;
366    CTimer::get("XIOS").resume();
367    axisgroup_hdl->positive.fromString(positive_str);
368    CTimer::get("XIOS").suspend();
369  }
370
371  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)
372  {
373    CTimer::get("XIOS").resume();
374    if (!string_copy(axisgroup_hdl->positive.getInheritedStringValue(), positive, positive_size))
375      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", << "Input string is too short");
376    CTimer::get("XIOS").suspend();
377  }
378
379  bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl)
380  {
381     CTimer::get("XIOS").resume();
382     bool isDefined = axisgroup_hdl->positive.hasInheritedValue();
383     CTimer::get("XIOS").suspend();
384     return isDefined;
385  }
386
387
388  void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size)
389  {
390    std::string standard_name_str;
391    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
392    CTimer::get("XIOS").resume();
393    axisgroup_hdl->standard_name.setValue(standard_name_str);
394    CTimer::get("XIOS").suspend();
395  }
396
397  void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)
398  {
399    CTimer::get("XIOS").resume();
400    if (!string_copy(axisgroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
401      ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
402    CTimer::get("XIOS").suspend();
403  }
404
405  bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl)
406  {
407     CTimer::get("XIOS").resume();
408     bool isDefined = axisgroup_hdl->standard_name.hasInheritedValue();
409     CTimer::get("XIOS").suspend();
410     return isDefined;
411  }
412
413
414  void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size)
415  {
416    std::string unit_str;
417    if (!cstr2string(unit, unit_size, unit_str)) return;
418    CTimer::get("XIOS").resume();
419    axisgroup_hdl->unit.setValue(unit_str);
420    CTimer::get("XIOS").suspend();
421  }
422
423  void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)
424  {
425    CTimer::get("XIOS").resume();
426    if (!string_copy(axisgroup_hdl->unit.getInheritedValue(), unit, unit_size))
427      ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", << "Input string is too short");
428    CTimer::get("XIOS").suspend();
429  }
430
431  bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl)
432  {
433     CTimer::get("XIOS").resume();
434     bool isDefined = axisgroup_hdl->unit.hasInheritedValue();
435     CTimer::get("XIOS").suspend();
436     return isDefined;
437  }
438
439
440  void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
441  {
442    CTimer::get("XIOS").resume();
443    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
444    axisgroup_hdl->value.reference(tmp.copy());
445     CTimer::get("XIOS").suspend();
446  }
447
448  void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
449  {
450    CTimer::get("XIOS").resume();
451    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
452    tmp=axisgroup_hdl->value.getInheritedValue();
453     CTimer::get("XIOS").suspend();
454  }
455
456  bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl)
457  {
458     CTimer::get("XIOS").resume();
459     bool isDefined = axisgroup_hdl->value.hasInheritedValue();
460     CTimer::get("XIOS").suspend();
461     return isDefined;
462  }
463}
Note: See TracBrowser for help on using the repository browser.