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::CFile* file_Ptr; |
---|
19 | |
---|
20 | void cxios_set_file_append(file_Ptr file_hdl, bool append) |
---|
21 | { |
---|
22 | CTimer::get("XIOS").resume(); |
---|
23 | file_hdl->append.setValue(append); |
---|
24 | CTimer::get("XIOS").suspend(); |
---|
25 | } |
---|
26 | |
---|
27 | void cxios_get_file_append(file_Ptr file_hdl, bool* append) |
---|
28 | { |
---|
29 | CTimer::get("XIOS").resume(); |
---|
30 | *append = file_hdl->append.getInheritedValue(); |
---|
31 | CTimer::get("XIOS").suspend(); |
---|
32 | } |
---|
33 | |
---|
34 | bool cxios_is_defined_file_append(file_Ptr file_hdl) |
---|
35 | { |
---|
36 | CTimer::get("XIOS").resume(); |
---|
37 | bool isDefined = file_hdl->append.hasInheritedValue(); |
---|
38 | CTimer::get("XIOS").suspend(); |
---|
39 | return isDefined; |
---|
40 | } |
---|
41 | |
---|
42 | |
---|
43 | void cxios_set_file_compression_level(file_Ptr file_hdl, int compression_level) |
---|
44 | { |
---|
45 | CTimer::get("XIOS").resume(); |
---|
46 | file_hdl->compression_level.setValue(compression_level); |
---|
47 | CTimer::get("XIOS").suspend(); |
---|
48 | } |
---|
49 | |
---|
50 | void cxios_get_file_compression_level(file_Ptr file_hdl, int* compression_level) |
---|
51 | { |
---|
52 | CTimer::get("XIOS").resume(); |
---|
53 | *compression_level = file_hdl->compression_level.getInheritedValue(); |
---|
54 | CTimer::get("XIOS").suspend(); |
---|
55 | } |
---|
56 | |
---|
57 | bool cxios_is_defined_file_compression_level(file_Ptr file_hdl) |
---|
58 | { |
---|
59 | CTimer::get("XIOS").resume(); |
---|
60 | bool isDefined = file_hdl->compression_level.hasInheritedValue(); |
---|
61 | CTimer::get("XIOS").suspend(); |
---|
62 | return isDefined; |
---|
63 | } |
---|
64 | |
---|
65 | |
---|
66 | void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size) |
---|
67 | { |
---|
68 | std::string description_str; |
---|
69 | if (!cstr2string(description, description_size, description_str)) return; |
---|
70 | CTimer::get("XIOS").resume(); |
---|
71 | file_hdl->description.setValue(description_str); |
---|
72 | CTimer::get("XIOS").suspend(); |
---|
73 | } |
---|
74 | |
---|
75 | void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size) |
---|
76 | { |
---|
77 | CTimer::get("XIOS").resume(); |
---|
78 | if (!string_copy(file_hdl->description.getInheritedValue(), description, description_size)) |
---|
79 | ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", << "Input string is too short"); |
---|
80 | CTimer::get("XIOS").suspend(); |
---|
81 | } |
---|
82 | |
---|
83 | bool cxios_is_defined_file_description(file_Ptr file_hdl) |
---|
84 | { |
---|
85 | CTimer::get("XIOS").resume(); |
---|
86 | bool isDefined = file_hdl->description.hasInheritedValue(); |
---|
87 | CTimer::get("XIOS").suspend(); |
---|
88 | return isDefined; |
---|
89 | } |
---|
90 | |
---|
91 | |
---|
92 | void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled) |
---|
93 | { |
---|
94 | CTimer::get("XIOS").resume(); |
---|
95 | file_hdl->enabled.setValue(enabled); |
---|
96 | CTimer::get("XIOS").suspend(); |
---|
97 | } |
---|
98 | |
---|
99 | void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled) |
---|
100 | { |
---|
101 | CTimer::get("XIOS").resume(); |
---|
102 | *enabled = file_hdl->enabled.getInheritedValue(); |
---|
103 | CTimer::get("XIOS").suspend(); |
---|
104 | } |
---|
105 | |
---|
106 | bool cxios_is_defined_file_enabled(file_Ptr file_hdl) |
---|
107 | { |
---|
108 | CTimer::get("XIOS").resume(); |
---|
109 | bool isDefined = file_hdl->enabled.hasInheritedValue(); |
---|
110 | CTimer::get("XIOS").suspend(); |
---|
111 | return isDefined; |
---|
112 | } |
---|
113 | |
---|
114 | |
---|
115 | void cxios_set_file_format(file_Ptr file_hdl, const char * format, int format_size) |
---|
116 | { |
---|
117 | std::string format_str; |
---|
118 | if (!cstr2string(format, format_size, format_str)) return; |
---|
119 | CTimer::get("XIOS").resume(); |
---|
120 | file_hdl->format.fromString(format_str); |
---|
121 | CTimer::get("XIOS").suspend(); |
---|
122 | } |
---|
123 | |
---|
124 | void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size) |
---|
125 | { |
---|
126 | CTimer::get("XIOS").resume(); |
---|
127 | if (!string_copy(file_hdl->format.getInheritedStringValue(), format, format_size)) |
---|
128 | ERROR("void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size)", << "Input string is too short"); |
---|
129 | CTimer::get("XIOS").suspend(); |
---|
130 | } |
---|
131 | |
---|
132 | bool cxios_is_defined_file_format(file_Ptr file_hdl) |
---|
133 | { |
---|
134 | CTimer::get("XIOS").resume(); |
---|
135 | bool isDefined = file_hdl->format.hasInheritedValue(); |
---|
136 | CTimer::get("XIOS").suspend(); |
---|
137 | return isDefined; |
---|
138 | } |
---|
139 | |
---|
140 | |
---|
141 | void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits) |
---|
142 | { |
---|
143 | CTimer::get("XIOS").resume(); |
---|
144 | file_hdl->min_digits.setValue(min_digits); |
---|
145 | CTimer::get("XIOS").suspend(); |
---|
146 | } |
---|
147 | |
---|
148 | void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits) |
---|
149 | { |
---|
150 | CTimer::get("XIOS").resume(); |
---|
151 | *min_digits = file_hdl->min_digits.getInheritedValue(); |
---|
152 | CTimer::get("XIOS").suspend(); |
---|
153 | } |
---|
154 | |
---|
155 | bool cxios_is_defined_file_min_digits(file_Ptr file_hdl) |
---|
156 | { |
---|
157 | CTimer::get("XIOS").resume(); |
---|
158 | bool isDefined = file_hdl->min_digits.hasInheritedValue(); |
---|
159 | CTimer::get("XIOS").suspend(); |
---|
160 | return isDefined; |
---|
161 | } |
---|
162 | |
---|
163 | |
---|
164 | void cxios_set_file_mode(file_Ptr file_hdl, const char * mode, int mode_size) |
---|
165 | { |
---|
166 | std::string mode_str; |
---|
167 | if (!cstr2string(mode, mode_size, mode_str)) return; |
---|
168 | CTimer::get("XIOS").resume(); |
---|
169 | file_hdl->mode.fromString(mode_str); |
---|
170 | CTimer::get("XIOS").suspend(); |
---|
171 | } |
---|
172 | |
---|
173 | void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size) |
---|
174 | { |
---|
175 | CTimer::get("XIOS").resume(); |
---|
176 | if (!string_copy(file_hdl->mode.getInheritedStringValue(), mode, mode_size)) |
---|
177 | ERROR("void cxios_get_file_mode(file_Ptr file_hdl, char * mode, int mode_size)", << "Input string is too short"); |
---|
178 | CTimer::get("XIOS").suspend(); |
---|
179 | } |
---|
180 | |
---|
181 | bool cxios_is_defined_file_mode(file_Ptr file_hdl) |
---|
182 | { |
---|
183 | CTimer::get("XIOS").resume(); |
---|
184 | bool isDefined = file_hdl->mode.hasInheritedValue(); |
---|
185 | CTimer::get("XIOS").suspend(); |
---|
186 | return isDefined; |
---|
187 | } |
---|
188 | |
---|
189 | |
---|
190 | void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size) |
---|
191 | { |
---|
192 | std::string name_str; |
---|
193 | if (!cstr2string(name, name_size, name_str)) return; |
---|
194 | CTimer::get("XIOS").resume(); |
---|
195 | file_hdl->name.setValue(name_str); |
---|
196 | CTimer::get("XIOS").suspend(); |
---|
197 | } |
---|
198 | |
---|
199 | void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size) |
---|
200 | { |
---|
201 | CTimer::get("XIOS").resume(); |
---|
202 | if (!string_copy(file_hdl->name.getInheritedValue(), name, name_size)) |
---|
203 | ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", << "Input string is too short"); |
---|
204 | CTimer::get("XIOS").suspend(); |
---|
205 | } |
---|
206 | |
---|
207 | bool cxios_is_defined_file_name(file_Ptr file_hdl) |
---|
208 | { |
---|
209 | CTimer::get("XIOS").resume(); |
---|
210 | bool isDefined = file_hdl->name.hasInheritedValue(); |
---|
211 | CTimer::get("XIOS").suspend(); |
---|
212 | return isDefined; |
---|
213 | } |
---|
214 | |
---|
215 | |
---|
216 | void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size) |
---|
217 | { |
---|
218 | std::string name_suffix_str; |
---|
219 | if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return; |
---|
220 | CTimer::get("XIOS").resume(); |
---|
221 | file_hdl->name_suffix.setValue(name_suffix_str); |
---|
222 | CTimer::get("XIOS").suspend(); |
---|
223 | } |
---|
224 | |
---|
225 | void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size) |
---|
226 | { |
---|
227 | CTimer::get("XIOS").resume(); |
---|
228 | if (!string_copy(file_hdl->name_suffix.getInheritedValue(), name_suffix, name_suffix_size)) |
---|
229 | ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", << "Input string is too short"); |
---|
230 | CTimer::get("XIOS").suspend(); |
---|
231 | } |
---|
232 | |
---|
233 | bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl) |
---|
234 | { |
---|
235 | CTimer::get("XIOS").resume(); |
---|
236 | bool isDefined = file_hdl->name_suffix.hasInheritedValue(); |
---|
237 | CTimer::get("XIOS").suspend(); |
---|
238 | return isDefined; |
---|
239 | } |
---|
240 | |
---|
241 | |
---|
242 | void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c) |
---|
243 | { |
---|
244 | CTimer::get("XIOS").resume(); |
---|
245 | file_hdl->output_freq.allocate(); |
---|
246 | CDuration& output_freq = file_hdl->output_freq.get(); |
---|
247 | output_freq.year = output_freq_c.year; |
---|
248 | output_freq.month = output_freq_c.month; |
---|
249 | output_freq.day = output_freq_c.day; |
---|
250 | output_freq.hour = output_freq_c.hour; |
---|
251 | output_freq.minute = output_freq_c.minute; |
---|
252 | output_freq.second = output_freq_c.second; |
---|
253 | output_freq.timestep = output_freq_c.timestep; |
---|
254 | CTimer::get("XIOS").suspend(); |
---|
255 | } |
---|
256 | |
---|
257 | void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c) |
---|
258 | { |
---|
259 | CTimer::get("XIOS").resume(); |
---|
260 | CDuration output_freq = file_hdl->output_freq.getInheritedValue(); |
---|
261 | output_freq_c->year = output_freq.year; |
---|
262 | output_freq_c->month = output_freq.month; |
---|
263 | output_freq_c->day = output_freq.day; |
---|
264 | output_freq_c->hour = output_freq.hour; |
---|
265 | output_freq_c->minute = output_freq.minute; |
---|
266 | output_freq_c->second = output_freq.second; |
---|
267 | output_freq_c->timestep = output_freq.timestep; |
---|
268 | CTimer::get("XIOS").suspend(); |
---|
269 | } |
---|
270 | |
---|
271 | bool cxios_is_defined_file_output_freq(file_Ptr file_hdl) |
---|
272 | { |
---|
273 | CTimer::get("XIOS").resume(); |
---|
274 | bool isDefined = file_hdl->output_freq.hasInheritedValue(); |
---|
275 | CTimer::get("XIOS").suspend(); |
---|
276 | return isDefined; |
---|
277 | } |
---|
278 | |
---|
279 | |
---|
280 | void cxios_set_file_output_level(file_Ptr file_hdl, int output_level) |
---|
281 | { |
---|
282 | CTimer::get("XIOS").resume(); |
---|
283 | file_hdl->output_level.setValue(output_level); |
---|
284 | CTimer::get("XIOS").suspend(); |
---|
285 | } |
---|
286 | |
---|
287 | void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level) |
---|
288 | { |
---|
289 | CTimer::get("XIOS").resume(); |
---|
290 | *output_level = file_hdl->output_level.getInheritedValue(); |
---|
291 | CTimer::get("XIOS").suspend(); |
---|
292 | } |
---|
293 | |
---|
294 | bool cxios_is_defined_file_output_level(file_Ptr file_hdl) |
---|
295 | { |
---|
296 | CTimer::get("XIOS").resume(); |
---|
297 | bool isDefined = file_hdl->output_level.hasInheritedValue(); |
---|
298 | CTimer::get("XIOS").suspend(); |
---|
299 | return isDefined; |
---|
300 | } |
---|
301 | |
---|
302 | |
---|
303 | void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size) |
---|
304 | { |
---|
305 | std::string par_access_str; |
---|
306 | if (!cstr2string(par_access, par_access_size, par_access_str)) return; |
---|
307 | CTimer::get("XIOS").resume(); |
---|
308 | file_hdl->par_access.fromString(par_access_str); |
---|
309 | CTimer::get("XIOS").suspend(); |
---|
310 | } |
---|
311 | |
---|
312 | void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size) |
---|
313 | { |
---|
314 | CTimer::get("XIOS").resume(); |
---|
315 | if (!string_copy(file_hdl->par_access.getInheritedStringValue(), par_access, par_access_size)) |
---|
316 | ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", << "Input string is too short"); |
---|
317 | CTimer::get("XIOS").suspend(); |
---|
318 | } |
---|
319 | |
---|
320 | bool cxios_is_defined_file_par_access(file_Ptr file_hdl) |
---|
321 | { |
---|
322 | CTimer::get("XIOS").resume(); |
---|
323 | bool isDefined = file_hdl->par_access.hasInheritedValue(); |
---|
324 | CTimer::get("XIOS").suspend(); |
---|
325 | return isDefined; |
---|
326 | } |
---|
327 | |
---|
328 | |
---|
329 | void cxios_set_file_record_offset(file_Ptr file_hdl, int record_offset) |
---|
330 | { |
---|
331 | CTimer::get("XIOS").resume(); |
---|
332 | file_hdl->record_offset.setValue(record_offset); |
---|
333 | CTimer::get("XIOS").suspend(); |
---|
334 | } |
---|
335 | |
---|
336 | void cxios_get_file_record_offset(file_Ptr file_hdl, int* record_offset) |
---|
337 | { |
---|
338 | CTimer::get("XIOS").resume(); |
---|
339 | *record_offset = file_hdl->record_offset.getInheritedValue(); |
---|
340 | CTimer::get("XIOS").suspend(); |
---|
341 | } |
---|
342 | |
---|
343 | bool cxios_is_defined_file_record_offset(file_Ptr file_hdl) |
---|
344 | { |
---|
345 | CTimer::get("XIOS").resume(); |
---|
346 | bool isDefined = file_hdl->record_offset.hasInheritedValue(); |
---|
347 | CTimer::get("XIOS").suspend(); |
---|
348 | return isDefined; |
---|
349 | } |
---|
350 | |
---|
351 | |
---|
352 | void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c) |
---|
353 | { |
---|
354 | CTimer::get("XIOS").resume(); |
---|
355 | file_hdl->split_freq.allocate(); |
---|
356 | CDuration& split_freq = file_hdl->split_freq.get(); |
---|
357 | split_freq.year = split_freq_c.year; |
---|
358 | split_freq.month = split_freq_c.month; |
---|
359 | split_freq.day = split_freq_c.day; |
---|
360 | split_freq.hour = split_freq_c.hour; |
---|
361 | split_freq.minute = split_freq_c.minute; |
---|
362 | split_freq.second = split_freq_c.second; |
---|
363 | split_freq.timestep = split_freq_c.timestep; |
---|
364 | CTimer::get("XIOS").suspend(); |
---|
365 | } |
---|
366 | |
---|
367 | void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c) |
---|
368 | { |
---|
369 | CTimer::get("XIOS").resume(); |
---|
370 | CDuration split_freq = file_hdl->split_freq.getInheritedValue(); |
---|
371 | split_freq_c->year = split_freq.year; |
---|
372 | split_freq_c->month = split_freq.month; |
---|
373 | split_freq_c->day = split_freq.day; |
---|
374 | split_freq_c->hour = split_freq.hour; |
---|
375 | split_freq_c->minute = split_freq.minute; |
---|
376 | split_freq_c->second = split_freq.second; |
---|
377 | split_freq_c->timestep = split_freq.timestep; |
---|
378 | CTimer::get("XIOS").suspend(); |
---|
379 | } |
---|
380 | |
---|
381 | bool cxios_is_defined_file_split_freq(file_Ptr file_hdl) |
---|
382 | { |
---|
383 | CTimer::get("XIOS").resume(); |
---|
384 | bool isDefined = file_hdl->split_freq.hasInheritedValue(); |
---|
385 | CTimer::get("XIOS").suspend(); |
---|
386 | return isDefined; |
---|
387 | } |
---|
388 | |
---|
389 | |
---|
390 | void cxios_set_file_split_freq_format(file_Ptr file_hdl, const char * split_freq_format, int split_freq_format_size) |
---|
391 | { |
---|
392 | std::string split_freq_format_str; |
---|
393 | if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return; |
---|
394 | CTimer::get("XIOS").resume(); |
---|
395 | file_hdl->split_freq_format.setValue(split_freq_format_str); |
---|
396 | CTimer::get("XIOS").suspend(); |
---|
397 | } |
---|
398 | |
---|
399 | void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size) |
---|
400 | { |
---|
401 | CTimer::get("XIOS").resume(); |
---|
402 | if (!string_copy(file_hdl->split_freq_format.getInheritedValue(), split_freq_format, split_freq_format_size)) |
---|
403 | ERROR("void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size)", << "Input string is too short"); |
---|
404 | CTimer::get("XIOS").suspend(); |
---|
405 | } |
---|
406 | |
---|
407 | bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl) |
---|
408 | { |
---|
409 | CTimer::get("XIOS").resume(); |
---|
410 | bool isDefined = file_hdl->split_freq_format.hasInheritedValue(); |
---|
411 | CTimer::get("XIOS").suspend(); |
---|
412 | return isDefined; |
---|
413 | } |
---|
414 | |
---|
415 | |
---|
416 | void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c) |
---|
417 | { |
---|
418 | CTimer::get("XIOS").resume(); |
---|
419 | file_hdl->sync_freq.allocate(); |
---|
420 | CDuration& sync_freq = file_hdl->sync_freq.get(); |
---|
421 | sync_freq.year = sync_freq_c.year; |
---|
422 | sync_freq.month = sync_freq_c.month; |
---|
423 | sync_freq.day = sync_freq_c.day; |
---|
424 | sync_freq.hour = sync_freq_c.hour; |
---|
425 | sync_freq.minute = sync_freq_c.minute; |
---|
426 | sync_freq.second = sync_freq_c.second; |
---|
427 | sync_freq.timestep = sync_freq_c.timestep; |
---|
428 | CTimer::get("XIOS").suspend(); |
---|
429 | } |
---|
430 | |
---|
431 | void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c) |
---|
432 | { |
---|
433 | CTimer::get("XIOS").resume(); |
---|
434 | CDuration sync_freq = file_hdl->sync_freq.getInheritedValue(); |
---|
435 | sync_freq_c->year = sync_freq.year; |
---|
436 | sync_freq_c->month = sync_freq.month; |
---|
437 | sync_freq_c->day = sync_freq.day; |
---|
438 | sync_freq_c->hour = sync_freq.hour; |
---|
439 | sync_freq_c->minute = sync_freq.minute; |
---|
440 | sync_freq_c->second = sync_freq.second; |
---|
441 | sync_freq_c->timestep = sync_freq.timestep; |
---|
442 | CTimer::get("XIOS").suspend(); |
---|
443 | } |
---|
444 | |
---|
445 | bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl) |
---|
446 | { |
---|
447 | CTimer::get("XIOS").resume(); |
---|
448 | bool isDefined = file_hdl->sync_freq.hasInheritedValue(); |
---|
449 | CTimer::get("XIOS").suspend(); |
---|
450 | return isDefined; |
---|
451 | } |
---|
452 | |
---|
453 | |
---|
454 | void cxios_set_file_time_counter(file_Ptr file_hdl, const char * time_counter, int time_counter_size) |
---|
455 | { |
---|
456 | std::string time_counter_str; |
---|
457 | if (!cstr2string(time_counter, time_counter_size, time_counter_str)) return; |
---|
458 | CTimer::get("XIOS").resume(); |
---|
459 | file_hdl->time_counter.fromString(time_counter_str); |
---|
460 | CTimer::get("XIOS").suspend(); |
---|
461 | } |
---|
462 | |
---|
463 | void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size) |
---|
464 | { |
---|
465 | CTimer::get("XIOS").resume(); |
---|
466 | if (!string_copy(file_hdl->time_counter.getInheritedStringValue(), time_counter, time_counter_size)) |
---|
467 | ERROR("void cxios_get_file_time_counter(file_Ptr file_hdl, char * time_counter, int time_counter_size)", << "Input string is too short"); |
---|
468 | CTimer::get("XIOS").suspend(); |
---|
469 | } |
---|
470 | |
---|
471 | bool cxios_is_defined_file_time_counter(file_Ptr file_hdl) |
---|
472 | { |
---|
473 | CTimer::get("XIOS").resume(); |
---|
474 | bool isDefined = file_hdl->time_counter.hasInheritedValue(); |
---|
475 | CTimer::get("XIOS").suspend(); |
---|
476 | return isDefined; |
---|
477 | } |
---|
478 | |
---|
479 | |
---|
480 | void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size) |
---|
481 | { |
---|
482 | std::string timeseries_str; |
---|
483 | if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return; |
---|
484 | CTimer::get("XIOS").resume(); |
---|
485 | file_hdl->timeseries.fromString(timeseries_str); |
---|
486 | CTimer::get("XIOS").suspend(); |
---|
487 | } |
---|
488 | |
---|
489 | void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size) |
---|
490 | { |
---|
491 | CTimer::get("XIOS").resume(); |
---|
492 | if (!string_copy(file_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size)) |
---|
493 | ERROR("void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)", << "Input string is too short"); |
---|
494 | CTimer::get("XIOS").suspend(); |
---|
495 | } |
---|
496 | |
---|
497 | bool cxios_is_defined_file_timeseries(file_Ptr file_hdl) |
---|
498 | { |
---|
499 | CTimer::get("XIOS").resume(); |
---|
500 | bool isDefined = file_hdl->timeseries.hasInheritedValue(); |
---|
501 | CTimer::get("XIOS").suspend(); |
---|
502 | return isDefined; |
---|
503 | } |
---|
504 | |
---|
505 | |
---|
506 | void cxios_set_file_ts_prefix(file_Ptr file_hdl, const char * ts_prefix, int ts_prefix_size) |
---|
507 | { |
---|
508 | std::string ts_prefix_str; |
---|
509 | if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return; |
---|
510 | CTimer::get("XIOS").resume(); |
---|
511 | file_hdl->ts_prefix.setValue(ts_prefix_str); |
---|
512 | CTimer::get("XIOS").suspend(); |
---|
513 | } |
---|
514 | |
---|
515 | void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size) |
---|
516 | { |
---|
517 | CTimer::get("XIOS").resume(); |
---|
518 | if (!string_copy(file_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size)) |
---|
519 | ERROR("void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short"); |
---|
520 | CTimer::get("XIOS").suspend(); |
---|
521 | } |
---|
522 | |
---|
523 | bool cxios_is_defined_file_ts_prefix(file_Ptr file_hdl) |
---|
524 | { |
---|
525 | CTimer::get("XIOS").resume(); |
---|
526 | bool isDefined = file_hdl->ts_prefix.hasInheritedValue(); |
---|
527 | CTimer::get("XIOS").suspend(); |
---|
528 | return isDefined; |
---|
529 | } |
---|
530 | |
---|
531 | |
---|
532 | void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size) |
---|
533 | { |
---|
534 | std::string type_str; |
---|
535 | if (!cstr2string(type, type_size, type_str)) return; |
---|
536 | CTimer::get("XIOS").resume(); |
---|
537 | file_hdl->type.fromString(type_str); |
---|
538 | CTimer::get("XIOS").suspend(); |
---|
539 | } |
---|
540 | |
---|
541 | void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size) |
---|
542 | { |
---|
543 | CTimer::get("XIOS").resume(); |
---|
544 | if (!string_copy(file_hdl->type.getInheritedStringValue(), type, type_size)) |
---|
545 | ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", << "Input string is too short"); |
---|
546 | CTimer::get("XIOS").suspend(); |
---|
547 | } |
---|
548 | |
---|
549 | bool cxios_is_defined_file_type(file_Ptr file_hdl) |
---|
550 | { |
---|
551 | CTimer::get("XIOS").resume(); |
---|
552 | bool isDefined = file_hdl->type.hasInheritedValue(); |
---|
553 | CTimer::get("XIOS").suspend(); |
---|
554 | return isDefined; |
---|
555 | } |
---|
556 | } |
---|