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

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

Update the Fortran API.

It had been forgotten in recent changes.

  • 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: 14.5 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_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size)
192  {
193    std::string long_name_str;
194    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
195    CTimer::get("XIOS").resume();
196    axisgroup_hdl->long_name.setValue(long_name_str);
197    CTimer::get("XIOS").suspend();
198  }
199
200  void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)
201  {
202    CTimer::get("XIOS").resume();
203    if (!string_copy(axisgroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
204      ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
205    CTimer::get("XIOS").suspend();
206  }
207
208  bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl)
209  {
210     CTimer::get("XIOS").resume();
211     bool isDefined = axisgroup_hdl->long_name.hasInheritedValue();
212     CTimer::get("XIOS").suspend();
213     return isDefined;
214  }
215
216
217  void cxios_set_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
218  {
219    CTimer::get("XIOS").resume();
220    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
221    axisgroup_hdl->mask.reference(tmp.copy());
222     CTimer::get("XIOS").suspend();
223  }
224
225  void cxios_get_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
226  {
227    CTimer::get("XIOS").resume();
228    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
229    tmp=axisgroup_hdl->mask.getInheritedValue();
230     CTimer::get("XIOS").suspend();
231  }
232
233  bool cxios_is_defined_axisgroup_mask(axisgroup_Ptr axisgroup_hdl)
234  {
235     CTimer::get("XIOS").resume();
236     bool isDefined = axisgroup_hdl->mask.hasInheritedValue();
237     CTimer::get("XIOS").suspend();
238     return isDefined;
239  }
240
241
242  void cxios_set_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int n)
243  {
244    CTimer::get("XIOS").resume();
245    axisgroup_hdl->n.setValue(n);
246    CTimer::get("XIOS").suspend();
247  }
248
249  void cxios_get_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int* n)
250  {
251    CTimer::get("XIOS").resume();
252    *n = axisgroup_hdl->n.getInheritedValue();
253    CTimer::get("XIOS").suspend();
254  }
255
256  bool cxios_is_defined_axisgroup_n(axisgroup_Ptr axisgroup_hdl)
257  {
258     CTimer::get("XIOS").resume();
259     bool isDefined = axisgroup_hdl->n.hasInheritedValue();
260     CTimer::get("XIOS").suspend();
261     return isDefined;
262  }
263
264
265  void cxios_set_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int n_distributed_partition)
266  {
267    CTimer::get("XIOS").resume();
268    axisgroup_hdl->n_distributed_partition.setValue(n_distributed_partition);
269    CTimer::get("XIOS").suspend();
270  }
271
272  void cxios_get_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int* n_distributed_partition)
273  {
274    CTimer::get("XIOS").resume();
275    *n_distributed_partition = axisgroup_hdl->n_distributed_partition.getInheritedValue();
276    CTimer::get("XIOS").suspend();
277  }
278
279  bool cxios_is_defined_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl)
280  {
281     CTimer::get("XIOS").resume();
282     bool isDefined = axisgroup_hdl->n_distributed_partition.hasInheritedValue();
283     CTimer::get("XIOS").suspend();
284     return isDefined;
285  }
286
287
288  void cxios_set_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int n_glo)
289  {
290    CTimer::get("XIOS").resume();
291    axisgroup_hdl->n_glo.setValue(n_glo);
292    CTimer::get("XIOS").suspend();
293  }
294
295  void cxios_get_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int* n_glo)
296  {
297    CTimer::get("XIOS").resume();
298    *n_glo = axisgroup_hdl->n_glo.getInheritedValue();
299    CTimer::get("XIOS").suspend();
300  }
301
302  bool cxios_is_defined_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl)
303  {
304     CTimer::get("XIOS").resume();
305     bool isDefined = axisgroup_hdl->n_glo.hasInheritedValue();
306     CTimer::get("XIOS").suspend();
307     return isDefined;
308  }
309
310
311  void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size)
312  {
313    std::string name_str;
314    if (!cstr2string(name, name_size, name_str)) return;
315    CTimer::get("XIOS").resume();
316    axisgroup_hdl->name.setValue(name_str);
317    CTimer::get("XIOS").suspend();
318  }
319
320  void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)
321  {
322    CTimer::get("XIOS").resume();
323    if (!string_copy(axisgroup_hdl->name.getInheritedValue(), name, name_size))
324      ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", << "Input string is too short");
325    CTimer::get("XIOS").suspend();
326  }
327
328  bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl)
329  {
330     CTimer::get("XIOS").resume();
331     bool isDefined = axisgroup_hdl->name.hasInheritedValue();
332     CTimer::get("XIOS").suspend();
333     return isDefined;
334  }
335
336
337  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size)
338  {
339    std::string positive_str;
340    if (!cstr2string(positive, positive_size, positive_str)) return;
341    CTimer::get("XIOS").resume();
342    axisgroup_hdl->positive.fromString(positive_str);
343    CTimer::get("XIOS").suspend();
344  }
345
346  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)
347  {
348    CTimer::get("XIOS").resume();
349    if (!string_copy(axisgroup_hdl->positive.getInheritedStringValue(), positive, positive_size))
350      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", << "Input string is too short");
351    CTimer::get("XIOS").suspend();
352  }
353
354  bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl)
355  {
356     CTimer::get("XIOS").resume();
357     bool isDefined = axisgroup_hdl->positive.hasInheritedValue();
358     CTimer::get("XIOS").suspend();
359     return isDefined;
360  }
361
362
363  void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size)
364  {
365    std::string standard_name_str;
366    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
367    CTimer::get("XIOS").resume();
368    axisgroup_hdl->standard_name.setValue(standard_name_str);
369    CTimer::get("XIOS").suspend();
370  }
371
372  void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)
373  {
374    CTimer::get("XIOS").resume();
375    if (!string_copy(axisgroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
376      ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
377    CTimer::get("XIOS").suspend();
378  }
379
380  bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl)
381  {
382     CTimer::get("XIOS").resume();
383     bool isDefined = axisgroup_hdl->standard_name.hasInheritedValue();
384     CTimer::get("XIOS").suspend();
385     return isDefined;
386  }
387
388
389  void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size)
390  {
391    std::string unit_str;
392    if (!cstr2string(unit, unit_size, unit_str)) return;
393    CTimer::get("XIOS").resume();
394    axisgroup_hdl->unit.setValue(unit_str);
395    CTimer::get("XIOS").suspend();
396  }
397
398  void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)
399  {
400    CTimer::get("XIOS").resume();
401    if (!string_copy(axisgroup_hdl->unit.getInheritedValue(), unit, unit_size))
402      ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", << "Input string is too short");
403    CTimer::get("XIOS").suspend();
404  }
405
406  bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl)
407  {
408     CTimer::get("XIOS").resume();
409     bool isDefined = axisgroup_hdl->unit.hasInheritedValue();
410     CTimer::get("XIOS").suspend();
411     return isDefined;
412  }
413
414
415  void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
416  {
417    CTimer::get("XIOS").resume();
418    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
419    axisgroup_hdl->value.reference(tmp.copy());
420     CTimer::get("XIOS").suspend();
421  }
422
423  void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
424  {
425    CTimer::get("XIOS").resume();
426    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
427    tmp=axisgroup_hdl->value.getInheritedValue();
428     CTimer::get("XIOS").suspend();
429  }
430
431  bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl)
432  {
433     CTimer::get("XIOS").resume();
434     bool isDefined = axisgroup_hdl->value.hasInheritedValue();
435     CTimer::get("XIOS").suspend();
436     return isDefined;
437  }
438}
Note: See TracBrowser for help on using the repository browser.