[891] | 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::CScalar* scalar_Ptr; |
---|
| 18 | |
---|
[1492] | 19 | void cxios_set_scalar_axis_type(scalar_Ptr scalar_hdl, const char * axis_type, int axis_type_size) |
---|
| 20 | { |
---|
| 21 | std::string axis_type_str; |
---|
| 22 | if (!cstr2string(axis_type, axis_type_size, axis_type_str)) return; |
---|
| 23 | CTimer::get("XIOS").resume(); |
---|
| 24 | scalar_hdl->axis_type.fromString(axis_type_str); |
---|
| 25 | CTimer::get("XIOS").suspend(); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | void cxios_get_scalar_axis_type(scalar_Ptr scalar_hdl, char * axis_type, int axis_type_size) |
---|
| 29 | { |
---|
| 30 | CTimer::get("XIOS").resume(); |
---|
| 31 | if (!string_copy(scalar_hdl->axis_type.getInheritedStringValue(), axis_type, axis_type_size)) |
---|
| 32 | ERROR("void cxios_get_scalar_axis_type(scalar_Ptr scalar_hdl, char * axis_type, int axis_type_size)", << "Input string is too short"); |
---|
| 33 | CTimer::get("XIOS").suspend(); |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | bool cxios_is_defined_scalar_axis_type(scalar_Ptr scalar_hdl) |
---|
| 37 | { |
---|
| 38 | CTimer::get("XIOS").resume(); |
---|
| 39 | bool isDefined = scalar_hdl->axis_type.hasInheritedValue(); |
---|
| 40 | CTimer::get("XIOS").suspend(); |
---|
| 41 | return isDefined; |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | void cxios_set_scalar_bounds(scalar_Ptr scalar_hdl, double* bounds, int* extent) |
---|
| 46 | { |
---|
| 47 | CTimer::get("XIOS").resume(); |
---|
| 48 | CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData); |
---|
| 49 | scalar_hdl->bounds.reference(tmp.copy()); |
---|
| 50 | CTimer::get("XIOS").suspend(); |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | void cxios_get_scalar_bounds(scalar_Ptr scalar_hdl, double* bounds, int* extent) |
---|
| 54 | { |
---|
| 55 | CTimer::get("XIOS").resume(); |
---|
| 56 | CArray<double,1> tmp(bounds, shape(extent[0]), neverDeleteData); |
---|
| 57 | tmp=scalar_hdl->bounds.getInheritedValue(); |
---|
| 58 | CTimer::get("XIOS").suspend(); |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | bool cxios_is_defined_scalar_bounds(scalar_Ptr scalar_hdl) |
---|
| 62 | { |
---|
| 63 | CTimer::get("XIOS").resume(); |
---|
| 64 | bool isDefined = scalar_hdl->bounds.hasInheritedValue(); |
---|
| 65 | CTimer::get("XIOS").suspend(); |
---|
| 66 | return isDefined; |
---|
| 67 | } |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | void cxios_set_scalar_bounds_name(scalar_Ptr scalar_hdl, const char * bounds_name, int bounds_name_size) |
---|
| 71 | { |
---|
| 72 | std::string bounds_name_str; |
---|
| 73 | if (!cstr2string(bounds_name, bounds_name_size, bounds_name_str)) return; |
---|
| 74 | CTimer::get("XIOS").resume(); |
---|
| 75 | scalar_hdl->bounds_name.setValue(bounds_name_str); |
---|
| 76 | CTimer::get("XIOS").suspend(); |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | void cxios_get_scalar_bounds_name(scalar_Ptr scalar_hdl, char * bounds_name, int bounds_name_size) |
---|
| 80 | { |
---|
| 81 | CTimer::get("XIOS").resume(); |
---|
| 82 | if (!string_copy(scalar_hdl->bounds_name.getInheritedValue(), bounds_name, bounds_name_size)) |
---|
| 83 | ERROR("void cxios_get_scalar_bounds_name(scalar_Ptr scalar_hdl, char * bounds_name, int bounds_name_size)", << "Input string is too short"); |
---|
| 84 | CTimer::get("XIOS").suspend(); |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | bool cxios_is_defined_scalar_bounds_name(scalar_Ptr scalar_hdl) |
---|
| 88 | { |
---|
| 89 | CTimer::get("XIOS").resume(); |
---|
| 90 | bool isDefined = scalar_hdl->bounds_name.hasInheritedValue(); |
---|
| 91 | CTimer::get("XIOS").suspend(); |
---|
| 92 | return isDefined; |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | void cxios_set_scalar_comment(scalar_Ptr scalar_hdl, const char * comment, int comment_size) |
---|
| 97 | { |
---|
| 98 | std::string comment_str; |
---|
| 99 | if (!cstr2string(comment, comment_size, comment_str)) return; |
---|
| 100 | CTimer::get("XIOS").resume(); |
---|
| 101 | scalar_hdl->comment.setValue(comment_str); |
---|
| 102 | CTimer::get("XIOS").suspend(); |
---|
| 103 | } |
---|
| 104 | |
---|
| 105 | void cxios_get_scalar_comment(scalar_Ptr scalar_hdl, char * comment, int comment_size) |
---|
| 106 | { |
---|
| 107 | CTimer::get("XIOS").resume(); |
---|
| 108 | if (!string_copy(scalar_hdl->comment.getInheritedValue(), comment, comment_size)) |
---|
| 109 | ERROR("void cxios_get_scalar_comment(scalar_Ptr scalar_hdl, char * comment, int comment_size)", << "Input string is too short"); |
---|
| 110 | CTimer::get("XIOS").suspend(); |
---|
| 111 | } |
---|
| 112 | |
---|
| 113 | bool cxios_is_defined_scalar_comment(scalar_Ptr scalar_hdl) |
---|
| 114 | { |
---|
| 115 | CTimer::get("XIOS").resume(); |
---|
| 116 | bool isDefined = scalar_hdl->comment.hasInheritedValue(); |
---|
| 117 | CTimer::get("XIOS").suspend(); |
---|
| 118 | return isDefined; |
---|
| 119 | } |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | void cxios_set_scalar_label(scalar_Ptr scalar_hdl, const char * label, int label_size) |
---|
| 123 | { |
---|
| 124 | std::string label_str; |
---|
| 125 | if (!cstr2string(label, label_size, label_str)) return; |
---|
| 126 | CTimer::get("XIOS").resume(); |
---|
| 127 | scalar_hdl->label.setValue(label_str); |
---|
| 128 | CTimer::get("XIOS").suspend(); |
---|
| 129 | } |
---|
| 130 | |
---|
| 131 | void cxios_get_scalar_label(scalar_Ptr scalar_hdl, char * label, int label_size) |
---|
| 132 | { |
---|
| 133 | CTimer::get("XIOS").resume(); |
---|
| 134 | if (!string_copy(scalar_hdl->label.getInheritedValue(), label, label_size)) |
---|
| 135 | ERROR("void cxios_get_scalar_label(scalar_Ptr scalar_hdl, char * label, int label_size)", << "Input string is too short"); |
---|
| 136 | CTimer::get("XIOS").suspend(); |
---|
| 137 | } |
---|
| 138 | |
---|
| 139 | bool cxios_is_defined_scalar_label(scalar_Ptr scalar_hdl) |
---|
| 140 | { |
---|
| 141 | CTimer::get("XIOS").resume(); |
---|
| 142 | bool isDefined = scalar_hdl->label.hasInheritedValue(); |
---|
| 143 | CTimer::get("XIOS").suspend(); |
---|
| 144 | return isDefined; |
---|
| 145 | } |
---|
| 146 | |
---|
| 147 | |
---|
[891] | 148 | void cxios_set_scalar_long_name(scalar_Ptr scalar_hdl, const char * long_name, int long_name_size) |
---|
| 149 | { |
---|
| 150 | std::string long_name_str; |
---|
| 151 | if (!cstr2string(long_name, long_name_size, long_name_str)) return; |
---|
| 152 | CTimer::get("XIOS").resume(); |
---|
| 153 | scalar_hdl->long_name.setValue(long_name_str); |
---|
| 154 | CTimer::get("XIOS").suspend(); |
---|
| 155 | } |
---|
| 156 | |
---|
| 157 | void cxios_get_scalar_long_name(scalar_Ptr scalar_hdl, char * long_name, int long_name_size) |
---|
| 158 | { |
---|
| 159 | CTimer::get("XIOS").resume(); |
---|
| 160 | if (!string_copy(scalar_hdl->long_name.getInheritedValue(), long_name, long_name_size)) |
---|
| 161 | ERROR("void cxios_get_scalar_long_name(scalar_Ptr scalar_hdl, char * long_name, int long_name_size)", << "Input string is too short"); |
---|
| 162 | CTimer::get("XIOS").suspend(); |
---|
| 163 | } |
---|
| 164 | |
---|
| 165 | bool cxios_is_defined_scalar_long_name(scalar_Ptr scalar_hdl) |
---|
| 166 | { |
---|
| 167 | CTimer::get("XIOS").resume(); |
---|
| 168 | bool isDefined = scalar_hdl->long_name.hasInheritedValue(); |
---|
| 169 | CTimer::get("XIOS").suspend(); |
---|
| 170 | return isDefined; |
---|
| 171 | } |
---|
| 172 | |
---|
| 173 | |
---|
[1941] | 174 | void cxios_set_scalar_mask(scalar_Ptr scalar_hdl, bool mask) |
---|
| 175 | { |
---|
| 176 | CTimer::get("XIOS").resume(); |
---|
| 177 | scalar_hdl->mask.setValue(mask); |
---|
| 178 | CTimer::get("XIOS").suspend(); |
---|
| 179 | } |
---|
| 180 | |
---|
| 181 | void cxios_get_scalar_mask(scalar_Ptr scalar_hdl, bool* mask) |
---|
| 182 | { |
---|
| 183 | CTimer::get("XIOS").resume(); |
---|
| 184 | *mask = scalar_hdl->mask.getInheritedValue(); |
---|
| 185 | CTimer::get("XIOS").suspend(); |
---|
| 186 | } |
---|
| 187 | |
---|
| 188 | bool cxios_is_defined_scalar_mask(scalar_Ptr scalar_hdl) |
---|
| 189 | { |
---|
| 190 | CTimer::get("XIOS").resume(); |
---|
| 191 | bool isDefined = scalar_hdl->mask.hasInheritedValue(); |
---|
| 192 | CTimer::get("XIOS").suspend(); |
---|
| 193 | return isDefined; |
---|
| 194 | } |
---|
| 195 | |
---|
| 196 | |
---|
[2338] | 197 | void cxios_set_scalar_n(scalar_Ptr scalar_hdl, int n) |
---|
| 198 | { |
---|
| 199 | CTimer::get("XIOS").resume(); |
---|
| 200 | scalar_hdl->n.setValue(n); |
---|
| 201 | CTimer::get("XIOS").suspend(); |
---|
| 202 | } |
---|
| 203 | |
---|
| 204 | void cxios_get_scalar_n(scalar_Ptr scalar_hdl, int* n) |
---|
| 205 | { |
---|
| 206 | CTimer::get("XIOS").resume(); |
---|
| 207 | *n = scalar_hdl->n.getInheritedValue(); |
---|
| 208 | CTimer::get("XIOS").suspend(); |
---|
| 209 | } |
---|
| 210 | |
---|
| 211 | bool cxios_is_defined_scalar_n(scalar_Ptr scalar_hdl) |
---|
| 212 | { |
---|
| 213 | CTimer::get("XIOS").resume(); |
---|
| 214 | bool isDefined = scalar_hdl->n.hasInheritedValue(); |
---|
| 215 | CTimer::get("XIOS").suspend(); |
---|
| 216 | return isDefined; |
---|
| 217 | } |
---|
| 218 | |
---|
| 219 | |
---|
[891] | 220 | void cxios_set_scalar_name(scalar_Ptr scalar_hdl, const char * name, int name_size) |
---|
| 221 | { |
---|
| 222 | std::string name_str; |
---|
| 223 | if (!cstr2string(name, name_size, name_str)) return; |
---|
| 224 | CTimer::get("XIOS").resume(); |
---|
| 225 | scalar_hdl->name.setValue(name_str); |
---|
| 226 | CTimer::get("XIOS").suspend(); |
---|
| 227 | } |
---|
| 228 | |
---|
| 229 | void cxios_get_scalar_name(scalar_Ptr scalar_hdl, char * name, int name_size) |
---|
| 230 | { |
---|
| 231 | CTimer::get("XIOS").resume(); |
---|
| 232 | if (!string_copy(scalar_hdl->name.getInheritedValue(), name, name_size)) |
---|
| 233 | ERROR("void cxios_get_scalar_name(scalar_Ptr scalar_hdl, char * name, int name_size)", << "Input string is too short"); |
---|
| 234 | CTimer::get("XIOS").suspend(); |
---|
| 235 | } |
---|
| 236 | |
---|
| 237 | bool cxios_is_defined_scalar_name(scalar_Ptr scalar_hdl) |
---|
| 238 | { |
---|
| 239 | CTimer::get("XIOS").resume(); |
---|
| 240 | bool isDefined = scalar_hdl->name.hasInheritedValue(); |
---|
| 241 | CTimer::get("XIOS").suspend(); |
---|
| 242 | return isDefined; |
---|
| 243 | } |
---|
| 244 | |
---|
| 245 | |
---|
[1492] | 246 | void cxios_set_scalar_positive(scalar_Ptr scalar_hdl, const char * positive, int positive_size) |
---|
| 247 | { |
---|
| 248 | std::string positive_str; |
---|
| 249 | if (!cstr2string(positive, positive_size, positive_str)) return; |
---|
| 250 | CTimer::get("XIOS").resume(); |
---|
| 251 | scalar_hdl->positive.fromString(positive_str); |
---|
| 252 | CTimer::get("XIOS").suspend(); |
---|
| 253 | } |
---|
| 254 | |
---|
| 255 | void cxios_get_scalar_positive(scalar_Ptr scalar_hdl, char * positive, int positive_size) |
---|
| 256 | { |
---|
| 257 | CTimer::get("XIOS").resume(); |
---|
| 258 | if (!string_copy(scalar_hdl->positive.getInheritedStringValue(), positive, positive_size)) |
---|
| 259 | ERROR("void cxios_get_scalar_positive(scalar_Ptr scalar_hdl, char * positive, int positive_size)", << "Input string is too short"); |
---|
| 260 | CTimer::get("XIOS").suspend(); |
---|
| 261 | } |
---|
| 262 | |
---|
| 263 | bool cxios_is_defined_scalar_positive(scalar_Ptr scalar_hdl) |
---|
| 264 | { |
---|
| 265 | CTimer::get("XIOS").resume(); |
---|
| 266 | bool isDefined = scalar_hdl->positive.hasInheritedValue(); |
---|
| 267 | CTimer::get("XIOS").suspend(); |
---|
| 268 | return isDefined; |
---|
| 269 | } |
---|
| 270 | |
---|
| 271 | |
---|
[1158] | 272 | void cxios_set_scalar_prec(scalar_Ptr scalar_hdl, int prec) |
---|
| 273 | { |
---|
| 274 | CTimer::get("XIOS").resume(); |
---|
| 275 | scalar_hdl->prec.setValue(prec); |
---|
| 276 | CTimer::get("XIOS").suspend(); |
---|
| 277 | } |
---|
| 278 | |
---|
| 279 | void cxios_get_scalar_prec(scalar_Ptr scalar_hdl, int* prec) |
---|
| 280 | { |
---|
| 281 | CTimer::get("XIOS").resume(); |
---|
| 282 | *prec = scalar_hdl->prec.getInheritedValue(); |
---|
| 283 | CTimer::get("XIOS").suspend(); |
---|
| 284 | } |
---|
| 285 | |
---|
| 286 | bool cxios_is_defined_scalar_prec(scalar_Ptr scalar_hdl) |
---|
| 287 | { |
---|
| 288 | CTimer::get("XIOS").resume(); |
---|
| 289 | bool isDefined = scalar_hdl->prec.hasInheritedValue(); |
---|
| 290 | CTimer::get("XIOS").suspend(); |
---|
| 291 | return isDefined; |
---|
| 292 | } |
---|
| 293 | |
---|
| 294 | |
---|
[891] | 295 | void cxios_set_scalar_scalar_ref(scalar_Ptr scalar_hdl, const char * scalar_ref, int scalar_ref_size) |
---|
| 296 | { |
---|
| 297 | std::string scalar_ref_str; |
---|
| 298 | if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return; |
---|
| 299 | CTimer::get("XIOS").resume(); |
---|
| 300 | scalar_hdl->scalar_ref.setValue(scalar_ref_str); |
---|
| 301 | CTimer::get("XIOS").suspend(); |
---|
| 302 | } |
---|
| 303 | |
---|
| 304 | void cxios_get_scalar_scalar_ref(scalar_Ptr scalar_hdl, char * scalar_ref, int scalar_ref_size) |
---|
| 305 | { |
---|
| 306 | CTimer::get("XIOS").resume(); |
---|
| 307 | if (!string_copy(scalar_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size)) |
---|
| 308 | ERROR("void cxios_get_scalar_scalar_ref(scalar_Ptr scalar_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short"); |
---|
| 309 | CTimer::get("XIOS").suspend(); |
---|
| 310 | } |
---|
| 311 | |
---|
| 312 | bool cxios_is_defined_scalar_scalar_ref(scalar_Ptr scalar_hdl) |
---|
| 313 | { |
---|
| 314 | CTimer::get("XIOS").resume(); |
---|
| 315 | bool isDefined = scalar_hdl->scalar_ref.hasInheritedValue(); |
---|
| 316 | CTimer::get("XIOS").suspend(); |
---|
| 317 | return isDefined; |
---|
| 318 | } |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | void cxios_set_scalar_standard_name(scalar_Ptr scalar_hdl, const char * standard_name, int standard_name_size) |
---|
| 322 | { |
---|
| 323 | std::string standard_name_str; |
---|
| 324 | if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; |
---|
| 325 | CTimer::get("XIOS").resume(); |
---|
| 326 | scalar_hdl->standard_name.setValue(standard_name_str); |
---|
| 327 | CTimer::get("XIOS").suspend(); |
---|
| 328 | } |
---|
| 329 | |
---|
| 330 | void cxios_get_scalar_standard_name(scalar_Ptr scalar_hdl, char * standard_name, int standard_name_size) |
---|
| 331 | { |
---|
| 332 | CTimer::get("XIOS").resume(); |
---|
| 333 | if (!string_copy(scalar_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size)) |
---|
| 334 | ERROR("void cxios_get_scalar_standard_name(scalar_Ptr scalar_hdl, char * standard_name, int standard_name_size)", << "Input string is too short"); |
---|
| 335 | CTimer::get("XIOS").suspend(); |
---|
| 336 | } |
---|
| 337 | |
---|
| 338 | bool cxios_is_defined_scalar_standard_name(scalar_Ptr scalar_hdl) |
---|
| 339 | { |
---|
| 340 | CTimer::get("XIOS").resume(); |
---|
| 341 | bool isDefined = scalar_hdl->standard_name.hasInheritedValue(); |
---|
| 342 | CTimer::get("XIOS").suspend(); |
---|
| 343 | return isDefined; |
---|
| 344 | } |
---|
| 345 | |
---|
| 346 | |
---|
| 347 | void cxios_set_scalar_unit(scalar_Ptr scalar_hdl, const char * unit, int unit_size) |
---|
| 348 | { |
---|
| 349 | std::string unit_str; |
---|
| 350 | if (!cstr2string(unit, unit_size, unit_str)) return; |
---|
| 351 | CTimer::get("XIOS").resume(); |
---|
| 352 | scalar_hdl->unit.setValue(unit_str); |
---|
| 353 | CTimer::get("XIOS").suspend(); |
---|
| 354 | } |
---|
| 355 | |
---|
| 356 | void cxios_get_scalar_unit(scalar_Ptr scalar_hdl, char * unit, int unit_size) |
---|
| 357 | { |
---|
| 358 | CTimer::get("XIOS").resume(); |
---|
| 359 | if (!string_copy(scalar_hdl->unit.getInheritedValue(), unit, unit_size)) |
---|
| 360 | ERROR("void cxios_get_scalar_unit(scalar_Ptr scalar_hdl, char * unit, int unit_size)", << "Input string is too short"); |
---|
| 361 | CTimer::get("XIOS").suspend(); |
---|
| 362 | } |
---|
| 363 | |
---|
| 364 | bool cxios_is_defined_scalar_unit(scalar_Ptr scalar_hdl) |
---|
| 365 | { |
---|
| 366 | CTimer::get("XIOS").resume(); |
---|
| 367 | bool isDefined = scalar_hdl->unit.hasInheritedValue(); |
---|
| 368 | CTimer::get("XIOS").suspend(); |
---|
| 369 | return isDefined; |
---|
| 370 | } |
---|
| 371 | |
---|
| 372 | |
---|
| 373 | void cxios_set_scalar_value(scalar_Ptr scalar_hdl, double value) |
---|
| 374 | { |
---|
| 375 | CTimer::get("XIOS").resume(); |
---|
| 376 | scalar_hdl->value.setValue(value); |
---|
| 377 | CTimer::get("XIOS").suspend(); |
---|
| 378 | } |
---|
| 379 | |
---|
| 380 | void cxios_get_scalar_value(scalar_Ptr scalar_hdl, double* value) |
---|
| 381 | { |
---|
| 382 | CTimer::get("XIOS").resume(); |
---|
| 383 | *value = scalar_hdl->value.getInheritedValue(); |
---|
| 384 | CTimer::get("XIOS").suspend(); |
---|
| 385 | } |
---|
| 386 | |
---|
| 387 | bool cxios_is_defined_scalar_value(scalar_Ptr scalar_hdl) |
---|
| 388 | { |
---|
| 389 | CTimer::get("XIOS").resume(); |
---|
| 390 | bool isDefined = scalar_hdl->value.hasInheritedValue(); |
---|
| 391 | CTimer::get("XIOS").suspend(); |
---|
| 392 | return isDefined; |
---|
| 393 | } |
---|
| 394 | } |
---|