source: XIOS/dev/dev_trunk_omp/src/interface/c_attr/icaxis_attr.cpp @ 1646

Last change on this file since 1646 was 1646, checked in by yushan, 5 years ago

branch merged with trunk @1645. arch file (ep&mpi) added for ADA

  • 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
Line 
1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                     *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include "xios.hpp"
7#include "attribute_template.hpp"
8#include "object_template.hpp"
9#include "group_template.hpp"
10#include "icutil.hpp"
11#include "icdate.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_axis_ref(axis_Ptr axis_hdl, const char * axis_ref, int axis_ref_size)
20  {
21    std::string axis_ref_str;
22    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
23    CTimer::get("XIOS").resume();
24    axis_hdl->axis_ref.setValue(axis_ref_str);
25    CTimer::get("XIOS").suspend();
26  }
27
28  void cxios_get_axis_axis_ref(axis_Ptr axis_hdl, char * axis_ref, int axis_ref_size)
29  {
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();
34  }
35
36  bool cxios_is_defined_axis_axis_ref(axis_Ptr axis_hdl)
37  {
38     CTimer::get("XIOS").resume();
39     bool isDefined = axis_hdl->axis_ref.hasInheritedValue();
40     CTimer::get("XIOS").suspend();
41     return isDefined;
42  }
43
44
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
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
94  void cxios_set_axis_bounds(axis_Ptr axis_hdl, double* bounds, int* extent)
95  {
96    CTimer::get("XIOS").resume();
97    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
98    axis_hdl->bounds.reference(tmp.copy());
99     CTimer::get("XIOS").suspend();
100  }
101
102  void cxios_get_axis_bounds(axis_Ptr axis_hdl, double* bounds, int* extent)
103  {
104    CTimer::get("XIOS").resume();
105    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
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
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
171  void cxios_set_axis_data_begin(axis_Ptr axis_hdl, int data_begin)
172  {
173    CTimer::get("XIOS").resume();
174    axis_hdl->data_begin.setValue(data_begin);
175    CTimer::get("XIOS").suspend();
176  }
177
178  void cxios_get_axis_data_begin(axis_Ptr axis_hdl, int* data_begin)
179  {
180    CTimer::get("XIOS").resume();
181    *data_begin = axis_hdl->data_begin.getInheritedValue();
182    CTimer::get("XIOS").suspend();
183  }
184
185  bool cxios_is_defined_axis_data_begin(axis_Ptr axis_hdl)
186  {
187     CTimer::get("XIOS").resume();
188     bool isDefined = axis_hdl->data_begin.hasInheritedValue();
189     CTimer::get("XIOS").suspend();
190     return isDefined;
191  }
192
193
194  void cxios_set_axis_data_index(axis_Ptr axis_hdl, int* data_index, int* extent)
195  {
196    CTimer::get("XIOS").resume();
197    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
198    axis_hdl->data_index.reference(tmp.copy());
199     CTimer::get("XIOS").suspend();
200  }
201
202  void cxios_get_axis_data_index(axis_Ptr axis_hdl, int* data_index, int* extent)
203  {
204    CTimer::get("XIOS").resume();
205    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
206    tmp=axis_hdl->data_index.getInheritedValue();
207     CTimer::get("XIOS").suspend();
208  }
209
210  bool cxios_is_defined_axis_data_index(axis_Ptr axis_hdl)
211  {
212     CTimer::get("XIOS").resume();
213     bool isDefined = axis_hdl->data_index.hasInheritedValue();
214     CTimer::get("XIOS").suspend();
215     return isDefined;
216  }
217
218
219  void cxios_set_axis_data_n(axis_Ptr axis_hdl, int data_n)
220  {
221    CTimer::get("XIOS").resume();
222    axis_hdl->data_n.setValue(data_n);
223    CTimer::get("XIOS").suspend();
224  }
225
226  void cxios_get_axis_data_n(axis_Ptr axis_hdl, int* data_n)
227  {
228    CTimer::get("XIOS").resume();
229    *data_n = axis_hdl->data_n.getInheritedValue();
230    CTimer::get("XIOS").suspend();
231  }
232
233  bool cxios_is_defined_axis_data_n(axis_Ptr axis_hdl)
234  {
235     CTimer::get("XIOS").resume();
236     bool isDefined = axis_hdl->data_n.hasInheritedValue();
237     CTimer::get("XIOS").suspend();
238     return isDefined;
239  }
240
241
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
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
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
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;
428    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
429    CTimer::get("XIOS").resume();
430    axis_hdl->long_name.setValue(long_name_str);
431    CTimer::get("XIOS").suspend();
432  }
433
434  void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)
435  {
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();
440  }
441
442  bool cxios_is_defined_axis_long_name(axis_Ptr axis_hdl)
443  {
444     CTimer::get("XIOS").resume();
445     bool isDefined = axis_hdl->long_name.hasInheritedValue();
446     CTimer::get("XIOS").suspend();
447     return isDefined;
448  }
449
450
451  void cxios_set_axis_mask(axis_Ptr axis_hdl, bool* mask, int* extent)
452  {
453    CTimer::get("XIOS").resume();
454    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
455    axis_hdl->mask.reference(tmp.copy());
456     CTimer::get("XIOS").suspend();
457  }
458
459  void cxios_get_axis_mask(axis_Ptr axis_hdl, bool* mask, int* extent)
460  {
461    CTimer::get("XIOS").resume();
462    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
463    tmp=axis_hdl->mask.getInheritedValue();
464     CTimer::get("XIOS").suspend();
465  }
466
467  bool cxios_is_defined_axis_mask(axis_Ptr axis_hdl)
468  {
469     CTimer::get("XIOS").resume();
470     bool isDefined = axis_hdl->mask.hasInheritedValue();
471     CTimer::get("XIOS").suspend();
472     return isDefined;
473  }
474
475
476  void cxios_set_axis_n(axis_Ptr axis_hdl, int n)
477  {
478    CTimer::get("XIOS").resume();
479    axis_hdl->n.setValue(n);
480    CTimer::get("XIOS").suspend();
481  }
482
483  void cxios_get_axis_n(axis_Ptr axis_hdl, int* n)
484  {
485    CTimer::get("XIOS").resume();
486    *n = axis_hdl->n.getInheritedValue();
487    CTimer::get("XIOS").suspend();
488  }
489
490  bool cxios_is_defined_axis_n(axis_Ptr axis_hdl)
491  {
492     CTimer::get("XIOS").resume();
493     bool isDefined = axis_hdl->n.hasInheritedValue();
494     CTimer::get("XIOS").suspend();
495     return isDefined;
496  }
497
498
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
522  void cxios_set_axis_n_glo(axis_Ptr axis_hdl, int n_glo)
523  {
524    CTimer::get("XIOS").resume();
525    axis_hdl->n_glo.setValue(n_glo);
526    CTimer::get("XIOS").suspend();
527  }
528
529  void cxios_get_axis_n_glo(axis_Ptr axis_hdl, int* n_glo)
530  {
531    CTimer::get("XIOS").resume();
532    *n_glo = axis_hdl->n_glo.getInheritedValue();
533    CTimer::get("XIOS").suspend();
534  }
535
536  bool cxios_is_defined_axis_n_glo(axis_Ptr axis_hdl)
537  {
538     CTimer::get("XIOS").resume();
539     bool isDefined = axis_hdl->n_glo.hasInheritedValue();
540     CTimer::get("XIOS").suspend();
541     return isDefined;
542  }
543
544
545  void cxios_set_axis_name(axis_Ptr axis_hdl, const char * name, int name_size)
546  {
547    std::string name_str;
548    if (!cstr2string(name, name_size, name_str)) return;
549    CTimer::get("XIOS").resume();
550    axis_hdl->name.setValue(name_str);
551    CTimer::get("XIOS").suspend();
552  }
553
554  void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)
555  {
556    CTimer::get("XIOS").resume();
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");
559    CTimer::get("XIOS").suspend();
560  }
561
562  bool cxios_is_defined_axis_name(axis_Ptr axis_hdl)
563  {
564     CTimer::get("XIOS").resume();
565     bool isDefined = axis_hdl->name.hasInheritedValue();
566     CTimer::get("XIOS").suspend();
567     return isDefined;
568  }
569
570
571  void cxios_set_axis_positive(axis_Ptr axis_hdl, const char * positive, int positive_size)
572  {
573    std::string positive_str;
574    if (!cstr2string(positive, positive_size, positive_str)) return;
575    CTimer::get("XIOS").resume();
576    axis_hdl->positive.fromString(positive_str);
577    CTimer::get("XIOS").suspend();
578  }
579
580  void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)
581  {
582    CTimer::get("XIOS").resume();
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");
585    CTimer::get("XIOS").suspend();
586  }
587
588  bool cxios_is_defined_axis_positive(axis_Ptr axis_hdl)
589  {
590     CTimer::get("XIOS").resume();
591     bool isDefined = axis_hdl->positive.hasInheritedValue();
592     CTimer::get("XIOS").suspend();
593     return isDefined;
594  }
595
596
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
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;
623    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
624    CTimer::get("XIOS").resume();
625    axis_hdl->standard_name.setValue(standard_name_str);
626    CTimer::get("XIOS").suspend();
627  }
628
629  void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)
630  {
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();
635  }
636
637  bool cxios_is_defined_axis_standard_name(axis_Ptr axis_hdl)
638  {
639     CTimer::get("XIOS").resume();
640     bool isDefined = axis_hdl->standard_name.hasInheritedValue();
641     CTimer::get("XIOS").suspend();
642     return isDefined;
643  }
644
645
646  void cxios_set_axis_unit(axis_Ptr axis_hdl, const char * unit, int unit_size)
647  {
648    std::string unit_str;
649    if (!cstr2string(unit, unit_size, unit_str)) return;
650    CTimer::get("XIOS").resume();
651    axis_hdl->unit.setValue(unit_str);
652    CTimer::get("XIOS").suspend();
653  }
654
655  void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)
656  {
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();
661  }
662
663  bool cxios_is_defined_axis_unit(axis_Ptr axis_hdl)
664  {
665     CTimer::get("XIOS").resume();
666     bool isDefined = axis_hdl->unit.hasInheritedValue();
667     CTimer::get("XIOS").suspend();
668     return isDefined;
669  }
670
671
672  void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int* extent)
673  {
674    CTimer::get("XIOS").resume();
675    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
676    axis_hdl->value.reference(tmp.copy());
677     CTimer::get("XIOS").suspend();
678  }
679
680  void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int* extent)
681  {
682    CTimer::get("XIOS").resume();
683    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
684    tmp=axis_hdl->value.getInheritedValue();
685     CTimer::get("XIOS").suspend();
686  }
687
688  bool cxios_is_defined_axis_value(axis_Ptr axis_hdl)
689  {
690     CTimer::get("XIOS").resume();
691     bool isDefined = axis_hdl->value.hasInheritedValue();
692     CTimer::get("XIOS").suspend();
693     return isDefined;
694  }
695}
Note: See TracBrowser for help on using the repository browser.