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 | |
---|
15 | extern "C" |
---|
16 | { |
---|
17 | typedef xios::CCalendarWrapper* calendar_wrapper_Ptr; |
---|
18 | |
---|
19 | void cxios_set_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_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 | calendar_wrapper_hdl->comment.setValue(comment_str); |
---|
25 | CTimer::get("XIOS").suspend(); |
---|
26 | } |
---|
27 | |
---|
28 | void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size) |
---|
29 | { |
---|
30 | CTimer::get("XIOS").resume(); |
---|
31 | if (!string_copy(calendar_wrapper_hdl->comment.getInheritedValue(), comment, comment_size)) |
---|
32 | ERROR("void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size)", << "Input string is too short"); |
---|
33 | CTimer::get("XIOS").suspend(); |
---|
34 | } |
---|
35 | |
---|
36 | bool cxios_is_defined_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
37 | { |
---|
38 | CTimer::get("XIOS").resume(); |
---|
39 | bool isDefined = calendar_wrapper_hdl->comment.hasInheritedValue(); |
---|
40 | CTimer::get("XIOS").suspend(); |
---|
41 | return isDefined; |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
45 | void cxios_set_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int day_length) |
---|
46 | { |
---|
47 | CTimer::get("XIOS").resume(); |
---|
48 | calendar_wrapper_hdl->day_length.setValue(day_length); |
---|
49 | CTimer::get("XIOS").suspend(); |
---|
50 | } |
---|
51 | |
---|
52 | void cxios_get_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int* day_length) |
---|
53 | { |
---|
54 | CTimer::get("XIOS").resume(); |
---|
55 | *day_length = calendar_wrapper_hdl->day_length.getInheritedValue(); |
---|
56 | CTimer::get("XIOS").suspend(); |
---|
57 | } |
---|
58 | |
---|
59 | bool cxios_is_defined_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
60 | { |
---|
61 | CTimer::get("XIOS").resume(); |
---|
62 | bool isDefined = calendar_wrapper_hdl->day_length.hasInheritedValue(); |
---|
63 | CTimer::get("XIOS").suspend(); |
---|
64 | return isDefined; |
---|
65 | } |
---|
66 | |
---|
67 | |
---|
68 | void cxios_set_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl, double leap_year_drift) |
---|
69 | { |
---|
70 | CTimer::get("XIOS").resume(); |
---|
71 | calendar_wrapper_hdl->leap_year_drift.setValue(leap_year_drift); |
---|
72 | CTimer::get("XIOS").suspend(); |
---|
73 | } |
---|
74 | |
---|
75 | void cxios_get_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl, double* leap_year_drift) |
---|
76 | { |
---|
77 | CTimer::get("XIOS").resume(); |
---|
78 | *leap_year_drift = calendar_wrapper_hdl->leap_year_drift.getInheritedValue(); |
---|
79 | CTimer::get("XIOS").suspend(); |
---|
80 | } |
---|
81 | |
---|
82 | bool cxios_is_defined_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
83 | { |
---|
84 | CTimer::get("XIOS").resume(); |
---|
85 | bool isDefined = calendar_wrapper_hdl->leap_year_drift.hasInheritedValue(); |
---|
86 | CTimer::get("XIOS").suspend(); |
---|
87 | return isDefined; |
---|
88 | } |
---|
89 | |
---|
90 | |
---|
91 | void cxios_set_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl, double leap_year_drift_offset) |
---|
92 | { |
---|
93 | CTimer::get("XIOS").resume(); |
---|
94 | calendar_wrapper_hdl->leap_year_drift_offset.setValue(leap_year_drift_offset); |
---|
95 | CTimer::get("XIOS").suspend(); |
---|
96 | } |
---|
97 | |
---|
98 | void cxios_get_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl, double* leap_year_drift_offset) |
---|
99 | { |
---|
100 | CTimer::get("XIOS").resume(); |
---|
101 | *leap_year_drift_offset = calendar_wrapper_hdl->leap_year_drift_offset.getInheritedValue(); |
---|
102 | CTimer::get("XIOS").suspend(); |
---|
103 | } |
---|
104 | |
---|
105 | bool cxios_is_defined_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
106 | { |
---|
107 | CTimer::get("XIOS").resume(); |
---|
108 | bool isDefined = calendar_wrapper_hdl->leap_year_drift_offset.hasInheritedValue(); |
---|
109 | CTimer::get("XIOS").suspend(); |
---|
110 | return isDefined; |
---|
111 | } |
---|
112 | |
---|
113 | |
---|
114 | void cxios_set_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl, int leap_year_month) |
---|
115 | { |
---|
116 | CTimer::get("XIOS").resume(); |
---|
117 | calendar_wrapper_hdl->leap_year_month.setValue(leap_year_month); |
---|
118 | CTimer::get("XIOS").suspend(); |
---|
119 | } |
---|
120 | |
---|
121 | void cxios_get_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl, int* leap_year_month) |
---|
122 | { |
---|
123 | CTimer::get("XIOS").resume(); |
---|
124 | *leap_year_month = calendar_wrapper_hdl->leap_year_month.getInheritedValue(); |
---|
125 | CTimer::get("XIOS").suspend(); |
---|
126 | } |
---|
127 | |
---|
128 | bool cxios_is_defined_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
129 | { |
---|
130 | CTimer::get("XIOS").resume(); |
---|
131 | bool isDefined = calendar_wrapper_hdl->leap_year_month.hasInheritedValue(); |
---|
132 | CTimer::get("XIOS").suspend(); |
---|
133 | return isDefined; |
---|
134 | } |
---|
135 | |
---|
136 | |
---|
137 | void cxios_set_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl, int* month_lengths, int* extent) |
---|
138 | { |
---|
139 | CTimer::get("XIOS").resume(); |
---|
140 | CArray<int,1> tmp(month_lengths, shape(extent[0]), neverDeleteData); |
---|
141 | calendar_wrapper_hdl->month_lengths.reference(tmp.copy()); |
---|
142 | CTimer::get("XIOS").suspend(); |
---|
143 | } |
---|
144 | |
---|
145 | void cxios_get_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl, int* month_lengths, int* extent) |
---|
146 | { |
---|
147 | CTimer::get("XIOS").resume(); |
---|
148 | CArray<int,1> tmp(month_lengths, shape(extent[0]), neverDeleteData); |
---|
149 | tmp=calendar_wrapper_hdl->month_lengths.getInheritedValue(); |
---|
150 | CTimer::get("XIOS").suspend(); |
---|
151 | } |
---|
152 | |
---|
153 | bool cxios_is_defined_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
154 | { |
---|
155 | CTimer::get("XIOS").resume(); |
---|
156 | bool isDefined = calendar_wrapper_hdl->month_lengths.hasInheritedValue(); |
---|
157 | CTimer::get("XIOS").suspend(); |
---|
158 | return isDefined; |
---|
159 | } |
---|
160 | |
---|
161 | |
---|
162 | void cxios_set_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * start_date, int start_date_size) |
---|
163 | { |
---|
164 | std::string start_date_str; |
---|
165 | if (!cstr2string(start_date, start_date_size, start_date_str)) return; |
---|
166 | CTimer::get("XIOS").resume(); |
---|
167 | calendar_wrapper_hdl->start_date.setValue(start_date_str); |
---|
168 | CTimer::get("XIOS").suspend(); |
---|
169 | } |
---|
170 | |
---|
171 | void cxios_get_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, char * start_date, int start_date_size) |
---|
172 | { |
---|
173 | CTimer::get("XIOS").resume(); |
---|
174 | if (!string_copy(calendar_wrapper_hdl->start_date.getInheritedValue(), start_date, start_date_size)) |
---|
175 | ERROR("void cxios_get_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, char * start_date, int start_date_size)", << "Input string is too short"); |
---|
176 | CTimer::get("XIOS").suspend(); |
---|
177 | } |
---|
178 | |
---|
179 | bool cxios_is_defined_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
180 | { |
---|
181 | CTimer::get("XIOS").resume(); |
---|
182 | bool isDefined = calendar_wrapper_hdl->start_date.hasInheritedValue(); |
---|
183 | CTimer::get("XIOS").suspend(); |
---|
184 | return isDefined; |
---|
185 | } |
---|
186 | |
---|
187 | |
---|
188 | void cxios_set_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * time_origin, int time_origin_size) |
---|
189 | { |
---|
190 | std::string time_origin_str; |
---|
191 | if (!cstr2string(time_origin, time_origin_size, time_origin_str)) return; |
---|
192 | CTimer::get("XIOS").resume(); |
---|
193 | calendar_wrapper_hdl->time_origin.setValue(time_origin_str); |
---|
194 | CTimer::get("XIOS").suspend(); |
---|
195 | } |
---|
196 | |
---|
197 | void cxios_get_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, char * time_origin, int time_origin_size) |
---|
198 | { |
---|
199 | CTimer::get("XIOS").resume(); |
---|
200 | if (!string_copy(calendar_wrapper_hdl->time_origin.getInheritedValue(), time_origin, time_origin_size)) |
---|
201 | ERROR("void cxios_get_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, char * time_origin, int time_origin_size)", << "Input string is too short"); |
---|
202 | CTimer::get("XIOS").suspend(); |
---|
203 | } |
---|
204 | |
---|
205 | bool cxios_is_defined_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
206 | { |
---|
207 | CTimer::get("XIOS").resume(); |
---|
208 | bool isDefined = calendar_wrapper_hdl->time_origin.hasInheritedValue(); |
---|
209 | CTimer::get("XIOS").suspend(); |
---|
210 | return isDefined; |
---|
211 | } |
---|
212 | |
---|
213 | |
---|
214 | void cxios_set_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl, cxios_duration timestep_c) |
---|
215 | { |
---|
216 | CTimer::get("XIOS").resume(); |
---|
217 | calendar_wrapper_hdl->timestep.allocate(); |
---|
218 | CDuration& timestep = calendar_wrapper_hdl->timestep.get(); |
---|
219 | timestep.year = timestep_c.year; |
---|
220 | timestep.month = timestep_c.month; |
---|
221 | timestep.day = timestep_c.day; |
---|
222 | timestep.hour = timestep_c.hour; |
---|
223 | timestep.minute = timestep_c.minute; |
---|
224 | timestep.second = timestep_c.second; |
---|
225 | timestep.timestep = timestep_c.timestep; |
---|
226 | CTimer::get("XIOS").suspend(); |
---|
227 | } |
---|
228 | |
---|
229 | void cxios_get_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl, cxios_duration* timestep_c) |
---|
230 | { |
---|
231 | CTimer::get("XIOS").resume(); |
---|
232 | CDuration timestep = calendar_wrapper_hdl->timestep.getInheritedValue(); |
---|
233 | timestep_c->year = timestep.year; |
---|
234 | timestep_c->month = timestep.month; |
---|
235 | timestep_c->day = timestep.day; |
---|
236 | timestep_c->hour = timestep.hour; |
---|
237 | timestep_c->minute = timestep.minute; |
---|
238 | timestep_c->second = timestep.second; |
---|
239 | timestep_c->timestep = timestep.timestep; |
---|
240 | CTimer::get("XIOS").suspend(); |
---|
241 | } |
---|
242 | |
---|
243 | bool cxios_is_defined_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
244 | { |
---|
245 | CTimer::get("XIOS").resume(); |
---|
246 | bool isDefined = calendar_wrapper_hdl->timestep.hasInheritedValue(); |
---|
247 | CTimer::get("XIOS").suspend(); |
---|
248 | return isDefined; |
---|
249 | } |
---|
250 | |
---|
251 | |
---|
252 | void cxios_set_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * type, int type_size) |
---|
253 | { |
---|
254 | std::string type_str; |
---|
255 | if (!cstr2string(type, type_size, type_str)) return; |
---|
256 | CTimer::get("XIOS").resume(); |
---|
257 | calendar_wrapper_hdl->type.fromString(type_str); |
---|
258 | CTimer::get("XIOS").suspend(); |
---|
259 | } |
---|
260 | |
---|
261 | void cxios_get_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, char * type, int type_size) |
---|
262 | { |
---|
263 | CTimer::get("XIOS").resume(); |
---|
264 | if (!string_copy(calendar_wrapper_hdl->type.getInheritedStringValue(), type, type_size)) |
---|
265 | ERROR("void cxios_get_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, char * type, int type_size)", << "Input string is too short"); |
---|
266 | CTimer::get("XIOS").suspend(); |
---|
267 | } |
---|
268 | |
---|
269 | bool cxios_is_defined_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
270 | { |
---|
271 | CTimer::get("XIOS").resume(); |
---|
272 | bool isDefined = calendar_wrapper_hdl->type.hasInheritedValue(); |
---|
273 | CTimer::get("XIOS").suspend(); |
---|
274 | return isDefined; |
---|
275 | } |
---|
276 | |
---|
277 | |
---|
278 | void cxios_set_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int year_length) |
---|
279 | { |
---|
280 | CTimer::get("XIOS").resume(); |
---|
281 | calendar_wrapper_hdl->year_length.setValue(year_length); |
---|
282 | CTimer::get("XIOS").suspend(); |
---|
283 | } |
---|
284 | |
---|
285 | void cxios_get_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int* year_length) |
---|
286 | { |
---|
287 | CTimer::get("XIOS").resume(); |
---|
288 | *year_length = calendar_wrapper_hdl->year_length.getInheritedValue(); |
---|
289 | CTimer::get("XIOS").suspend(); |
---|
290 | } |
---|
291 | |
---|
292 | bool cxios_is_defined_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
293 | { |
---|
294 | CTimer::get("XIOS").resume(); |
---|
295 | bool isDefined = calendar_wrapper_hdl->year_length.hasInheritedValue(); |
---|
296 | CTimer::get("XIOS").suspend(); |
---|
297 | return isDefined; |
---|
298 | } |
---|
299 | } |
---|