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

Last change on this file since 1941 was 1626, checked in by oabramkina, 6 years ago

Trunk: limiting the line length to 132 characters in the Fortran interface + updating the interface.

  • 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: 25.2 KB
RevLine 
[325]1/* ************************************************************************** *
[581]2 *               Interface auto generated - do not modify                     *
[325]3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
[591]6#include "xios.hpp"
[352]7#include "attribute_template.hpp"
8#include "object_template.hpp"
9#include "group_template.hpp"
[325]10#include "icutil.hpp"
[532]11#include "icdate.hpp"
[347]12#include "timer.hpp"
[369]13#include "node_type.hpp"
[325]14
15extern "C"
16{
[581]17  typedef xios::CAxisGroup* axisgroup_Ptr;
18
[546]19  void cxios_set_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, const char * axis_ref, int axis_ref_size)
20  {
21    std::string axis_ref_str;
[581]22    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
23    CTimer::get("XIOS").resume();
[546]24    axisgroup_hdl->axis_ref.setValue(axis_ref_str);
[581]25    CTimer::get("XIOS").suspend();
[546]26  }
[581]27
[546]28  void cxios_get_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, char * axis_ref, int axis_ref_size)
29  {
[581]30    CTimer::get("XIOS").resume();
31    if (!string_copy(axisgroup_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
32      ERROR("void cxios_get_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, char * axis_ref, int axis_ref_size)", << "Input string is too short");
33    CTimer::get("XIOS").suspend();
[546]34  }
[581]35
36  bool cxios_is_defined_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl)
[546]37  {
38     CTimer::get("XIOS").resume();
[581]39     bool isDefined = axisgroup_hdl->axis_ref.hasInheritedValue();
[546]40     CTimer::get("XIOS").suspend();
[581]41     return isDefined;
[546]42  }
[581]43
44
[1492]45  void cxios_set_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, const char * axis_type, int axis_type_size)
46  {
47    std::string axis_type_str;
48    if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return;
49    CTimer::get("XIOS").resume();
50    axisgroup_hdl->axis_type.fromString(axis_type_str);
51    CTimer::get("XIOS").suspend();
52  }
53
54  void cxios_get_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, char * axis_type, int axis_type_size)
55  {
56    CTimer::get("XIOS").resume();
57    if (!string_copy(axisgroup_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
58      ERROR("void cxios_get_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl, char * axis_type, int axis_type_size)", << "Input string is too short");
59    CTimer::get("XIOS").suspend();
60  }
61
62  bool cxios_is_defined_axisgroup_axis_type(axisgroup_Ptr axisgroup_hdl)
63  {
64     CTimer::get("XIOS").resume();
65     bool isDefined = axisgroup_hdl->axis_type.hasInheritedValue();
66     CTimer::get("XIOS").suspend();
67     return isDefined;
68  }
69
70
[666]71  void cxios_set_axisgroup_begin(axisgroup_Ptr axisgroup_hdl, int begin)
72  {
73    CTimer::get("XIOS").resume();
74    axisgroup_hdl->begin.setValue(begin);
75    CTimer::get("XIOS").suspend();
76  }
77
78  void cxios_get_axisgroup_begin(axisgroup_Ptr axisgroup_hdl, int* begin)
79  {
80    CTimer::get("XIOS").resume();
81    *begin = axisgroup_hdl->begin.getInheritedValue();
82    CTimer::get("XIOS").suspend();
83  }
84
85  bool cxios_is_defined_axisgroup_begin(axisgroup_Ptr axisgroup_hdl)
86  {
87     CTimer::get("XIOS").resume();
88     bool isDefined = axisgroup_hdl->begin.hasInheritedValue();
89     CTimer::get("XIOS").suspend();
90     return isDefined;
91  }
92
93
[674]94  void cxios_set_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
[609]95  {
96    CTimer::get("XIOS").resume();
[674]97    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
[609]98    axisgroup_hdl->bounds.reference(tmp.copy());
99     CTimer::get("XIOS").suspend();
100  }
101
[674]102  void cxios_get_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
[609]103  {
104    CTimer::get("XIOS").resume();
[674]105    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
[609]106    tmp=axisgroup_hdl->bounds.getInheritedValue();
107     CTimer::get("XIOS").suspend();
108  }
109
110  bool cxios_is_defined_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl)
111  {
112     CTimer::get("XIOS").resume();
113     bool isDefined = axisgroup_hdl->bounds.hasInheritedValue();
114     CTimer::get("XIOS").suspend();
115     return isDefined;
116  }
117
118
[1492]119  void cxios_set_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, const char * bounds_name, int bounds_name_size)
120  {
121    std::string bounds_name_str;
122    if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return;
123    CTimer::get("XIOS").resume();
124    axisgroup_hdl->bounds_name.setValue(bounds_name_str);
125    CTimer::get("XIOS").suspend();
126  }
127
128  void cxios_get_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, char * bounds_name, int bounds_name_size)
129  {
130    CTimer::get("XIOS").resume();
131    if (!string_copy(axisgroup_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
132      ERROR("void cxios_get_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short");
133    CTimer::get("XIOS").suspend();
134  }
135
136  bool cxios_is_defined_axisgroup_bounds_name(axisgroup_Ptr axisgroup_hdl)
137  {
138     CTimer::get("XIOS").resume();
139     bool isDefined = axisgroup_hdl->bounds_name.hasInheritedValue();
140     CTimer::get("XIOS").suspend();
141     return isDefined;
142  }
143
144
145  void cxios_set_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, const char * comment, int comment_size)
146  {
147    std::string comment_str;
148    if (!cstr2string(comment, comment_size, comment_str)) return;
149    CTimer::get("XIOS").resume();
150    axisgroup_hdl->comment.setValue(comment_str);
151    CTimer::get("XIOS").suspend();
152  }
153
154  void cxios_get_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, char * comment, int comment_size)
155  {
156    CTimer::get("XIOS").resume();
157    if (!string_copy(axisgroup_hdl->comment.getInheritedValue(), comment, comment_size))
158      ERROR("void cxios_get_axisgroup_comment(axisgroup_Ptr axisgroup_hdl, char * comment, int comment_size)", << "Input string is too short");
159    CTimer::get("XIOS").suspend();
160  }
161
162  bool cxios_is_defined_axisgroup_comment(axisgroup_Ptr axisgroup_hdl)
163  {
164     CTimer::get("XIOS").resume();
165     bool isDefined = axisgroup_hdl->comment.hasInheritedValue();
166     CTimer::get("XIOS").suspend();
167     return isDefined;
168  }
169
170
[555]171  void cxios_set_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int data_begin)
172  {
[581]173    CTimer::get("XIOS").resume();
[555]174    axisgroup_hdl->data_begin.setValue(data_begin);
[581]175    CTimer::get("XIOS").suspend();
[555]176  }
[581]177
[555]178  void cxios_get_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int* data_begin)
179  {
[581]180    CTimer::get("XIOS").resume();
[555]181    *data_begin = axisgroup_hdl->data_begin.getInheritedValue();
[581]182    CTimer::get("XIOS").suspend();
[555]183  }
[581]184
185  bool cxios_is_defined_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl)
[555]186  {
187     CTimer::get("XIOS").resume();
[581]188     bool isDefined = axisgroup_hdl->data_begin.hasInheritedValue();
[555]189     CTimer::get("XIOS").suspend();
[581]190     return isDefined;
[555]191  }
[581]192
193
[674]194  void cxios_set_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
[555]195  {
196    CTimer::get("XIOS").resume();
[674]197    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
[555]198    axisgroup_hdl->data_index.reference(tmp.copy());
199     CTimer::get("XIOS").suspend();
200  }
[581]201
[674]202  void cxios_get_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
[555]203  {
204    CTimer::get("XIOS").resume();
[674]205    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
[581]206    tmp=axisgroup_hdl->data_index.getInheritedValue();
[555]207     CTimer::get("XIOS").suspend();
208  }
[581]209
210  bool cxios_is_defined_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl)
[555]211  {
212     CTimer::get("XIOS").resume();
[581]213     bool isDefined = axisgroup_hdl->data_index.hasInheritedValue();
[555]214     CTimer::get("XIOS").suspend();
[581]215     return isDefined;
[555]216  }
[581]217
218
[555]219  void cxios_set_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int data_n)
220  {
[581]221    CTimer::get("XIOS").resume();
[555]222    axisgroup_hdl->data_n.setValue(data_n);
[581]223    CTimer::get("XIOS").suspend();
[555]224  }
[581]225
[555]226  void cxios_get_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int* data_n)
227  {
[581]228    CTimer::get("XIOS").resume();
[555]229    *data_n = axisgroup_hdl->data_n.getInheritedValue();
[581]230    CTimer::get("XIOS").suspend();
[555]231  }
[581]232
233  bool cxios_is_defined_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl)
[555]234  {
235     CTimer::get("XIOS").resume();
[581]236     bool isDefined = axisgroup_hdl->data_n.hasInheritedValue();
[555]237     CTimer::get("XIOS").suspend();
[581]238     return isDefined;
[555]239  }
[581]240
241
[1492]242  void cxios_set_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, const char * dim_name, int dim_name_size)
243  {
244    std::string dim_name_str;
245    if (!cstr2string(dim_name, dim_name_size, dim_name_str)) return;
246    CTimer::get("XIOS").resume();
247    axisgroup_hdl->dim_name.setValue(dim_name_str);
248    CTimer::get("XIOS").suspend();
249  }
250
251  void cxios_get_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, char * dim_name, int dim_name_size)
252  {
253    CTimer::get("XIOS").resume();
254    if (!string_copy(axisgroup_hdl->dim_name.getInheritedValue(), dim_name, dim_name_size))
255      ERROR("void cxios_get_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl, char * dim_name, int dim_name_size)", << "Input string is too short");
256    CTimer::get("XIOS").suspend();
257  }
258
259  bool cxios_is_defined_axisgroup_dim_name(axisgroup_Ptr axisgroup_hdl)
260  {
261     CTimer::get("XIOS").resume();
262     bool isDefined = axisgroup_hdl->dim_name.hasInheritedValue();
263     CTimer::get("XIOS").suspend();
264     return isDefined;
265  }
266
267
268  void cxios_set_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, const char * formula, int formula_size)
269  {
270    std::string formula_str;
271    if (!cstr2string(formula, formula_size, formula_str)) return;
272    CTimer::get("XIOS").resume();
273    axisgroup_hdl->formula.setValue(formula_str);
274    CTimer::get("XIOS").suspend();
275  }
276
277  void cxios_get_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, char * formula, int formula_size)
278  {
279    CTimer::get("XIOS").resume();
280    if (!string_copy(axisgroup_hdl->formula.getInheritedValue(), formula, formula_size))
281      ERROR("void cxios_get_axisgroup_formula(axisgroup_Ptr axisgroup_hdl, char * formula, int formula_size)", << "Input string is too short");
282    CTimer::get("XIOS").suspend();
283  }
284
285  bool cxios_is_defined_axisgroup_formula(axisgroup_Ptr axisgroup_hdl)
286  {
287     CTimer::get("XIOS").resume();
288     bool isDefined = axisgroup_hdl->formula.hasInheritedValue();
289     CTimer::get("XIOS").suspend();
290     return isDefined;
291  }
292
293
294  void cxios_set_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, const char * formula_bounds, int formula_bounds_size)
295  {
296    std::string formula_bounds_str;
297    if (!cstr2string(formula_bounds, formula_bounds_size, formula_bounds_str)) return;
298    CTimer::get("XIOS").resume();
299    axisgroup_hdl->formula_bounds.setValue(formula_bounds_str);
300    CTimer::get("XIOS").suspend();
301  }
302
303  void cxios_get_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_bounds, int formula_bounds_size)
304  {
305    CTimer::get("XIOS").resume();
306    if (!string_copy(axisgroup_hdl->formula_bounds.getInheritedValue(), formula_bounds, formula_bounds_size))
307      ERROR("void cxios_get_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_bounds, int formula_bounds_size)", << "Input string is too short");
308    CTimer::get("XIOS").suspend();
309  }
310
311  bool cxios_is_defined_axisgroup_formula_bounds(axisgroup_Ptr axisgroup_hdl)
312  {
313     CTimer::get("XIOS").resume();
314     bool isDefined = axisgroup_hdl->formula_bounds.hasInheritedValue();
315     CTimer::get("XIOS").suspend();
316     return isDefined;
317  }
318
319
320  void cxios_set_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, const char * formula_term, int formula_term_size)
321  {
322    std::string formula_term_str;
323    if (!cstr2string(formula_term, formula_term_size, formula_term_str)) return;
324    CTimer::get("XIOS").resume();
325    axisgroup_hdl->formula_term.setValue(formula_term_str);
326    CTimer::get("XIOS").suspend();
327  }
328
329  void cxios_get_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, char * formula_term, int formula_term_size)
330  {
331    CTimer::get("XIOS").resume();
332    if (!string_copy(axisgroup_hdl->formula_term.getInheritedValue(), formula_term, formula_term_size))
333      ERROR("void cxios_get_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl, char * formula_term, int formula_term_size)", << "Input string is too short");
334    CTimer::get("XIOS").suspend();
335  }
336
337  bool cxios_is_defined_axisgroup_formula_term(axisgroup_Ptr axisgroup_hdl)
338  {
339     CTimer::get("XIOS").resume();
340     bool isDefined = axisgroup_hdl->formula_term.hasInheritedValue();
341     CTimer::get("XIOS").suspend();
342     return isDefined;
343  }
344
345
346  void cxios_set_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, const char * formula_term_bounds, int formula_term_bounds_size)
347  {
348    std::string formula_term_bounds_str;
349    if (!cstr2string(formula_term_bounds, formula_term_bounds_size, formula_term_bounds_str)) return;
350    CTimer::get("XIOS").resume();
351    axisgroup_hdl->formula_term_bounds.setValue(formula_term_bounds_str);
352    CTimer::get("XIOS").suspend();
353  }
354
355  void cxios_get_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_term_bounds, int formula_term_bounds_size)
356  {
357    CTimer::get("XIOS").resume();
358    if (!string_copy(axisgroup_hdl->formula_term_bounds.getInheritedValue(), formula_term_bounds, formula_term_bounds_size))
359      ERROR("void cxios_get_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl, char * formula_term_bounds, int formula_term_bounds_size)", << "Input string is too short");
360    CTimer::get("XIOS").suspend();
361  }
362
363  bool cxios_is_defined_axisgroup_formula_term_bounds(axisgroup_Ptr axisgroup_hdl)
364  {
365     CTimer::get("XIOS").resume();
366     bool isDefined = axisgroup_hdl->formula_term_bounds.hasInheritedValue();
367     CTimer::get("XIOS").suspend();
368     return isDefined;
369  }
370
371
[325]372  void cxios_set_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, const char * group_ref, int group_ref_size)
373  {
374    std::string group_ref_str;
[581]375    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
376    CTimer::get("XIOS").resume();
[325]377    axisgroup_hdl->group_ref.setValue(group_ref_str);
[581]378    CTimer::get("XIOS").suspend();
[325]379  }
[581]380
[325]381  void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)
382  {
[581]383    CTimer::get("XIOS").resume();
384    if (!string_copy(axisgroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
385      ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
386    CTimer::get("XIOS").suspend();
[325]387  }
[581]388
389  bool cxios_is_defined_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl)
[432]390  {
391     CTimer::get("XIOS").resume();
[581]392     bool isDefined = axisgroup_hdl->group_ref.hasInheritedValue();
[432]393     CTimer::get("XIOS").suspend();
[581]394     return isDefined;
[432]395  }
[581]396
397
[817]398  void cxios_set_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent)
399  {
400    CTimer::get("XIOS").resume();
401    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
402    axisgroup_hdl->index.reference(tmp.copy());
403     CTimer::get("XIOS").suspend();
404  }
405
406  void cxios_get_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent)
407  {
408    CTimer::get("XIOS").resume();
409    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
410    tmp=axisgroup_hdl->index.getInheritedValue();
411     CTimer::get("XIOS").suspend();
412  }
413
414  bool cxios_is_defined_axisgroup_index(axisgroup_Ptr axisgroup_hdl)
415  {
416     CTimer::get("XIOS").resume();
417     bool isDefined = axisgroup_hdl->index.hasInheritedValue();
418     CTimer::get("XIOS").suspend();
419     return isDefined;
420  }
421
422
[1158]423  void cxios_set_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_len, int* str_size, int* extent)
424  {
425    CTimer::get("XIOS").resume();
426    axisgroup_hdl->label.resize(shape(extent[0]));
427    Array<StdString,1>::iterator it, itb=axisgroup_hdl->label.begin(), ite=axisgroup_hdl->label.end() ;
428    int i, n ;
429    for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ;
430    CTimer::get("XIOS").suspend();
431  }
432
433  void cxios_get_axisgroup_label(axisgroup_Ptr axisgroup_hdl, char* label, int str_size, int* extent)
434  {
435    CTimer::get("XIOS").resume();
436    Array<StdString,1>::const_iterator it, itb=axisgroup_hdl->label.getInheritedValue().begin(), ite=axisgroup_hdl->label.getInheritedValue().end() ;
437    int n ;
438    for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; 
439    CTimer::get("XIOS").suspend();
440  }
441
442  bool cxios_is_defined_axisgroup_label(axisgroup_Ptr axisgroup_hdl)
443  {
444     CTimer::get("XIOS").resume();
445     bool isDefined = axisgroup_hdl->label.hasInheritedValue();
446     CTimer::get("XIOS").suspend();
447     return isDefined;
448  }
449
450
[325]451  void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size)
452  {
453    std::string long_name_str;
[581]454    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
455    CTimer::get("XIOS").resume();
[325]456    axisgroup_hdl->long_name.setValue(long_name_str);
[581]457    CTimer::get("XIOS").suspend();
[325]458  }
[581]459
[325]460  void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)
461  {
[581]462    CTimer::get("XIOS").resume();
463    if (!string_copy(axisgroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
464      ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
465    CTimer::get("XIOS").suspend();
[325]466  }
[581]467
468  bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl)
[432]469  {
470     CTimer::get("XIOS").resume();
[581]471     bool isDefined = axisgroup_hdl->long_name.hasInheritedValue();
[432]472     CTimer::get("XIOS").suspend();
[581]473     return isDefined;
[432]474  }
[581]475
476
[674]477  void cxios_set_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
[555]478  {
479    CTimer::get("XIOS").resume();
[674]480    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
[555]481    axisgroup_hdl->mask.reference(tmp.copy());
482     CTimer::get("XIOS").suspend();
483  }
[581]484
[674]485  void cxios_get_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
[555]486  {
487    CTimer::get("XIOS").resume();
[674]488    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
[581]489    tmp=axisgroup_hdl->mask.getInheritedValue();
[555]490     CTimer::get("XIOS").suspend();
491  }
[581]492
493  bool cxios_is_defined_axisgroup_mask(axisgroup_Ptr axisgroup_hdl)
[555]494  {
495     CTimer::get("XIOS").resume();
[581]496     bool isDefined = axisgroup_hdl->mask.hasInheritedValue();
[555]497     CTimer::get("XIOS").suspend();
[581]498     return isDefined;
[555]499  }
[581]500
501
[666]502  void cxios_set_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int n)
[325]503  {
[581]504    CTimer::get("XIOS").resume();
[666]505    axisgroup_hdl->n.setValue(n);
[581]506    CTimer::get("XIOS").suspend();
[325]507  }
[581]508
[666]509  void cxios_get_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int* n)
[325]510  {
[581]511    CTimer::get("XIOS").resume();
[666]512    *n = axisgroup_hdl->n.getInheritedValue();
[581]513    CTimer::get("XIOS").suspend();
[325]514  }
[581]515
[666]516  bool cxios_is_defined_axisgroup_n(axisgroup_Ptr axisgroup_hdl)
[432]517  {
518     CTimer::get("XIOS").resume();
[666]519     bool isDefined = axisgroup_hdl->n.hasInheritedValue();
[432]520     CTimer::get("XIOS").suspend();
[581]521     return isDefined;
[432]522  }
[581]523
524
[779]525  void cxios_set_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int n_distributed_partition)
526  {
527    CTimer::get("XIOS").resume();
528    axisgroup_hdl->n_distributed_partition.setValue(n_distributed_partition);
529    CTimer::get("XIOS").suspend();
530  }
531
532  void cxios_get_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl, int* n_distributed_partition)
533  {
534    CTimer::get("XIOS").resume();
535    *n_distributed_partition = axisgroup_hdl->n_distributed_partition.getInheritedValue();
536    CTimer::get("XIOS").suspend();
537  }
538
539  bool cxios_is_defined_axisgroup_n_distributed_partition(axisgroup_Ptr axisgroup_hdl)
540  {
541     CTimer::get("XIOS").resume();
542     bool isDefined = axisgroup_hdl->n_distributed_partition.hasInheritedValue();
543     CTimer::get("XIOS").suspend();
544     return isDefined;
545  }
546
547
[666]548  void cxios_set_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int n_glo)
[555]549  {
[581]550    CTimer::get("XIOS").resume();
[666]551    axisgroup_hdl->n_glo.setValue(n_glo);
[581]552    CTimer::get("XIOS").suspend();
[555]553  }
[581]554
[666]555  void cxios_get_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int* n_glo)
[555]556  {
[581]557    CTimer::get("XIOS").resume();
[666]558    *n_glo = axisgroup_hdl->n_glo.getInheritedValue();
[581]559    CTimer::get("XIOS").suspend();
[555]560  }
[581]561
[666]562  bool cxios_is_defined_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl)
[555]563  {
564     CTimer::get("XIOS").resume();
[666]565     bool isDefined = axisgroup_hdl->n_glo.hasInheritedValue();
[555]566     CTimer::get("XIOS").suspend();
[581]567     return isDefined;
[555]568  }
[581]569
570
[666]571  void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size)
[415]572  {
[666]573    std::string name_str;
574    if (!cstr2string(name, name_size, name_str)) return;
[581]575    CTimer::get("XIOS").resume();
[666]576    axisgroup_hdl->name.setValue(name_str);
[581]577    CTimer::get("XIOS").suspend();
[415]578  }
[581]579
[666]580  void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)
[415]581  {
[581]582    CTimer::get("XIOS").resume();
[666]583    if (!string_copy(axisgroup_hdl->name.getInheritedValue(), name, name_size))
584      ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", << "Input string is too short");
[581]585    CTimer::get("XIOS").suspend();
[415]586  }
[581]587
[666]588  bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl)
[432]589  {
590     CTimer::get("XIOS").resume();
[666]591     bool isDefined = axisgroup_hdl->name.hasInheritedValue();
[432]592     CTimer::get("XIOS").suspend();
[581]593     return isDefined;
[432]594  }
[581]595
596
[666]597  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size)
[325]598  {
[666]599    std::string positive_str;
600    if (!cstr2string(positive, positive_size, positive_str)) return;
[581]601    CTimer::get("XIOS").resume();
[666]602    axisgroup_hdl->positive.fromString(positive_str);
[581]603    CTimer::get("XIOS").suspend();
[325]604  }
[581]605
[666]606  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)
[325]607  {
[581]608    CTimer::get("XIOS").resume();
[666]609    if (!string_copy(axisgroup_hdl->positive.getInheritedStringValue(), positive, positive_size))
610      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", << "Input string is too short");
[581]611    CTimer::get("XIOS").suspend();
[325]612  }
[581]613
[666]614  bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl)
[432]615  {
616     CTimer::get("XIOS").resume();
[666]617     bool isDefined = axisgroup_hdl->positive.hasInheritedValue();
[432]618     CTimer::get("XIOS").suspend();
[581]619     return isDefined;
[432]620  }
[581]621
622
[1158]623  void cxios_set_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int prec)
624  {
625    CTimer::get("XIOS").resume();
626    axisgroup_hdl->prec.setValue(prec);
627    CTimer::get("XIOS").suspend();
628  }
629
630  void cxios_get_axisgroup_prec(axisgroup_Ptr axisgroup_hdl, int* prec)
631  {
632    CTimer::get("XIOS").resume();
633    *prec = axisgroup_hdl->prec.getInheritedValue();
634    CTimer::get("XIOS").suspend();
635  }
636
637  bool cxios_is_defined_axisgroup_prec(axisgroup_Ptr axisgroup_hdl)
638  {
639     CTimer::get("XIOS").resume();
640     bool isDefined = axisgroup_hdl->prec.hasInheritedValue();
641     CTimer::get("XIOS").suspend();
642     return isDefined;
643  }
644
645
[325]646  void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size)
647  {
648    std::string standard_name_str;
[581]649    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
650    CTimer::get("XIOS").resume();
[325]651    axisgroup_hdl->standard_name.setValue(standard_name_str);
[581]652    CTimer::get("XIOS").suspend();
[325]653  }
[581]654
[325]655  void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)
656  {
[581]657    CTimer::get("XIOS").resume();
658    if (!string_copy(axisgroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
659      ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
660    CTimer::get("XIOS").suspend();
[325]661  }
[581]662
663  bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl)
[432]664  {
665     CTimer::get("XIOS").resume();
[581]666     bool isDefined = axisgroup_hdl->standard_name.hasInheritedValue();
[432]667     CTimer::get("XIOS").suspend();
[581]668     return isDefined;
[432]669  }
[581]670
671
[325]672  void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size)
673  {
674    std::string unit_str;
[581]675    if (!cstr2string(unit, unit_size, unit_str)) return;
676    CTimer::get("XIOS").resume();
[325]677    axisgroup_hdl->unit.setValue(unit_str);
[581]678    CTimer::get("XIOS").suspend();
[325]679  }
[581]680
[325]681  void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)
682  {
[581]683    CTimer::get("XIOS").resume();
684    if (!string_copy(axisgroup_hdl->unit.getInheritedValue(), unit, unit_size))
685      ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", << "Input string is too short");
686    CTimer::get("XIOS").suspend();
[325]687  }
[581]688
689  bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl)
[432]690  {
691     CTimer::get("XIOS").resume();
[581]692     bool isDefined = axisgroup_hdl->unit.hasInheritedValue();
[432]693     CTimer::get("XIOS").suspend();
[581]694     return isDefined;
[432]695  }
[581]696
697
[674]698  void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
[325]699  {
[369]700    CTimer::get("XIOS").resume();
[674]701    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
[369]702    axisgroup_hdl->value.reference(tmp.copy());
[416]703     CTimer::get("XIOS").suspend();
[325]704  }
[581]705
[674]706  void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
[325]707  {
[416]708    CTimer::get("XIOS").resume();
[674]709    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
[581]710    tmp=axisgroup_hdl->value.getInheritedValue();
[347]711     CTimer::get("XIOS").suspend();
[325]712  }
[581]713
714  bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl)
[432]715  {
716     CTimer::get("XIOS").resume();
[581]717     bool isDefined = axisgroup_hdl->value.hasInheritedValue();
[432]718     CTimer::get("XIOS").suspend();
[581]719     return isDefined;
[432]720  }
[325]721}
Note: See TracBrowser for help on using the repository browser.