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