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

Last change on this file since 787 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
RevLine 
[325]1/* ************************************************************************** *
[581]2 *               Interface auto generated - do not modify                     *
[325]3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
[591]7#include "xios.hpp"
[352]8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
[325]11#include "icutil.hpp"
[532]12#include "icdate.hpp"
[347]13#include "timer.hpp"
[369]14#include "node_type.hpp"
[325]15
16extern "C"
17{
[581]18  typedef xios::CAxisGroup* axisgroup_Ptr;
19
[546]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;
[581]23    if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
24    CTimer::get("XIOS").resume();
[546]25    axisgroup_hdl->axis_ref.setValue(axis_ref_str);
[581]26    CTimer::get("XIOS").suspend();
[546]27  }
[581]28
[546]29  void cxios_get_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl, char * axis_ref, int axis_ref_size)
30  {
[581]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();
[546]35  }
[581]36
37  bool cxios_is_defined_axisgroup_axis_ref(axisgroup_Ptr axisgroup_hdl)
[546]38  {
39     CTimer::get("XIOS").resume();
[581]40     bool isDefined = axisgroup_hdl->axis_ref.hasInheritedValue();
[546]41     CTimer::get("XIOS").suspend();
[581]42     return isDefined;
[546]43  }
[581]44
45
[666]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
[674]69  void cxios_set_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
[609]70  {
71    CTimer::get("XIOS").resume();
[674]72    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
[609]73    axisgroup_hdl->bounds.reference(tmp.copy());
74     CTimer::get("XIOS").suspend();
75  }
76
[674]77  void cxios_get_axisgroup_bounds(axisgroup_Ptr axisgroup_hdl, double* bounds, int* extent)
[609]78  {
79    CTimer::get("XIOS").resume();
[674]80    CArray<double,2> tmp(bounds, shape(extent[0], extent[1]), neverDeleteData);
[609]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
[555]94  void cxios_set_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int data_begin)
95  {
[581]96    CTimer::get("XIOS").resume();
[555]97    axisgroup_hdl->data_begin.setValue(data_begin);
[581]98    CTimer::get("XIOS").suspend();
[555]99  }
[581]100
[555]101  void cxios_get_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl, int* data_begin)
102  {
[581]103    CTimer::get("XIOS").resume();
[555]104    *data_begin = axisgroup_hdl->data_begin.getInheritedValue();
[581]105    CTimer::get("XIOS").suspend();
[555]106  }
[581]107
108  bool cxios_is_defined_axisgroup_data_begin(axisgroup_Ptr axisgroup_hdl)
[555]109  {
110     CTimer::get("XIOS").resume();
[581]111     bool isDefined = axisgroup_hdl->data_begin.hasInheritedValue();
[555]112     CTimer::get("XIOS").suspend();
[581]113     return isDefined;
[555]114  }
[581]115
116
[674]117  void cxios_set_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
[555]118  {
119    CTimer::get("XIOS").resume();
[674]120    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
[555]121    axisgroup_hdl->data_index.reference(tmp.copy());
122     CTimer::get("XIOS").suspend();
123  }
[581]124
[674]125  void cxios_get_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl, int* data_index, int* extent)
[555]126  {
127    CTimer::get("XIOS").resume();
[674]128    CArray<int,1> tmp(data_index, shape(extent[0]), neverDeleteData);
[581]129    tmp=axisgroup_hdl->data_index.getInheritedValue();
[555]130     CTimer::get("XIOS").suspend();
131  }
[581]132
133  bool cxios_is_defined_axisgroup_data_index(axisgroup_Ptr axisgroup_hdl)
[555]134  {
135     CTimer::get("XIOS").resume();
[581]136     bool isDefined = axisgroup_hdl->data_index.hasInheritedValue();
[555]137     CTimer::get("XIOS").suspend();
[581]138     return isDefined;
[555]139  }
[581]140
141
[555]142  void cxios_set_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int data_n)
143  {
[581]144    CTimer::get("XIOS").resume();
[555]145    axisgroup_hdl->data_n.setValue(data_n);
[581]146    CTimer::get("XIOS").suspend();
[555]147  }
[581]148
[555]149  void cxios_get_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl, int* data_n)
150  {
[581]151    CTimer::get("XIOS").resume();
[555]152    *data_n = axisgroup_hdl->data_n.getInheritedValue();
[581]153    CTimer::get("XIOS").suspend();
[555]154  }
[581]155
156  bool cxios_is_defined_axisgroup_data_n(axisgroup_Ptr axisgroup_hdl)
[555]157  {
158     CTimer::get("XIOS").resume();
[581]159     bool isDefined = axisgroup_hdl->data_n.hasInheritedValue();
[555]160     CTimer::get("XIOS").suspend();
[581]161     return isDefined;
[555]162  }
[581]163
164
[325]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;
[581]168    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
169    CTimer::get("XIOS").resume();
[325]170    axisgroup_hdl->group_ref.setValue(group_ref_str);
[581]171    CTimer::get("XIOS").suspend();
[325]172  }
[581]173
[325]174  void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)
175  {
[581]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();
[325]180  }
[581]181
182  bool cxios_is_defined_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl)
[432]183  {
184     CTimer::get("XIOS").resume();
[581]185     bool isDefined = axisgroup_hdl->group_ref.hasInheritedValue();
[432]186     CTimer::get("XIOS").suspend();
[581]187     return isDefined;
[432]188  }
[581]189
190
[325]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;
[581]194    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
195    CTimer::get("XIOS").resume();
[325]196    axisgroup_hdl->long_name.setValue(long_name_str);
[581]197    CTimer::get("XIOS").suspend();
[325]198  }
[581]199
[325]200  void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)
201  {
[581]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();
[325]206  }
[581]207
208  bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl)
[432]209  {
210     CTimer::get("XIOS").resume();
[581]211     bool isDefined = axisgroup_hdl->long_name.hasInheritedValue();
[432]212     CTimer::get("XIOS").suspend();
[581]213     return isDefined;
[432]214  }
[581]215
216
[674]217  void cxios_set_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
[555]218  {
219    CTimer::get("XIOS").resume();
[674]220    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
[555]221    axisgroup_hdl->mask.reference(tmp.copy());
222     CTimer::get("XIOS").suspend();
223  }
[581]224
[674]225  void cxios_get_axisgroup_mask(axisgroup_Ptr axisgroup_hdl, bool* mask, int* extent)
[555]226  {
227    CTimer::get("XIOS").resume();
[674]228    CArray<bool,1> tmp(mask, shape(extent[0]), neverDeleteData);
[581]229    tmp=axisgroup_hdl->mask.getInheritedValue();
[555]230     CTimer::get("XIOS").suspend();
231  }
[581]232
233  bool cxios_is_defined_axisgroup_mask(axisgroup_Ptr axisgroup_hdl)
[555]234  {
235     CTimer::get("XIOS").resume();
[581]236     bool isDefined = axisgroup_hdl->mask.hasInheritedValue();
[555]237     CTimer::get("XIOS").suspend();
[581]238     return isDefined;
[555]239  }
[581]240
241
[666]242  void cxios_set_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int n)
[325]243  {
[581]244    CTimer::get("XIOS").resume();
[666]245    axisgroup_hdl->n.setValue(n);
[581]246    CTimer::get("XIOS").suspend();
[325]247  }
[581]248
[666]249  void cxios_get_axisgroup_n(axisgroup_Ptr axisgroup_hdl, int* n)
[325]250  {
[581]251    CTimer::get("XIOS").resume();
[666]252    *n = axisgroup_hdl->n.getInheritedValue();
[581]253    CTimer::get("XIOS").suspend();
[325]254  }
[581]255
[666]256  bool cxios_is_defined_axisgroup_n(axisgroup_Ptr axisgroup_hdl)
[432]257  {
258     CTimer::get("XIOS").resume();
[666]259     bool isDefined = axisgroup_hdl->n.hasInheritedValue();
[432]260     CTimer::get("XIOS").suspend();
[581]261     return isDefined;
[432]262  }
[581]263
264
[779]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
[666]288  void cxios_set_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int n_glo)
[555]289  {
[581]290    CTimer::get("XIOS").resume();
[666]291    axisgroup_hdl->n_glo.setValue(n_glo);
[581]292    CTimer::get("XIOS").suspend();
[555]293  }
[581]294
[666]295  void cxios_get_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl, int* n_glo)
[555]296  {
[581]297    CTimer::get("XIOS").resume();
[666]298    *n_glo = axisgroup_hdl->n_glo.getInheritedValue();
[581]299    CTimer::get("XIOS").suspend();
[555]300  }
[581]301
[666]302  bool cxios_is_defined_axisgroup_n_glo(axisgroup_Ptr axisgroup_hdl)
[555]303  {
304     CTimer::get("XIOS").resume();
[666]305     bool isDefined = axisgroup_hdl->n_glo.hasInheritedValue();
[555]306     CTimer::get("XIOS").suspend();
[581]307     return isDefined;
[555]308  }
[581]309
310
[666]311  void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size)
[415]312  {
[666]313    std::string name_str;
314    if (!cstr2string(name, name_size, name_str)) return;
[581]315    CTimer::get("XIOS").resume();
[666]316    axisgroup_hdl->name.setValue(name_str);
[581]317    CTimer::get("XIOS").suspend();
[415]318  }
[581]319
[666]320  void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)
[415]321  {
[581]322    CTimer::get("XIOS").resume();
[666]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");
[581]325    CTimer::get("XIOS").suspend();
[415]326  }
[581]327
[666]328  bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl)
[432]329  {
330     CTimer::get("XIOS").resume();
[666]331     bool isDefined = axisgroup_hdl->name.hasInheritedValue();
[432]332     CTimer::get("XIOS").suspend();
[581]333     return isDefined;
[432]334  }
[581]335
336
[666]337  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size)
[325]338  {
[666]339    std::string positive_str;
340    if (!cstr2string(positive, positive_size, positive_str)) return;
[581]341    CTimer::get("XIOS").resume();
[666]342    axisgroup_hdl->positive.fromString(positive_str);
[581]343    CTimer::get("XIOS").suspend();
[325]344  }
[581]345
[666]346  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)
[325]347  {
[581]348    CTimer::get("XIOS").resume();
[666]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");
[581]351    CTimer::get("XIOS").suspend();
[325]352  }
[581]353
[666]354  bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl)
[432]355  {
356     CTimer::get("XIOS").resume();
[666]357     bool isDefined = axisgroup_hdl->positive.hasInheritedValue();
[432]358     CTimer::get("XIOS").suspend();
[581]359     return isDefined;
[432]360  }
[581]361
362
[325]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;
[581]366    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
367    CTimer::get("XIOS").resume();
[325]368    axisgroup_hdl->standard_name.setValue(standard_name_str);
[581]369    CTimer::get("XIOS").suspend();
[325]370  }
[581]371
[325]372  void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)
373  {
[581]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();
[325]378  }
[581]379
380  bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl)
[432]381  {
382     CTimer::get("XIOS").resume();
[581]383     bool isDefined = axisgroup_hdl->standard_name.hasInheritedValue();
[432]384     CTimer::get("XIOS").suspend();
[581]385     return isDefined;
[432]386  }
[581]387
388
[325]389  void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size)
390  {
391    std::string unit_str;
[581]392    if (!cstr2string(unit, unit_size, unit_str)) return;
393    CTimer::get("XIOS").resume();
[325]394    axisgroup_hdl->unit.setValue(unit_str);
[581]395    CTimer::get("XIOS").suspend();
[325]396  }
[581]397
[325]398  void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)
399  {
[581]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();
[325]404  }
[581]405
406  bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl)
[432]407  {
408     CTimer::get("XIOS").resume();
[581]409     bool isDefined = axisgroup_hdl->unit.hasInheritedValue();
[432]410     CTimer::get("XIOS").suspend();
[581]411     return isDefined;
[432]412  }
[581]413
414
[674]415  void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
[325]416  {
[369]417    CTimer::get("XIOS").resume();
[674]418    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
[369]419    axisgroup_hdl->value.reference(tmp.copy());
[416]420     CTimer::get("XIOS").suspend();
[325]421  }
[581]422
[674]423  void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int* extent)
[325]424  {
[416]425    CTimer::get("XIOS").resume();
[674]426    CArray<double,1> tmp(value, shape(extent[0]), neverDeleteData);
[581]427    tmp=axisgroup_hdl->value.getInheritedValue();
[347]428     CTimer::get("XIOS").suspend();
[325]429  }
[581]430
431  bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl)
[432]432  {
433     CTimer::get("XIOS").resume();
[581]434     bool isDefined = axisgroup_hdl->value.hasInheritedValue();
[432]435     CTimer::get("XIOS").suspend();
[581]436     return isDefined;
[432]437  }
[325]438}
Note: See TracBrowser for help on using the repository browser.