source: XIOS/trunk/src/interface/c_attr/icscalargroup_attr.cpp @ 1542

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

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File size: 13.7 KB
Line 
1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                     *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <memory>
7#include "xios.hpp"
8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "icutil.hpp"
12#include "icdate.hpp"
13#include "timer.hpp"
14#include "node_type.hpp"
15
16extern "C"
17{
18  typedef xios::CScalarGroup* scalargroup_Ptr;
19
20  void cxios_set_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, const char * axis_type, int axis_type_size)
21  {
22    std::string axis_type_str;
23    if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return;
24    CTimer::get("XIOS").resume();
25    scalargroup_hdl->axis_type.fromString(axis_type_str);
26    CTimer::get("XIOS").suspend();
27  }
28
29  void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char * axis_type, int axis_type_size)
30  {
31    CTimer::get("XIOS").resume();
32    if (!string_copy(scalargroup_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size))
33      ERROR("void cxios_get_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl, char * axis_type, int axis_type_size)", << "Input string is too short");
34    CTimer::get("XIOS").suspend();
35  }
36
37  bool cxios_is_defined_scalargroup_axis_type(scalargroup_Ptr scalargroup_hdl)
38  {
39     CTimer::get("XIOS").resume();
40     bool isDefined = scalargroup_hdl->axis_type.hasInheritedValue();
41     CTimer::get("XIOS").suspend();
42     return isDefined;
43  }
44
45
46  void cxios_set_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double* bounds, int* extent)
47  {
48    CTimer::get("XIOS").resume();
49    CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData);
50    scalargroup_hdl->bounds.reference(tmp.copy());
51     CTimer::get("XIOS").suspend();
52  }
53
54  void cxios_get_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl, double* bounds, int* extent)
55  {
56    CTimer::get("XIOS").resume();
57    CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData);
58    tmp=scalargroup_hdl->bounds.getInheritedValue();
59     CTimer::get("XIOS").suspend();
60  }
61
62  bool cxios_is_defined_scalargroup_bounds(scalargroup_Ptr scalargroup_hdl)
63  {
64     CTimer::get("XIOS").resume();
65     bool isDefined = scalargroup_hdl->bounds.hasInheritedValue();
66     CTimer::get("XIOS").suspend();
67     return isDefined;
68  }
69
70
71  void cxios_set_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, const char * bounds_name, int bounds_name_size)
72  {
73    std::string bounds_name_str;
74    if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return;
75    CTimer::get("XIOS").resume();
76    scalargroup_hdl->bounds_name.setValue(bounds_name_str);
77    CTimer::get("XIOS").suspend();
78  }
79
80  void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char * bounds_name, int bounds_name_size)
81  {
82    CTimer::get("XIOS").resume();
83    if (!string_copy(scalargroup_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size))
84      ERROR("void cxios_get_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short");
85    CTimer::get("XIOS").suspend();
86  }
87
88  bool cxios_is_defined_scalargroup_bounds_name(scalargroup_Ptr scalargroup_hdl)
89  {
90     CTimer::get("XIOS").resume();
91     bool isDefined = scalargroup_hdl->bounds_name.hasInheritedValue();
92     CTimer::get("XIOS").suspend();
93     return isDefined;
94  }
95
96
97  void cxios_set_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, const char * comment, int comment_size)
98  {
99    std::string comment_str;
100    if (!cstr2string(comment, comment_size, comment_str)) return;
101    CTimer::get("XIOS").resume();
102    scalargroup_hdl->comment.setValue(comment_str);
103    CTimer::get("XIOS").suspend();
104  }
105
106  void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char * comment, int comment_size)
107  {
108    CTimer::get("XIOS").resume();
109    if (!string_copy(scalargroup_hdl->comment.getInheritedValue(), comment, comment_size))
110      ERROR("void cxios_get_scalargroup_comment(scalargroup_Ptr scalargroup_hdl, char * comment, int comment_size)", << "Input string is too short");
111    CTimer::get("XIOS").suspend();
112  }
113
114  bool cxios_is_defined_scalargroup_comment(scalargroup_Ptr scalargroup_hdl)
115  {
116     CTimer::get("XIOS").resume();
117     bool isDefined = scalargroup_hdl->comment.hasInheritedValue();
118     CTimer::get("XIOS").suspend();
119     return isDefined;
120  }
121
122
123  void cxios_set_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, const char * group_ref, int group_ref_size)
124  {
125    std::string group_ref_str;
126    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
127    CTimer::get("XIOS").resume();
128    scalargroup_hdl->group_ref.setValue(group_ref_str);
129    CTimer::get("XIOS").suspend();
130  }
131
132  void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)
133  {
134    CTimer::get("XIOS").resume();
135    if (!string_copy(scalargroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
136      ERROR("void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
137    CTimer::get("XIOS").suspend();
138  }
139
140  bool cxios_is_defined_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl)
141  {
142     CTimer::get("XIOS").resume();
143     bool isDefined = scalargroup_hdl->group_ref.hasInheritedValue();
144     CTimer::get("XIOS").suspend();
145     return isDefined;
146  }
147
148
149  void cxios_set_scalargroup_label(scalargroup_Ptr scalargroup_hdl, const char * label, int label_size)
150  {
151    std::string label_str;
152    if (!cstr2string(label, label_size, label_str)) return;
153    CTimer::get("XIOS").resume();
154    scalargroup_hdl->label.setValue(label_str);
155    CTimer::get("XIOS").suspend();
156  }
157
158  void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char * label, int label_size)
159  {
160    CTimer::get("XIOS").resume();
161    if (!string_copy(scalargroup_hdl->label.getInheritedValue(), label, label_size))
162      ERROR("void cxios_get_scalargroup_label(scalargroup_Ptr scalargroup_hdl, char * label, int label_size)", << "Input string is too short");
163    CTimer::get("XIOS").suspend();
164  }
165
166  bool cxios_is_defined_scalargroup_label(scalargroup_Ptr scalargroup_hdl)
167  {
168     CTimer::get("XIOS").resume();
169     bool isDefined = scalargroup_hdl->label.hasInheritedValue();
170     CTimer::get("XIOS").suspend();
171     return isDefined;
172  }
173
174
175  void cxios_set_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, const char * long_name, int long_name_size)
176  {
177    std::string long_name_str;
178    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
179    CTimer::get("XIOS").resume();
180    scalargroup_hdl->long_name.setValue(long_name_str);
181    CTimer::get("XIOS").suspend();
182  }
183
184  void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)
185  {
186    CTimer::get("XIOS").resume();
187    if (!string_copy(scalargroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
188      ERROR("void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
189    CTimer::get("XIOS").suspend();
190  }
191
192  bool cxios_is_defined_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl)
193  {
194     CTimer::get("XIOS").resume();
195     bool isDefined = scalargroup_hdl->long_name.hasInheritedValue();
196     CTimer::get("XIOS").suspend();
197     return isDefined;
198  }
199
200
201  void cxios_set_scalargroup_name(scalargroup_Ptr scalargroup_hdl, const char * name, int name_size)
202  {
203    std::string name_str;
204    if (!cstr2string(name, name_size, name_str)) return;
205    CTimer::get("XIOS").resume();
206    scalargroup_hdl->name.setValue(name_str);
207    CTimer::get("XIOS").suspend();
208  }
209
210  void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)
211  {
212    CTimer::get("XIOS").resume();
213    if (!string_copy(scalargroup_hdl->name.getInheritedValue(), name, name_size))
214      ERROR("void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)", << "Input string is too short");
215    CTimer::get("XIOS").suspend();
216  }
217
218  bool cxios_is_defined_scalargroup_name(scalargroup_Ptr scalargroup_hdl)
219  {
220     CTimer::get("XIOS").resume();
221     bool isDefined = scalargroup_hdl->name.hasInheritedValue();
222     CTimer::get("XIOS").suspend();
223     return isDefined;
224  }
225
226
227  void cxios_set_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, const char * positive, int positive_size)
228  {
229    std::string positive_str;
230    if (!cstr2string(positive, positive_size, positive_str)) return;
231    CTimer::get("XIOS").resume();
232    scalargroup_hdl->positive.fromString(positive_str);
233    CTimer::get("XIOS").suspend();
234  }
235
236  void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char * positive, int positive_size)
237  {
238    CTimer::get("XIOS").resume();
239    if (!string_copy(scalargroup_hdl->positive.getInheritedStringValue(), positive, positive_size))
240      ERROR("void cxios_get_scalargroup_positive(scalargroup_Ptr scalargroup_hdl, char * positive, int positive_size)", << "Input string is too short");
241    CTimer::get("XIOS").suspend();
242  }
243
244  bool cxios_is_defined_scalargroup_positive(scalargroup_Ptr scalargroup_hdl)
245  {
246     CTimer::get("XIOS").resume();
247     bool isDefined = scalargroup_hdl->positive.hasInheritedValue();
248     CTimer::get("XIOS").suspend();
249     return isDefined;
250  }
251
252
253  void cxios_set_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int prec)
254  {
255    CTimer::get("XIOS").resume();
256    scalargroup_hdl->prec.setValue(prec);
257    CTimer::get("XIOS").suspend();
258  }
259
260  void cxios_get_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int* prec)
261  {
262    CTimer::get("XIOS").resume();
263    *prec = scalargroup_hdl->prec.getInheritedValue();
264    CTimer::get("XIOS").suspend();
265  }
266
267  bool cxios_is_defined_scalargroup_prec(scalargroup_Ptr scalargroup_hdl)
268  {
269     CTimer::get("XIOS").resume();
270     bool isDefined = scalargroup_hdl->prec.hasInheritedValue();
271     CTimer::get("XIOS").suspend();
272     return isDefined;
273  }
274
275
276  void cxios_set_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, const char * scalar_ref, int scalar_ref_size)
277  {
278    std::string scalar_ref_str;
279    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
280    CTimer::get("XIOS").resume();
281    scalargroup_hdl->scalar_ref.setValue(scalar_ref_str);
282    CTimer::get("XIOS").suspend();
283  }
284
285  void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)
286  {
287    CTimer::get("XIOS").resume();
288    if (!string_copy(scalargroup_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
289      ERROR("void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
290    CTimer::get("XIOS").suspend();
291  }
292
293  bool cxios_is_defined_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl)
294  {
295     CTimer::get("XIOS").resume();
296     bool isDefined = scalargroup_hdl->scalar_ref.hasInheritedValue();
297     CTimer::get("XIOS").suspend();
298     return isDefined;
299  }
300
301
302  void cxios_set_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, const char * standard_name, int standard_name_size)
303  {
304    std::string standard_name_str;
305    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
306    CTimer::get("XIOS").resume();
307    scalargroup_hdl->standard_name.setValue(standard_name_str);
308    CTimer::get("XIOS").suspend();
309  }
310
311  void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)
312  {
313    CTimer::get("XIOS").resume();
314    if (!string_copy(scalargroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
315      ERROR("void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
316    CTimer::get("XIOS").suspend();
317  }
318
319  bool cxios_is_defined_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl)
320  {
321     CTimer::get("XIOS").resume();
322     bool isDefined = scalargroup_hdl->standard_name.hasInheritedValue();
323     CTimer::get("XIOS").suspend();
324     return isDefined;
325  }
326
327
328  void cxios_set_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, const char * unit, int unit_size)
329  {
330    std::string unit_str;
331    if (!cstr2string(unit, unit_size, unit_str)) return;
332    CTimer::get("XIOS").resume();
333    scalargroup_hdl->unit.setValue(unit_str);
334    CTimer::get("XIOS").suspend();
335  }
336
337  void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)
338  {
339    CTimer::get("XIOS").resume();
340    if (!string_copy(scalargroup_hdl->unit.getInheritedValue(), unit, unit_size))
341      ERROR("void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)", << "Input string is too short");
342    CTimer::get("XIOS").suspend();
343  }
344
345  bool cxios_is_defined_scalargroup_unit(scalargroup_Ptr scalargroup_hdl)
346  {
347     CTimer::get("XIOS").resume();
348     bool isDefined = scalargroup_hdl->unit.hasInheritedValue();
349     CTimer::get("XIOS").suspend();
350     return isDefined;
351  }
352
353
354  void cxios_set_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double value)
355  {
356    CTimer::get("XIOS").resume();
357    scalargroup_hdl->value.setValue(value);
358    CTimer::get("XIOS").suspend();
359  }
360
361  void cxios_get_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double* value)
362  {
363    CTimer::get("XIOS").resume();
364    *value = scalargroup_hdl->value.getInheritedValue();
365    CTimer::get("XIOS").suspend();
366  }
367
368  bool cxios_is_defined_scalargroup_value(scalargroup_Ptr scalargroup_hdl)
369  {
370     CTimer::get("XIOS").resume();
371     bool isDefined = scalargroup_hdl->value.hasInheritedValue();
372     CTimer::get("XIOS").suspend();
373     return isDefined;
374  }
375}
Note: See TracBrowser for help on using the repository browser.