source: XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp @ 2280

Last change on this file since 2280 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: 22.4 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::CAxis* axis_Ptr;
18
[546]19  void cxios_set_axis_axis_ref(axis_Ptr axis_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    axis_hdl->axis_ref.setValue(axis_ref_str);
[581]25    CTimer::get("XIOS").suspend();
[546]26  }
[581]27
[546]28  void cxios_get_axis_axis_ref(axis_Ptr axis_hdl, char * axis_ref, int axis_ref_size)
29  {
[581]30    CTimer::get("XIOS").resume();
31    if (!string_copy(axis_hdl->axis_ref.getInheritedValue(), axis_ref, axis_ref_size))
32      ERROR("void cxios_get_axis_axis_ref(axis_Ptr axis_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_axis_axis_ref(axis_Ptr axis_hdl)
[546]37  {
38     CTimer::get("XIOS").resume();
[581]39     bool isDefined = axis_hdl->axis_ref.hasInheritedValue();
[546]40     CTimer::get("XIOS").suspend();
[581]41     return isDefined;
[546]42  }
[581]43
44
[1492]45  void cxios_set_axis_axis_type(axis_Ptr axis_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    axis_hdl->axis_type.fromString(axis_type_str);
51    CTimer::get("XIOS").suspend();
52  }
53
54  void cxios_get_axis_axis_type(axis_Ptr axis_hdl, char * axis_type, int axis_type_size)
55  {
56    CTimer::get("XIOS").resume();
57    if (!string_copy(axis_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
58      ERROR("void cxios_get_axis_axis_type(axis_Ptr axis_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_axis_axis_type(axis_Ptr axis_hdl)
63  {
64     CTimer::get("XIOS").resume();
65     bool isDefined = axis_hdl->axis_type.hasInheritedValue();
66     CTimer::get("XIOS").suspend();
67     return isDefined;
68  }
69
70
[666]71  void cxios_set_axis_begin(axis_Ptr axis_hdl, int begin)
72  {
73    CTimer::get("XIOS").resume();
74    axis_hdl->begin.setValue(begin);
75    CTimer::get("XIOS").suspend();
76  }
77
78  void cxios_get_axis_begin(axis_Ptr axis_hdl, int* begin)
79  {
80    CTimer::get("XIOS").resume();
81    *begin = axis_hdl->begin.getInheritedValue();
82    CTimer::get("XIOS").suspend();
83  }
84
85  bool cxios_is_defined_axis_begin(axis_Ptr axis_hdl)
86  {
87     CTimer::get("XIOS").resume();
88     bool isDefined = axis_hdl->begin.hasInheritedValue();
89     CTimer::get("XIOS").suspend();
90     return isDefined;
91  }
92
93
[674]94  void cxios_set_axis_bounds(axis_Ptr axis_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    axis_hdl->bounds.reference(tmp.copy());
99     CTimer::get("XIOS").suspend();
100  }
101
[674]102  void cxios_get_axis_bounds(axis_Ptr axis_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=axis_hdl->bounds.getInheritedValue();
107     CTimer::get("XIOS").suspend();
108  }
109
110  bool cxios_is_defined_axis_bounds(axis_Ptr axis_hdl)
111  {
112     CTimer::get("XIOS").resume();
113     bool isDefined = axis_hdl->bounds.hasInheritedValue();
114     CTimer::get("XIOS").suspend();
115     return isDefined;
116  }
117
118
[1492]119  void cxios_set_axis_bounds_name(axis_Ptr axis_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    axis_hdl->bounds_name.setValue(bounds_name_str);
125    CTimer::get("XIOS").suspend();
126  }
127
128  void cxios_get_axis_bounds_name(axis_Ptr axis_hdl, char * bounds_name, int bounds_name_size)
129  {
130    CTimer::get("XIOS").resume();
131    if (!string_copy(axis_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
132      ERROR("void cxios_get_axis_bounds_name(axis_Ptr axis_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_axis_bounds_name(axis_Ptr axis_hdl)
137  {
138     CTimer::get("XIOS").resume();
139     bool isDefined = axis_hdl->bounds_name.hasInheritedValue();
140     CTimer::get("XIOS").suspend();
141     return isDefined;
142  }
143
144
145  void cxios_set_axis_comment(axis_Ptr axis_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    axis_hdl->comment.setValue(comment_str);
151    CTimer::get("XIOS").suspend();
152  }
153
154  void cxios_get_axis_comment(axis_Ptr axis_hdl, char * comment, int comment_size)
155  {
156    CTimer::get("XIOS").resume();
157    if (!string_copy(axis_hdl->comment.getInheritedValue(), comment, comment_size))
158      ERROR("void cxios_get_axis_comment(axis_Ptr axis_hdl, char * comment, int comment_size)", << "Input string is too short");
159    CTimer::get("XIOS").suspend();
160  }
161
162  bool cxios_is_defined_axis_comment(axis_Ptr axis_hdl)
163  {
164     CTimer::get("XIOS").resume();
165     bool isDefined = axis_hdl->comment.hasInheritedValue();
166     CTimer::get("XIOS").suspend();
167     return isDefined;
168  }
169
170
[555]171  void cxios_set_axis_data_begin(axis_Ptr axis_hdl, int data_begin)
172  {
[581]173    CTimer::get("XIOS").resume();
[555]174    axis_hdl->data_begin.setValue(data_begin);
[581]175    CTimer::get("XIOS").suspend();
[555]176  }
[581]177
[555]178  void cxios_get_axis_data_begin(axis_Ptr axis_hdl, int* data_begin)
179  {
[581]180    CTimer::get("XIOS").resume();
[555]181    *data_begin = axis_hdl->data_begin.getInheritedValue();
[581]182    CTimer::get("XIOS").suspend();
[555]183  }
[581]184
185  bool cxios_is_defined_axis_data_begin(axis_Ptr axis_hdl)
[555]186  {
187     CTimer::get("XIOS").resume();
[581]188     bool isDefined = axis_hdl->data_begin.hasInheritedValue();
[555]189     CTimer::get("XIOS").suspend();
[581]190     return isDefined;
[555]191  }
[581]192
193
[674]194  void cxios_set_axis_data_index(axis_Ptr axis_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    axis_hdl->data_index.reference(tmp.copy());
199     CTimer::get("XIOS").suspend();
200  }
[581]201
[674]202  void cxios_get_axis_data_index(axis_Ptr axis_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=axis_hdl->data_index.getInheritedValue();
[555]207     CTimer::get("XIOS").suspend();
208  }
[581]209
210  bool cxios_is_defined_axis_data_index(axis_Ptr axis_hdl)
[555]211  {
212     CTimer::get("XIOS").resume();
[581]213     bool isDefined = axis_hdl->data_index.hasInheritedValue();
[555]214     CTimer::get("XIOS").suspend();
[581]215     return isDefined;
[555]216  }
[581]217
218
[555]219  void cxios_set_axis_data_n(axis_Ptr axis_hdl, int data_n)
220  {
[581]221    CTimer::get("XIOS").resume();
[555]222    axis_hdl->data_n.setValue(data_n);
[581]223    CTimer::get("XIOS").suspend();
[555]224  }
[581]225
[555]226  void cxios_get_axis_data_n(axis_Ptr axis_hdl, int* data_n)
227  {
[581]228    CTimer::get("XIOS").resume();
[555]229    *data_n = axis_hdl->data_n.getInheritedValue();
[581]230    CTimer::get("XIOS").suspend();
[555]231  }
[581]232
233  bool cxios_is_defined_axis_data_n(axis_Ptr axis_hdl)
[555]234  {
235     CTimer::get("XIOS").resume();
[581]236     bool isDefined = axis_hdl->data_n.hasInheritedValue();
[555]237     CTimer::get("XIOS").suspend();
[581]238     return isDefined;
[555]239  }
[581]240
241
[1492]242  void cxios_set_axis_dim_name(axis_Ptr axis_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    axis_hdl->dim_name.setValue(dim_name_str);
248    CTimer::get("XIOS").suspend();
249  }
250
251  void cxios_get_axis_dim_name(axis_Ptr axis_hdl, char * dim_name, int dim_name_size)
252  {
253    CTimer::get("XIOS").resume();
254    if (!string_copy(axis_hdl->dim_name.getInheritedValue(), dim_name, dim_name_size))
255      ERROR("void cxios_get_axis_dim_name(axis_Ptr axis_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_axis_dim_name(axis_Ptr axis_hdl)
260  {
261     CTimer::get("XIOS").resume();
262     bool isDefined = axis_hdl->dim_name.hasInheritedValue();
263     CTimer::get("XIOS").suspend();
264     return isDefined;
265  }
266
267
268  void cxios_set_axis_formula(axis_Ptr axis_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    axis_hdl->formula.setValue(formula_str);
274    CTimer::get("XIOS").suspend();
275  }
276
277  void cxios_get_axis_formula(axis_Ptr axis_hdl, char * formula, int formula_size)
278  {
279    CTimer::get("XIOS").resume();
280    if (!string_copy(axis_hdl->formula.getInheritedValue(), formula, formula_size))
281      ERROR("void cxios_get_axis_formula(axis_Ptr axis_hdl, char * formula, int formula_size)", << "Input string is too short");
282    CTimer::get("XIOS").suspend();
283  }
284
285  bool cxios_is_defined_axis_formula(axis_Ptr axis_hdl)
286  {
287     CTimer::get("XIOS").resume();
288     bool isDefined = axis_hdl->formula.hasInheritedValue();
289     CTimer::get("XIOS").suspend();
290     return isDefined;
291  }
292
293
294  void cxios_set_axis_formula_bounds(axis_Ptr axis_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    axis_hdl->formula_bounds.setValue(formula_bounds_str);
300    CTimer::get("XIOS").suspend();
301  }
302
303  void cxios_get_axis_formula_bounds(axis_Ptr axis_hdl, char * formula_bounds, int formula_bounds_size)
304  {
305    CTimer::get("XIOS").resume();
306    if (!string_copy(axis_hdl->formula_bounds.getInheritedValue(), formula_bounds, formula_bounds_size))
307      ERROR("void cxios_get_axis_formula_bounds(axis_Ptr axis_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_axis_formula_bounds(axis_Ptr axis_hdl)
312  {
313     CTimer::get("XIOS").resume();
314     bool isDefined = axis_hdl->formula_bounds.hasInheritedValue();
315     CTimer::get("XIOS").suspend();
316     return isDefined;
317  }
318
319
320  void cxios_set_axis_formula_term(axis_Ptr axis_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    axis_hdl->formula_term.setValue(formula_term_str);
326    CTimer::get("XIOS").suspend();
327  }
328
329  void cxios_get_axis_formula_term(axis_Ptr axis_hdl, char * formula_term, int formula_term_size)
330  {
331    CTimer::get("XIOS").resume();
332    if (!string_copy(axis_hdl->formula_term.getInheritedValue(), formula_term, formula_term_size))
333      ERROR("void cxios_get_axis_formula_term(axis_Ptr axis_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_axis_formula_term(axis_Ptr axis_hdl)
338  {
339     CTimer::get("XIOS").resume();
340     bool isDefined = axis_hdl->formula_term.hasInheritedValue();
341     CTimer::get("XIOS").suspend();
342     return isDefined;
343  }
344
345
346  void cxios_set_axis_formula_term_bounds(axis_Ptr axis_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    axis_hdl->formula_term_bounds.setValue(formula_term_bounds_str);
352    CTimer::get("XIOS").suspend();
353  }
354
355  void cxios_get_axis_formula_term_bounds(axis_Ptr axis_hdl, char * formula_term_bounds, int formula_term_bounds_size)
356  {
357    CTimer::get("XIOS").resume();
358    if (!string_copy(axis_hdl->formula_term_bounds.getInheritedValue(), formula_term_bounds, formula_term_bounds_size))
359      ERROR("void cxios_get_axis_formula_term_bounds(axis_Ptr axis_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_axis_formula_term_bounds(axis_Ptr axis_hdl)
364  {
365     CTimer::get("XIOS").resume();
366     bool isDefined = axis_hdl->formula_term_bounds.hasInheritedValue();
367     CTimer::get("XIOS").suspend();
368     return isDefined;
369  }
370
371
[817]372  void cxios_set_axis_index(axis_Ptr axis_hdl, int* index, int* extent)
373  {
374    CTimer::get("XIOS").resume();
375    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
376    axis_hdl->index.reference(tmp.copy());
377     CTimer::get("XIOS").suspend();
378  }
379
380  void cxios_get_axis_index(axis_Ptr axis_hdl, int* index, int* extent)
381  {
382    CTimer::get("XIOS").resume();
383    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
384    tmp=axis_hdl->index.getInheritedValue();
385     CTimer::get("XIOS").suspend();
386  }
387
388  bool cxios_is_defined_axis_index(axis_Ptr axis_hdl)
389  {
390     CTimer::get("XIOS").resume();
391     bool isDefined = axis_hdl->index.hasInheritedValue();
392     CTimer::get("XIOS").suspend();
393     return isDefined;
394  }
395
396
[1158]397  void cxios_set_axis_label(axis_Ptr axis_hdl, char* label, int str_len, int* str_size, int* extent)
398  {
399    CTimer::get("XIOS").resume();
400    axis_hdl->label.resize(shape(extent[0]));
401    Array<StdString,1>::iterator it, itb=axis_hdl->label.begin(), ite=axis_hdl->label.end() ;
402    int i, n ;
403    for(it=itb, i=0, n=0 ; it!=ite ; ++it,n+=str_len,++i) *it=StdString(&label[n],str_size[i]) ;
404    CTimer::get("XIOS").suspend();
405  }
406
407  void cxios_get_axis_label(axis_Ptr axis_hdl, char* label, int str_size, int* extent)
408  {
409    CTimer::get("XIOS").resume();
410    Array<StdString,1>::const_iterator it, itb=axis_hdl->label.getInheritedValue().begin(), ite=axis_hdl->label.getInheritedValue().end() ;
411    int n ;
412    for(it=itb, n=0 ; it!=ite ; ++it, n+=str_size) it->copy(&label[n],it->size()) ; 
413    CTimer::get("XIOS").suspend();
414  }
415
416  bool cxios_is_defined_axis_label(axis_Ptr axis_hdl)
417  {
418     CTimer::get("XIOS").resume();
419     bool isDefined = axis_hdl->label.hasInheritedValue();
420     CTimer::get("XIOS").suspend();
421     return isDefined;
422  }
423
424
[325]425  void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size)
426  {
427    std::string long_name_str;
[581]428    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
429    CTimer::get("XIOS").resume();
[325]430    axis_hdl->long_name.setValue(long_name_str);
[581]431    CTimer::get("XIOS").suspend();
[325]432  }
[581]433
[325]434  void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)
435  {
[581]436    CTimer::get("XIOS").resume();
437    if (!string_copy(axis_hdl->long_name.getInheritedValue(), long_name, long_name_size))
438      ERROR("void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)", << "Input string is too short");
439    CTimer::get("XIOS").suspend();
[325]440  }
[581]441
442  bool cxios_is_defined_axis_long_name(axis_Ptr axis_hdl)
[432]443  {
444     CTimer::get("XIOS").resume();
[581]445     bool isDefined = axis_hdl->long_name.hasInheritedValue();
[432]446     CTimer::get("XIOS").suspend();
[581]447     return isDefined;
[432]448  }
[581]449
450
[674]451  void cxios_set_axis_mask(axis_Ptr axis_hdl, bool* mask, int* extent)
[555]452  {
453    CTimer::get("XIOS").resume();
[674]454    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
[555]455    axis_hdl->mask.reference(tmp.copy());
456     CTimer::get("XIOS").suspend();
457  }
[581]458
[674]459  void cxios_get_axis_mask(axis_Ptr axis_hdl, bool* mask, int* extent)
[555]460  {
461    CTimer::get("XIOS").resume();
[674]462    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
[581]463    tmp=axis_hdl->mask.getInheritedValue();
[555]464     CTimer::get("XIOS").suspend();
465  }
[581]466
467  bool cxios_is_defined_axis_mask(axis_Ptr axis_hdl)
[555]468  {
469     CTimer::get("XIOS").resume();
[581]470     bool isDefined = axis_hdl->mask.hasInheritedValue();
[555]471     CTimer::get("XIOS").suspend();
[581]472     return isDefined;
[555]473  }
[581]474
475
[666]476  void cxios_set_axis_n(axis_Ptr axis_hdl, int n)
[325]477  {
[581]478    CTimer::get("XIOS").resume();
[666]479    axis_hdl->n.setValue(n);
[581]480    CTimer::get("XIOS").suspend();
[325]481  }
[581]482
[666]483  void cxios_get_axis_n(axis_Ptr axis_hdl, int* n)
[325]484  {
[581]485    CTimer::get("XIOS").resume();
[666]486    *n = axis_hdl->n.getInheritedValue();
[581]487    CTimer::get("XIOS").suspend();
[325]488  }
[581]489
[666]490  bool cxios_is_defined_axis_n(axis_Ptr axis_hdl)
[432]491  {
492     CTimer::get("XIOS").resume();
[666]493     bool isDefined = axis_hdl->n.hasInheritedValue();
[432]494     CTimer::get("XIOS").suspend();
[581]495     return isDefined;
[432]496  }
[581]497
498
[779]499  void cxios_set_axis_n_distributed_partition(axis_Ptr axis_hdl, int n_distributed_partition)
500  {
501    CTimer::get("XIOS").resume();
502    axis_hdl->n_distributed_partition.setValue(n_distributed_partition);
503    CTimer::get("XIOS").suspend();
504  }
505
506  void cxios_get_axis_n_distributed_partition(axis_Ptr axis_hdl, int* n_distributed_partition)
507  {
508    CTimer::get("XIOS").resume();
509    *n_distributed_partition = axis_hdl->n_distributed_partition.getInheritedValue();
510    CTimer::get("XIOS").suspend();
511  }
512
513  bool cxios_is_defined_axis_n_distributed_partition(axis_Ptr axis_hdl)
514  {
515     CTimer::get("XIOS").resume();
516     bool isDefined = axis_hdl->n_distributed_partition.hasInheritedValue();
517     CTimer::get("XIOS").suspend();
518     return isDefined;
519  }
520
521
[666]522  void cxios_set_axis_n_glo(axis_Ptr axis_hdl, int n_glo)
[555]523  {
[581]524    CTimer::get("XIOS").resume();
[666]525    axis_hdl->n_glo.setValue(n_glo);
[581]526    CTimer::get("XIOS").suspend();
[555]527  }
[581]528
[666]529  void cxios_get_axis_n_glo(axis_Ptr axis_hdl, int* n_glo)
[555]530  {
[581]531    CTimer::get("XIOS").resume();
[666]532    *n_glo = axis_hdl->n_glo.getInheritedValue();
[581]533    CTimer::get("XIOS").suspend();
[555]534  }
[581]535
[666]536  bool cxios_is_defined_axis_n_glo(axis_Ptr axis_hdl)
[555]537  {
538     CTimer::get("XIOS").resume();
[666]539     bool isDefined = axis_hdl->n_glo.hasInheritedValue();
[555]540     CTimer::get("XIOS").suspend();
[581]541     return isDefined;
[555]542  }
[581]543
544
[666]545  void cxios_set_axis_name(axis_Ptr axis_hdl, const char * name, int name_size)
[415]546  {
[666]547    std::string name_str;
548    if (!cstr2string(name, name_size, name_str)) return;
[581]549    CTimer::get("XIOS").resume();
[666]550    axis_hdl->name.setValue(name_str);
[581]551    CTimer::get("XIOS").suspend();
[415]552  }
[581]553
[666]554  void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)
[415]555  {
[581]556    CTimer::get("XIOS").resume();
[666]557    if (!string_copy(axis_hdl->name.getInheritedValue(), name, name_size))
558      ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", << "Input string is too short");
[581]559    CTimer::get("XIOS").suspend();
[415]560  }
[581]561
[666]562  bool cxios_is_defined_axis_name(axis_Ptr axis_hdl)
[432]563  {
564     CTimer::get("XIOS").resume();
[666]565     bool isDefined = axis_hdl->name.hasInheritedValue();
[432]566     CTimer::get("XIOS").suspend();
[581]567     return isDefined;
[432]568  }
[581]569
570
[666]571  void cxios_set_axis_positive(axis_Ptr axis_hdl, const char * positive, int positive_size)
[325]572  {
[666]573    std::string positive_str;
574    if (!cstr2string(positive, positive_size, positive_str)) return;
[581]575    CTimer::get("XIOS").resume();
[666]576    axis_hdl->positive.fromString(positive_str);
[581]577    CTimer::get("XIOS").suspend();
[325]578  }
[581]579
[666]580  void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)
[325]581  {
[581]582    CTimer::get("XIOS").resume();
[666]583    if (!string_copy(axis_hdl->positive.getInheritedStringValue(), positive, positive_size))
584      ERROR("void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)", << "Input string is too short");
[581]585    CTimer::get("XIOS").suspend();
[325]586  }
[581]587
[666]588  bool cxios_is_defined_axis_positive(axis_Ptr axis_hdl)
[432]589  {
590     CTimer::get("XIOS").resume();
[666]591     bool isDefined = axis_hdl->positive.hasInheritedValue();
[432]592     CTimer::get("XIOS").suspend();
[581]593     return isDefined;
[432]594  }
[581]595
596
[1158]597  void cxios_set_axis_prec(axis_Ptr axis_hdl, int prec)
598  {
599    CTimer::get("XIOS").resume();
600    axis_hdl->prec.setValue(prec);
601    CTimer::get("XIOS").suspend();
602  }
603
604  void cxios_get_axis_prec(axis_Ptr axis_hdl, int* prec)
605  {
606    CTimer::get("XIOS").resume();
607    *prec = axis_hdl->prec.getInheritedValue();
608    CTimer::get("XIOS").suspend();
609  }
610
611  bool cxios_is_defined_axis_prec(axis_Ptr axis_hdl)
612  {
613     CTimer::get("XIOS").resume();
614     bool isDefined = axis_hdl->prec.hasInheritedValue();
615     CTimer::get("XIOS").suspend();
616     return isDefined;
617  }
618
619
[325]620  void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size)
621  {
622    std::string standard_name_str;
[581]623    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
624    CTimer::get("XIOS").resume();
[325]625    axis_hdl->standard_name.setValue(standard_name_str);
[581]626    CTimer::get("XIOS").suspend();
[325]627  }
[581]628
[325]629  void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)
630  {
[581]631    CTimer::get("XIOS").resume();
632    if (!string_copy(axis_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
633      ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
634    CTimer::get("XIOS").suspend();
[325]635  }
[581]636
637  bool cxios_is_defined_axis_standard_name(axis_Ptr axis_hdl)
[432]638  {
639     CTimer::get("XIOS").resume();
[581]640     bool isDefined = axis_hdl->standard_name.hasInheritedValue();
[432]641     CTimer::get("XIOS").suspend();
[581]642     return isDefined;
[432]643  }
[581]644
645
[325]646  void cxios_set_axis_unit(axis_Ptr axis_hdl, const char * unit, int unit_size)
647  {
648    std::string unit_str;
[581]649    if (!cstr2string(unit, unit_size, unit_str)) return;
650    CTimer::get("XIOS").resume();
[325]651    axis_hdl->unit.setValue(unit_str);
[581]652    CTimer::get("XIOS").suspend();
[325]653  }
[581]654
[325]655  void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)
656  {
[581]657    CTimer::get("XIOS").resume();
658    if (!string_copy(axis_hdl->unit.getInheritedValue(), unit, unit_size))
659      ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", << "Input string is too short");
660    CTimer::get("XIOS").suspend();
[325]661  }
[581]662
663  bool cxios_is_defined_axis_unit(axis_Ptr axis_hdl)
[432]664  {
665     CTimer::get("XIOS").resume();
[581]666     bool isDefined = axis_hdl->unit.hasInheritedValue();
[432]667     CTimer::get("XIOS").suspend();
[581]668     return isDefined;
[432]669  }
[581]670
671
[674]672  void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int* extent)
[325]673  {
[369]674    CTimer::get("XIOS").resume();
[674]675    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
[369]676    axis_hdl->value.reference(tmp.copy());
[416]677     CTimer::get("XIOS").suspend();
[325]678  }
[581]679
[674]680  void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int* extent)
[325]681  {
[416]682    CTimer::get("XIOS").resume();
[674]683    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
[581]684    tmp=axis_hdl->value.getInheritedValue();
[347]685     CTimer::get("XIOS").suspend();
[325]686  }
[581]687
688  bool cxios_is_defined_axis_value(axis_Ptr axis_hdl)
[432]689  {
690     CTimer::get("XIOS").resume();
[581]691     bool isDefined = axis_hdl->value.hasInheritedValue();
[432]692     CTimer::get("XIOS").suspend();
[581]693     return isDefined;
[432]694  }
[325]695}
Note: See TracBrowser for help on using the repository browser.