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

Last change on this file since 1052 was 1052, checked in by ymipsl, 7 years ago

Generate fortran interface for new attributes from previous commit.

YM

File size: 7.9 KB
Line 
1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                     *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
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_group_ref(scalargroup_Ptr scalargroup_hdl, const char * group_ref, int group_ref_size)
21  {
22    std::string group_ref_str;
23    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
24    CTimer::get("XIOS").resume();
25    scalargroup_hdl->group_ref.setValue(group_ref_str);
26    CTimer::get("XIOS").suspend();
27  }
28
29  void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)
30  {
31    CTimer::get("XIOS").resume();
32    if (!string_copy(scalargroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
33      ERROR("void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
34    CTimer::get("XIOS").suspend();
35  }
36
37  bool cxios_is_defined_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl)
38  {
39     CTimer::get("XIOS").resume();
40     bool isDefined = scalargroup_hdl->group_ref.hasInheritedValue();
41     CTimer::get("XIOS").suspend();
42     return isDefined;
43  }
44
45
46  void cxios_set_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, const char * long_name, int long_name_size)
47  {
48    std::string long_name_str;
49    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
50    CTimer::get("XIOS").resume();
51    scalargroup_hdl->long_name.setValue(long_name_str);
52    CTimer::get("XIOS").suspend();
53  }
54
55  void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)
56  {
57    CTimer::get("XIOS").resume();
58    if (!string_copy(scalargroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
59      ERROR("void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
60    CTimer::get("XIOS").suspend();
61  }
62
63  bool cxios_is_defined_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl)
64  {
65     CTimer::get("XIOS").resume();
66     bool isDefined = scalargroup_hdl->long_name.hasInheritedValue();
67     CTimer::get("XIOS").suspend();
68     return isDefined;
69  }
70
71
72  void cxios_set_scalargroup_name(scalargroup_Ptr scalargroup_hdl, const char * name, int name_size)
73  {
74    std::string name_str;
75    if (!cstr2string(name, name_size, name_str)) return;
76    CTimer::get("XIOS").resume();
77    scalargroup_hdl->name.setValue(name_str);
78    CTimer::get("XIOS").suspend();
79  }
80
81  void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)
82  {
83    CTimer::get("XIOS").resume();
84    if (!string_copy(scalargroup_hdl->name.getInheritedValue(), name, name_size))
85      ERROR("void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)", << "Input string is too short");
86    CTimer::get("XIOS").suspend();
87  }
88
89  bool cxios_is_defined_scalargroup_name(scalargroup_Ptr scalargroup_hdl)
90  {
91     CTimer::get("XIOS").resume();
92     bool isDefined = scalargroup_hdl->name.hasInheritedValue();
93     CTimer::get("XIOS").suspend();
94     return isDefined;
95  }
96
97
98  void cxios_set_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int prec)
99  {
100    CTimer::get("XIOS").resume();
101    scalargroup_hdl->prec.setValue(prec);
102    CTimer::get("XIOS").suspend();
103  }
104
105  void cxios_get_scalargroup_prec(scalargroup_Ptr scalargroup_hdl, int* prec)
106  {
107    CTimer::get("XIOS").resume();
108    *prec = scalargroup_hdl->prec.getInheritedValue();
109    CTimer::get("XIOS").suspend();
110  }
111
112  bool cxios_is_defined_scalargroup_prec(scalargroup_Ptr scalargroup_hdl)
113  {
114     CTimer::get("XIOS").resume();
115     bool isDefined = scalargroup_hdl->prec.hasInheritedValue();
116     CTimer::get("XIOS").suspend();
117     return isDefined;
118  }
119
120
121  void cxios_set_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, const char * scalar_ref, int scalar_ref_size)
122  {
123    std::string scalar_ref_str;
124    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
125    CTimer::get("XIOS").resume();
126    scalargroup_hdl->scalar_ref.setValue(scalar_ref_str);
127    CTimer::get("XIOS").suspend();
128  }
129
130  void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)
131  {
132    CTimer::get("XIOS").resume();
133    if (!string_copy(scalargroup_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
134      ERROR("void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
135    CTimer::get("XIOS").suspend();
136  }
137
138  bool cxios_is_defined_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl)
139  {
140     CTimer::get("XIOS").resume();
141     bool isDefined = scalargroup_hdl->scalar_ref.hasInheritedValue();
142     CTimer::get("XIOS").suspend();
143     return isDefined;
144  }
145
146
147  void cxios_set_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, const char * standard_name, int standard_name_size)
148  {
149    std::string standard_name_str;
150    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
151    CTimer::get("XIOS").resume();
152    scalargroup_hdl->standard_name.setValue(standard_name_str);
153    CTimer::get("XIOS").suspend();
154  }
155
156  void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)
157  {
158    CTimer::get("XIOS").resume();
159    if (!string_copy(scalargroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
160      ERROR("void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
161    CTimer::get("XIOS").suspend();
162  }
163
164  bool cxios_is_defined_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl)
165  {
166     CTimer::get("XIOS").resume();
167     bool isDefined = scalargroup_hdl->standard_name.hasInheritedValue();
168     CTimer::get("XIOS").suspend();
169     return isDefined;
170  }
171
172
173  void cxios_set_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, const char * unit, int unit_size)
174  {
175    std::string unit_str;
176    if (!cstr2string(unit, unit_size, unit_str)) return;
177    CTimer::get("XIOS").resume();
178    scalargroup_hdl->unit.setValue(unit_str);
179    CTimer::get("XIOS").suspend();
180  }
181
182  void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)
183  {
184    CTimer::get("XIOS").resume();
185    if (!string_copy(scalargroup_hdl->unit.getInheritedValue(), unit, unit_size))
186      ERROR("void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)", << "Input string is too short");
187    CTimer::get("XIOS").suspend();
188  }
189
190  bool cxios_is_defined_scalargroup_unit(scalargroup_Ptr scalargroup_hdl)
191  {
192     CTimer::get("XIOS").resume();
193     bool isDefined = scalargroup_hdl->unit.hasInheritedValue();
194     CTimer::get("XIOS").suspend();
195     return isDefined;
196  }
197
198
199  void cxios_set_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double value)
200  {
201    CTimer::get("XIOS").resume();
202    scalargroup_hdl->value.setValue(value);
203    CTimer::get("XIOS").suspend();
204  }
205
206  void cxios_get_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double* value)
207  {
208    CTimer::get("XIOS").resume();
209    *value = scalargroup_hdl->value.getInheritedValue();
210    CTimer::get("XIOS").suspend();
211  }
212
213  bool cxios_is_defined_scalargroup_value(scalargroup_Ptr scalargroup_hdl)
214  {
215     CTimer::get("XIOS").resume();
216     bool isDefined = scalargroup_hdl->value.hasInheritedValue();
217     CTimer::get("XIOS").suspend();
218     return isDefined;
219  }
220}
Note: See TracBrowser for help on using the repository browser.