[325] | 1 | /* ************************************************************************** * |
---|
[581] | 2 | * Interface auto generated - do not modify * |
---|
[325] | 3 | * ************************************************************************** */ |
---|
| 4 | |
---|
| 5 | #include <boost/multi_array.hpp> |
---|
| 6 | #include <boost/shared_ptr.hpp> |
---|
[591] | 7 | #include "xios.hpp" |
---|
[352] | 8 | #include "attribute_template.hpp" |
---|
| 9 | #include "object_template.hpp" |
---|
| 10 | #include "group_template.hpp" |
---|
[325] | 11 | #include "icutil.hpp" |
---|
[532] | 12 | #include "icdate.hpp" |
---|
[347] | 13 | #include "timer.hpp" |
---|
[369] | 14 | #include "node_type.hpp" |
---|
[325] | 15 | |
---|
| 16 | extern "C" |
---|
| 17 | { |
---|
[581] | 18 | typedef xios::CFile* file_Ptr; |
---|
| 19 | |
---|
[528] | 20 | void cxios_set_file_append(file_Ptr file_hdl, bool append) |
---|
| 21 | { |
---|
[581] | 22 | CTimer::get("XIOS").resume(); |
---|
[528] | 23 | file_hdl->append.setValue(append); |
---|
[581] | 24 | CTimer::get("XIOS").suspend(); |
---|
[528] | 25 | } |
---|
[581] | 26 | |
---|
[528] | 27 | void cxios_get_file_append(file_Ptr file_hdl, bool* append) |
---|
| 28 | { |
---|
[581] | 29 | CTimer::get("XIOS").resume(); |
---|
[528] | 30 | *append = file_hdl->append.getInheritedValue(); |
---|
[581] | 31 | CTimer::get("XIOS").suspend(); |
---|
[528] | 32 | } |
---|
[581] | 33 | |
---|
| 34 | bool cxios_is_defined_file_append(file_Ptr file_hdl) |
---|
[528] | 35 | { |
---|
| 36 | CTimer::get("XIOS").resume(); |
---|
[581] | 37 | bool isDefined = file_hdl->append.hasInheritedValue(); |
---|
[528] | 38 | CTimer::get("XIOS").suspend(); |
---|
[581] | 39 | return isDefined; |
---|
[528] | 40 | } |
---|
[581] | 41 | |
---|
| 42 | |
---|
[608] | 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 | |
---|
[325] | 66 | void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size) |
---|
| 67 | { |
---|
| 68 | std::string description_str; |
---|
[581] | 69 | if (!cstr2string(description, description_size, description_str)) return; |
---|
| 70 | CTimer::get("XIOS").resume(); |
---|
[325] | 71 | file_hdl->description.setValue(description_str); |
---|
[581] | 72 | CTimer::get("XIOS").suspend(); |
---|
[325] | 73 | } |
---|
[581] | 74 | |
---|
[325] | 75 | void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size) |
---|
| 76 | { |
---|
[581] | 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(); |
---|
[325] | 81 | } |
---|
[581] | 82 | |
---|
| 83 | bool cxios_is_defined_file_description(file_Ptr file_hdl) |
---|
[432] | 84 | { |
---|
| 85 | CTimer::get("XIOS").resume(); |
---|
[581] | 86 | bool isDefined = file_hdl->description.hasInheritedValue(); |
---|
[432] | 87 | CTimer::get("XIOS").suspend(); |
---|
[581] | 88 | return isDefined; |
---|
[432] | 89 | } |
---|
[581] | 90 | |
---|
| 91 | |
---|
[325] | 92 | void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled) |
---|
| 93 | { |
---|
[581] | 94 | CTimer::get("XIOS").resume(); |
---|
[325] | 95 | file_hdl->enabled.setValue(enabled); |
---|
[581] | 96 | CTimer::get("XIOS").suspend(); |
---|
[325] | 97 | } |
---|
[581] | 98 | |
---|
[325] | 99 | void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled) |
---|
| 100 | { |
---|
[581] | 101 | CTimer::get("XIOS").resume(); |
---|
[445] | 102 | *enabled = file_hdl->enabled.getInheritedValue(); |
---|
[581] | 103 | CTimer::get("XIOS").suspend(); |
---|
[325] | 104 | } |
---|
[581] | 105 | |
---|
| 106 | bool cxios_is_defined_file_enabled(file_Ptr file_hdl) |
---|
[432] | 107 | { |
---|
| 108 | CTimer::get("XIOS").resume(); |
---|
[581] | 109 | bool isDefined = file_hdl->enabled.hasInheritedValue(); |
---|
[432] | 110 | CTimer::get("XIOS").suspend(); |
---|
[581] | 111 | return isDefined; |
---|
[432] | 112 | } |
---|
[581] | 113 | |
---|
| 114 | |
---|
[517] | 115 | void cxios_set_file_format(file_Ptr file_hdl, const char * format, int format_size) |
---|
| 116 | { |
---|
| 117 | std::string format_str; |
---|
[581] | 118 | if (!cstr2string(format, format_size, format_str)) return; |
---|
| 119 | CTimer::get("XIOS").resume(); |
---|
[517] | 120 | file_hdl->format.fromString(format_str); |
---|
[581] | 121 | CTimer::get("XIOS").suspend(); |
---|
[517] | 122 | } |
---|
[581] | 123 | |
---|
[517] | 124 | void cxios_get_file_format(file_Ptr file_hdl, char * format, int format_size) |
---|
| 125 | { |
---|
[581] | 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(); |
---|
[517] | 130 | } |
---|
[581] | 131 | |
---|
| 132 | bool cxios_is_defined_file_format(file_Ptr file_hdl) |
---|
[517] | 133 | { |
---|
| 134 | CTimer::get("XIOS").resume(); |
---|
[581] | 135 | bool isDefined = file_hdl->format.hasInheritedValue(); |
---|
[517] | 136 | CTimer::get("XIOS").suspend(); |
---|
[581] | 137 | return isDefined; |
---|
[517] | 138 | } |
---|
[581] | 139 | |
---|
| 140 | |
---|
[415] | 141 | void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits) |
---|
| 142 | { |
---|
[581] | 143 | CTimer::get("XIOS").resume(); |
---|
[415] | 144 | file_hdl->min_digits.setValue(min_digits); |
---|
[581] | 145 | CTimer::get("XIOS").suspend(); |
---|
[415] | 146 | } |
---|
[581] | 147 | |
---|
[415] | 148 | void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits) |
---|
| 149 | { |
---|
[581] | 150 | CTimer::get("XIOS").resume(); |
---|
[445] | 151 | *min_digits = file_hdl->min_digits.getInheritedValue(); |
---|
[581] | 152 | CTimer::get("XIOS").suspend(); |
---|
[415] | 153 | } |
---|
[581] | 154 | |
---|
| 155 | bool cxios_is_defined_file_min_digits(file_Ptr file_hdl) |
---|
[432] | 156 | { |
---|
| 157 | CTimer::get("XIOS").resume(); |
---|
[581] | 158 | bool isDefined = file_hdl->min_digits.hasInheritedValue(); |
---|
[432] | 159 | CTimer::get("XIOS").suspend(); |
---|
[581] | 160 | return isDefined; |
---|
[432] | 161 | } |
---|
[581] | 162 | |
---|
| 163 | |
---|
[598] | 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 | |
---|
[325] | 190 | void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size) |
---|
| 191 | { |
---|
| 192 | std::string name_str; |
---|
[581] | 193 | if (!cstr2string(name, name_size, name_str)) return; |
---|
| 194 | CTimer::get("XIOS").resume(); |
---|
[325] | 195 | file_hdl->name.setValue(name_str); |
---|
[581] | 196 | CTimer::get("XIOS").suspend(); |
---|
[325] | 197 | } |
---|
[581] | 198 | |
---|
[325] | 199 | void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size) |
---|
| 200 | { |
---|
[581] | 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(); |
---|
[325] | 205 | } |
---|
[581] | 206 | |
---|
| 207 | bool cxios_is_defined_file_name(file_Ptr file_hdl) |
---|
[432] | 208 | { |
---|
| 209 | CTimer::get("XIOS").resume(); |
---|
[581] | 210 | bool isDefined = file_hdl->name.hasInheritedValue(); |
---|
[432] | 211 | CTimer::get("XIOS").suspend(); |
---|
[581] | 212 | return isDefined; |
---|
[432] | 213 | } |
---|
[581] | 214 | |
---|
| 215 | |
---|
[325] | 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; |
---|
[581] | 219 | if (!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return; |
---|
| 220 | CTimer::get("XIOS").resume(); |
---|
[325] | 221 | file_hdl->name_suffix.setValue(name_suffix_str); |
---|
[581] | 222 | CTimer::get("XIOS").suspend(); |
---|
[325] | 223 | } |
---|
[581] | 224 | |
---|
[325] | 225 | void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size) |
---|
| 226 | { |
---|
[581] | 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(); |
---|
[325] | 231 | } |
---|
[581] | 232 | |
---|
| 233 | bool cxios_is_defined_file_name_suffix(file_Ptr file_hdl) |
---|
[432] | 234 | { |
---|
| 235 | CTimer::get("XIOS").resume(); |
---|
[581] | 236 | bool isDefined = file_hdl->name_suffix.hasInheritedValue(); |
---|
[432] | 237 | CTimer::get("XIOS").suspend(); |
---|
[581] | 238 | return isDefined; |
---|
[432] | 239 | } |
---|
[581] | 240 | |
---|
| 241 | |
---|
[538] | 242 | void cxios_set_file_output_freq(file_Ptr file_hdl, cxios_duration output_freq_c) |
---|
[325] | 243 | { |
---|
[538] | 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(); |
---|
[325] | 255 | } |
---|
[581] | 256 | |
---|
[538] | 257 | void cxios_get_file_output_freq(file_Ptr file_hdl, cxios_duration* output_freq_c) |
---|
[325] | 258 | { |
---|
[538] | 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(); |
---|
[325] | 269 | } |
---|
[581] | 270 | |
---|
| 271 | bool cxios_is_defined_file_output_freq(file_Ptr file_hdl) |
---|
[432] | 272 | { |
---|
| 273 | CTimer::get("XIOS").resume(); |
---|
[581] | 274 | bool isDefined = file_hdl->output_freq.hasInheritedValue(); |
---|
[432] | 275 | CTimer::get("XIOS").suspend(); |
---|
[581] | 276 | return isDefined; |
---|
[432] | 277 | } |
---|
[581] | 278 | |
---|
| 279 | |
---|
[325] | 280 | void cxios_set_file_output_level(file_Ptr file_hdl, int output_level) |
---|
| 281 | { |
---|
[581] | 282 | CTimer::get("XIOS").resume(); |
---|
[325] | 283 | file_hdl->output_level.setValue(output_level); |
---|
[581] | 284 | CTimer::get("XIOS").suspend(); |
---|
[325] | 285 | } |
---|
[581] | 286 | |
---|
[325] | 287 | void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level) |
---|
| 288 | { |
---|
[581] | 289 | CTimer::get("XIOS").resume(); |
---|
[445] | 290 | *output_level = file_hdl->output_level.getInheritedValue(); |
---|
[581] | 291 | CTimer::get("XIOS").suspend(); |
---|
[325] | 292 | } |
---|
[581] | 293 | |
---|
| 294 | bool cxios_is_defined_file_output_level(file_Ptr file_hdl) |
---|
[432] | 295 | { |
---|
| 296 | CTimer::get("XIOS").resume(); |
---|
[581] | 297 | bool isDefined = file_hdl->output_level.hasInheritedValue(); |
---|
[432] | 298 | CTimer::get("XIOS").suspend(); |
---|
[581] | 299 | return isDefined; |
---|
[432] | 300 | } |
---|
[581] | 301 | |
---|
| 302 | |
---|
[336] | 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; |
---|
[581] | 306 | if (!cstr2string(par_access, par_access_size, par_access_str)) return; |
---|
| 307 | CTimer::get("XIOS").resume(); |
---|
[526] | 308 | file_hdl->par_access.fromString(par_access_str); |
---|
[581] | 309 | CTimer::get("XIOS").suspend(); |
---|
[336] | 310 | } |
---|
[581] | 311 | |
---|
[336] | 312 | void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size) |
---|
| 313 | { |
---|
[581] | 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(); |
---|
[336] | 318 | } |
---|
[581] | 319 | |
---|
| 320 | bool cxios_is_defined_file_par_access(file_Ptr file_hdl) |
---|
[432] | 321 | { |
---|
| 322 | CTimer::get("XIOS").resume(); |
---|
[581] | 323 | bool isDefined = file_hdl->par_access.hasInheritedValue(); |
---|
[432] | 324 | CTimer::get("XIOS").suspend(); |
---|
[581] | 325 | return isDefined; |
---|
[432] | 326 | } |
---|
[581] | 327 | |
---|
| 328 | |
---|
[779] | 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 | |
---|
[538] | 352 | void cxios_set_file_split_freq(file_Ptr file_hdl, cxios_duration split_freq_c) |
---|
[325] | 353 | { |
---|
[538] | 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(); |
---|
[325] | 365 | } |
---|
[581] | 366 | |
---|
[538] | 367 | void cxios_get_file_split_freq(file_Ptr file_hdl, cxios_duration* split_freq_c) |
---|
[325] | 368 | { |
---|
[538] | 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(); |
---|
[325] | 379 | } |
---|
[581] | 380 | |
---|
| 381 | bool cxios_is_defined_file_split_freq(file_Ptr file_hdl) |
---|
[432] | 382 | { |
---|
| 383 | CTimer::get("XIOS").resume(); |
---|
[581] | 384 | bool isDefined = file_hdl->split_freq.hasInheritedValue(); |
---|
[432] | 385 | CTimer::get("XIOS").suspend(); |
---|
[581] | 386 | return isDefined; |
---|
[432] | 387 | } |
---|
[581] | 388 | |
---|
| 389 | |
---|
[432] | 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; |
---|
[581] | 393 | if (!cstr2string(split_freq_format, split_freq_format_size, split_freq_format_str)) return; |
---|
| 394 | CTimer::get("XIOS").resume(); |
---|
[432] | 395 | file_hdl->split_freq_format.setValue(split_freq_format_str); |
---|
[581] | 396 | CTimer::get("XIOS").suspend(); |
---|
[432] | 397 | } |
---|
[581] | 398 | |
---|
[432] | 399 | void cxios_get_file_split_freq_format(file_Ptr file_hdl, char * split_freq_format, int split_freq_format_size) |
---|
| 400 | { |
---|
[581] | 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(); |
---|
[432] | 405 | } |
---|
[581] | 406 | |
---|
| 407 | bool cxios_is_defined_file_split_freq_format(file_Ptr file_hdl) |
---|
[432] | 408 | { |
---|
| 409 | CTimer::get("XIOS").resume(); |
---|
[581] | 410 | bool isDefined = file_hdl->split_freq_format.hasInheritedValue(); |
---|
[432] | 411 | CTimer::get("XIOS").suspend(); |
---|
[581] | 412 | return isDefined; |
---|
[432] | 413 | } |
---|
[581] | 414 | |
---|
| 415 | |
---|
[538] | 416 | void cxios_set_file_sync_freq(file_Ptr file_hdl, cxios_duration sync_freq_c) |
---|
[325] | 417 | { |
---|
[538] | 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(); |
---|
[325] | 429 | } |
---|
[581] | 430 | |
---|
[538] | 431 | void cxios_get_file_sync_freq(file_Ptr file_hdl, cxios_duration* sync_freq_c) |
---|
[325] | 432 | { |
---|
[538] | 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(); |
---|
[325] | 443 | } |
---|
[581] | 444 | |
---|
| 445 | bool cxios_is_defined_file_sync_freq(file_Ptr file_hdl) |
---|
[432] | 446 | { |
---|
| 447 | CTimer::get("XIOS").resume(); |
---|
[581] | 448 | bool isDefined = file_hdl->sync_freq.hasInheritedValue(); |
---|
[432] | 449 | CTimer::get("XIOS").suspend(); |
---|
[581] | 450 | return isDefined; |
---|
[432] | 451 | } |
---|
[581] | 452 | |
---|
| 453 | |
---|
[699] | 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 | |
---|
[802] | 480 | void cxios_set_file_time_counter_name(file_Ptr file_hdl, const char * time_counter_name, int time_counter_name_size) |
---|
| 481 | { |
---|
| 482 | std::string time_counter_name_str; |
---|
| 483 | if (!cstr2string(time_counter_name, time_counter_name_size, time_counter_name_str)) return; |
---|
| 484 | CTimer::get("XIOS").resume(); |
---|
| 485 | file_hdl->time_counter_name.setValue(time_counter_name_str); |
---|
| 486 | CTimer::get("XIOS").suspend(); |
---|
| 487 | } |
---|
| 488 | |
---|
| 489 | void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size) |
---|
| 490 | { |
---|
| 491 | CTimer::get("XIOS").resume(); |
---|
| 492 | if (!string_copy(file_hdl->time_counter_name.getInheritedValue(), time_counter_name, time_counter_name_size)) |
---|
| 493 | ERROR("void cxios_get_file_time_counter_name(file_Ptr file_hdl, char * time_counter_name, int time_counter_name_size)", << "Input string is too short"); |
---|
| 494 | CTimer::get("XIOS").suspend(); |
---|
| 495 | } |
---|
| 496 | |
---|
| 497 | bool cxios_is_defined_file_time_counter_name(file_Ptr file_hdl) |
---|
| 498 | { |
---|
| 499 | CTimer::get("XIOS").resume(); |
---|
| 500 | bool isDefined = file_hdl->time_counter_name.hasInheritedValue(); |
---|
| 501 | CTimer::get("XIOS").suspend(); |
---|
| 502 | return isDefined; |
---|
| 503 | } |
---|
| 504 | |
---|
| 505 | |
---|
[711] | 506 | void cxios_set_file_timeseries(file_Ptr file_hdl, const char * timeseries, int timeseries_size) |
---|
| 507 | { |
---|
| 508 | std::string timeseries_str; |
---|
| 509 | if (!cstr2string(timeseries, timeseries_size, timeseries_str)) return; |
---|
| 510 | CTimer::get("XIOS").resume(); |
---|
| 511 | file_hdl->timeseries.fromString(timeseries_str); |
---|
| 512 | CTimer::get("XIOS").suspend(); |
---|
| 513 | } |
---|
| 514 | |
---|
| 515 | void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size) |
---|
| 516 | { |
---|
| 517 | CTimer::get("XIOS").resume(); |
---|
| 518 | if (!string_copy(file_hdl->timeseries.getInheritedStringValue(), timeseries, timeseries_size)) |
---|
| 519 | ERROR("void cxios_get_file_timeseries(file_Ptr file_hdl, char * timeseries, int timeseries_size)", << "Input string is too short"); |
---|
| 520 | CTimer::get("XIOS").suspend(); |
---|
| 521 | } |
---|
| 522 | |
---|
| 523 | bool cxios_is_defined_file_timeseries(file_Ptr file_hdl) |
---|
| 524 | { |
---|
| 525 | CTimer::get("XIOS").resume(); |
---|
| 526 | bool isDefined = file_hdl->timeseries.hasInheritedValue(); |
---|
| 527 | CTimer::get("XIOS").suspend(); |
---|
| 528 | return isDefined; |
---|
| 529 | } |
---|
| 530 | |
---|
| 531 | |
---|
| 532 | void cxios_set_file_ts_prefix(file_Ptr file_hdl, const char * ts_prefix, int ts_prefix_size) |
---|
| 533 | { |
---|
| 534 | std::string ts_prefix_str; |
---|
| 535 | if (!cstr2string(ts_prefix, ts_prefix_size, ts_prefix_str)) return; |
---|
| 536 | CTimer::get("XIOS").resume(); |
---|
| 537 | file_hdl->ts_prefix.setValue(ts_prefix_str); |
---|
| 538 | CTimer::get("XIOS").suspend(); |
---|
| 539 | } |
---|
| 540 | |
---|
| 541 | void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size) |
---|
| 542 | { |
---|
| 543 | CTimer::get("XIOS").resume(); |
---|
| 544 | if (!string_copy(file_hdl->ts_prefix.getInheritedValue(), ts_prefix, ts_prefix_size)) |
---|
| 545 | ERROR("void cxios_get_file_ts_prefix(file_Ptr file_hdl, char * ts_prefix, int ts_prefix_size)", << "Input string is too short"); |
---|
| 546 | CTimer::get("XIOS").suspend(); |
---|
| 547 | } |
---|
| 548 | |
---|
| 549 | bool cxios_is_defined_file_ts_prefix(file_Ptr file_hdl) |
---|
| 550 | { |
---|
| 551 | CTimer::get("XIOS").resume(); |
---|
| 552 | bool isDefined = file_hdl->ts_prefix.hasInheritedValue(); |
---|
| 553 | CTimer::get("XIOS").suspend(); |
---|
| 554 | return isDefined; |
---|
| 555 | } |
---|
| 556 | |
---|
| 557 | |
---|
[325] | 558 | void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size) |
---|
| 559 | { |
---|
| 560 | std::string type_str; |
---|
[581] | 561 | if (!cstr2string(type, type_size, type_str)) return; |
---|
| 562 | CTimer::get("XIOS").resume(); |
---|
[369] | 563 | file_hdl->type.fromString(type_str); |
---|
[581] | 564 | CTimer::get("XIOS").suspend(); |
---|
[325] | 565 | } |
---|
[581] | 566 | |
---|
[325] | 567 | void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size) |
---|
| 568 | { |
---|
[581] | 569 | CTimer::get("XIOS").resume(); |
---|
| 570 | if (!string_copy(file_hdl->type.getInheritedStringValue(), type, type_size)) |
---|
| 571 | ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", << "Input string is too short"); |
---|
| 572 | CTimer::get("XIOS").suspend(); |
---|
[325] | 573 | } |
---|
[581] | 574 | |
---|
| 575 | bool cxios_is_defined_file_type(file_Ptr file_hdl) |
---|
[432] | 576 | { |
---|
| 577 | CTimer::get("XIOS").resume(); |
---|
[581] | 578 | bool isDefined = file_hdl->type.hasInheritedValue(); |
---|
[432] | 579 | CTimer::get("XIOS").suspend(); |
---|
[581] | 580 | return isDefined; |
---|
[432] | 581 | } |
---|
[325] | 582 | } |
---|