source: XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp

Last change on this file was 1626, checked in by oabramkina, 3 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: 11.3 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::CGridGroup* gridgroup_Ptr;
18
19  void cxios_set_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, const char * comment, int comment_size)
20  {
21    std::string comment_str;
22    if (!cstr2string(comment, comment_size, comment_str)) return;
23    CTimer::get("XIOS").resume();
24    gridgroup_hdl->comment.setValue(comment_str);
25    CTimer::get("XIOS").suspend();
26  }
27
28  void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size)
29  {
30    CTimer::get("XIOS").resume();
31    if (!string_copy(gridgroup_hdl->comment.getInheritedValue(), comment, comment_size))
32      ERROR("void cxios_get_gridgroup_comment(gridgroup_Ptr gridgroup_hdl, char * comment, int comment_size)", << "Input string is too short");
33    CTimer::get("XIOS").suspend();
34  }
35
36  bool cxios_is_defined_gridgroup_comment(gridgroup_Ptr gridgroup_hdl)
37  {
38     CTimer::get("XIOS").resume();
39     bool isDefined = gridgroup_hdl->comment.hasInheritedValue();
40     CTimer::get("XIOS").suspend();
41     return isDefined;
42  }
43
44
45  void cxios_set_gridgroup_description(gridgroup_Ptr gridgroup_hdl, const char * description, int description_size)
46  {
47    std::string description_str;
48    if (!cstr2string(description, description_size, description_str)) return;
49    CTimer::get("XIOS").resume();
50    gridgroup_hdl->description.setValue(description_str);
51    CTimer::get("XIOS").suspend();
52  }
53
54  void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)
55  {
56    CTimer::get("XIOS").resume();
57    if (!string_copy(gridgroup_hdl->description.getInheritedValue(), description, description_size))
58      ERROR("void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)", << "Input string is too short");
59    CTimer::get("XIOS").suspend();
60  }
61
62  bool cxios_is_defined_gridgroup_description(gridgroup_Ptr gridgroup_hdl)
63  {
64     CTimer::get("XIOS").resume();
65     bool isDefined = gridgroup_hdl->description.hasInheritedValue();
66     CTimer::get("XIOS").suspend();
67     return isDefined;
68  }
69
70
71  void cxios_set_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, const char * group_ref, int group_ref_size)
72  {
73    std::string group_ref_str;
74    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
75    CTimer::get("XIOS").resume();
76    gridgroup_hdl->group_ref.setValue(group_ref_str);
77    CTimer::get("XIOS").suspend();
78  }
79
80  void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)
81  {
82    CTimer::get("XIOS").resume();
83    if (!string_copy(gridgroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
84      ERROR("void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
85    CTimer::get("XIOS").suspend();
86  }
87
88  bool cxios_is_defined_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl)
89  {
90     CTimer::get("XIOS").resume();
91     bool isDefined = gridgroup_hdl->group_ref.hasInheritedValue();
92     CTimer::get("XIOS").suspend();
93     return isDefined;
94  }
95
96
97  void cxios_set_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent)
98  {
99    CTimer::get("XIOS").resume();
100    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData);
101    gridgroup_hdl->mask_0d.reference(tmp.copy());
102     CTimer::get("XIOS").suspend();
103  }
104
105  void cxios_get_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl, bool* mask_0d, int* extent)
106  {
107    CTimer::get("XIOS").resume();
108    CArray<bool,1> tmp(mask_0d, shape(extent[0]), neverDeleteData);
109    tmp=gridgroup_hdl->mask_0d.getInheritedValue();
110     CTimer::get("XIOS").suspend();
111  }
112
113  bool cxios_is_defined_gridgroup_mask_0d(gridgroup_Ptr gridgroup_hdl)
114  {
115     CTimer::get("XIOS").resume();
116     bool isDefined = gridgroup_hdl->mask_0d.hasInheritedValue();
117     CTimer::get("XIOS").suspend();
118     return isDefined;
119  }
120
121
122  void cxios_set_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent)
123  {
124    CTimer::get("XIOS").resume();
125    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
126    gridgroup_hdl->mask_1d.reference(tmp.copy());
127     CTimer::get("XIOS").suspend();
128  }
129
130  void cxios_get_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent)
131  {
132    CTimer::get("XIOS").resume();
133    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData);
134    tmp=gridgroup_hdl->mask_1d.getInheritedValue();
135     CTimer::get("XIOS").suspend();
136  }
137
138  bool cxios_is_defined_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl)
139  {
140     CTimer::get("XIOS").resume();
141     bool isDefined = gridgroup_hdl->mask_1d.hasInheritedValue();
142     CTimer::get("XIOS").suspend();
143     return isDefined;
144  }
145
146
147  void cxios_set_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl, bool* mask_2d, int* extent)
148  {
149    CTimer::get("XIOS").resume();
150    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
151    gridgroup_hdl->mask_2d.reference(tmp.copy());
152     CTimer::get("XIOS").suspend();
153  }
154
155  void cxios_get_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl, bool* mask_2d, int* extent)
156  {
157    CTimer::get("XIOS").resume();
158    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData);
159    tmp=gridgroup_hdl->mask_2d.getInheritedValue();
160     CTimer::get("XIOS").suspend();
161  }
162
163  bool cxios_is_defined_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl)
164  {
165     CTimer::get("XIOS").resume();
166     bool isDefined = gridgroup_hdl->mask_2d.hasInheritedValue();
167     CTimer::get("XIOS").suspend();
168     return isDefined;
169  }
170
171
172  void cxios_set_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl, bool* mask_3d, int* extent)
173  {
174    CTimer::get("XIOS").resume();
175    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
176    gridgroup_hdl->mask_3d.reference(tmp.copy());
177     CTimer::get("XIOS").suspend();
178  }
179
180  void cxios_get_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl, bool* mask_3d, int* extent)
181  {
182    CTimer::get("XIOS").resume();
183    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData);
184    tmp=gridgroup_hdl->mask_3d.getInheritedValue();
185     CTimer::get("XIOS").suspend();
186  }
187
188  bool cxios_is_defined_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl)
189  {
190     CTimer::get("XIOS").resume();
191     bool isDefined = gridgroup_hdl->mask_3d.hasInheritedValue();
192     CTimer::get("XIOS").suspend();
193     return isDefined;
194  }
195
196
197  void cxios_set_gridgroup_mask_4d(gridgroup_Ptr gridgroup_hdl, bool* mask_4d, int* extent)
198  {
199    CTimer::get("XIOS").resume();
200    CArray<bool,4> tmp(mask_4d, shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);
201    gridgroup_hdl->mask_4d.reference(tmp.copy());
202     CTimer::get("XIOS").suspend();
203  }
204
205  void cxios_get_gridgroup_mask_4d(gridgroup_Ptr gridgroup_hdl, bool* mask_4d, int* extent)
206  {
207    CTimer::get("XIOS").resume();
208    CArray<bool,4> tmp(mask_4d, shape(extent[0], extent[1], extent[2], extent[3]), neverDeleteData);
209    tmp=gridgroup_hdl->mask_4d.getInheritedValue();
210     CTimer::get("XIOS").suspend();
211  }
212
213  bool cxios_is_defined_gridgroup_mask_4d(gridgroup_Ptr gridgroup_hdl)
214  {
215     CTimer::get("XIOS").resume();
216     bool isDefined = gridgroup_hdl->mask_4d.hasInheritedValue();
217     CTimer::get("XIOS").suspend();
218     return isDefined;
219  }
220
221
222  void cxios_set_gridgroup_mask_5d(gridgroup_Ptr gridgroup_hdl, bool* mask_5d, int* extent)
223  {
224    CTimer::get("XIOS").resume();
225    CArray<bool,5> tmp(mask_5d, shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);
226    gridgroup_hdl->mask_5d.reference(tmp.copy());
227     CTimer::get("XIOS").suspend();
228  }
229
230  void cxios_get_gridgroup_mask_5d(gridgroup_Ptr gridgroup_hdl, bool* mask_5d, int* extent)
231  {
232    CTimer::get("XIOS").resume();
233    CArray<bool,5> tmp(mask_5d, shape(extent[0], extent[1], extent[2], extent[3], extent[4]), neverDeleteData);
234    tmp=gridgroup_hdl->mask_5d.getInheritedValue();
235     CTimer::get("XIOS").suspend();
236  }
237
238  bool cxios_is_defined_gridgroup_mask_5d(gridgroup_Ptr gridgroup_hdl)
239  {
240     CTimer::get("XIOS").resume();
241     bool isDefined = gridgroup_hdl->mask_5d.hasInheritedValue();
242     CTimer::get("XIOS").suspend();
243     return isDefined;
244  }
245
246
247  void cxios_set_gridgroup_mask_6d(gridgroup_Ptr gridgroup_hdl, bool* mask_6d, int* extent)
248  {
249    CTimer::get("XIOS").resume();
250    CArray<bool,6> tmp(mask_6d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);
251    gridgroup_hdl->mask_6d.reference(tmp.copy());
252     CTimer::get("XIOS").suspend();
253  }
254
255  void cxios_get_gridgroup_mask_6d(gridgroup_Ptr gridgroup_hdl, bool* mask_6d, int* extent)
256  {
257    CTimer::get("XIOS").resume();
258    CArray<bool,6> tmp(mask_6d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5]), neverDeleteData);
259    tmp=gridgroup_hdl->mask_6d.getInheritedValue();
260     CTimer::get("XIOS").suspend();
261  }
262
263  bool cxios_is_defined_gridgroup_mask_6d(gridgroup_Ptr gridgroup_hdl)
264  {
265     CTimer::get("XIOS").resume();
266     bool isDefined = gridgroup_hdl->mask_6d.hasInheritedValue();
267     CTimer::get("XIOS").suspend();
268     return isDefined;
269  }
270
271
272  void cxios_set_gridgroup_mask_7d(gridgroup_Ptr gridgroup_hdl, bool* mask_7d, int* extent)
273  {
274    CTimer::get("XIOS").resume();
275    CArray<bool,7> tmp(mask_7d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);
276    gridgroup_hdl->mask_7d.reference(tmp.copy());
277     CTimer::get("XIOS").suspend();
278  }
279
280  void cxios_get_gridgroup_mask_7d(gridgroup_Ptr gridgroup_hdl, bool* mask_7d, int* extent)
281  {
282    CTimer::get("XIOS").resume();
283    CArray<bool,7> tmp(mask_7d, shape(extent[0], extent[1], extent[2], extent[3], extent[4], extent[5], extent[6]), neverDeleteData);
284    tmp=gridgroup_hdl->mask_7d.getInheritedValue();
285     CTimer::get("XIOS").suspend();
286  }
287
288  bool cxios_is_defined_gridgroup_mask_7d(gridgroup_Ptr gridgroup_hdl)
289  {
290     CTimer::get("XIOS").resume();
291     bool isDefined = gridgroup_hdl->mask_7d.hasInheritedValue();
292     CTimer::get("XIOS").suspend();
293     return isDefined;
294  }
295
296
297  void cxios_set_gridgroup_name(gridgroup_Ptr gridgroup_hdl, const char * name, int name_size)
298  {
299    std::string name_str;
300    if (!cstr2string(name, name_size, name_str)) return;
301    CTimer::get("XIOS").resume();
302    gridgroup_hdl->name.setValue(name_str);
303    CTimer::get("XIOS").suspend();
304  }
305
306  void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)
307  {
308    CTimer::get("XIOS").resume();
309    if (!string_copy(gridgroup_hdl->name.getInheritedValue(), name, name_size))
310      ERROR("void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)", << "Input string is too short");
311    CTimer::get("XIOS").suspend();
312  }
313
314  bool cxios_is_defined_gridgroup_name(gridgroup_Ptr gridgroup_hdl)
315  {
316     CTimer::get("XIOS").resume();
317     bool isDefined = gridgroup_hdl->name.hasInheritedValue();
318     CTimer::get("XIOS").suspend();
319     return isDefined;
320  }
321}
Note: See TracBrowser for help on using the repository browser.