[472] | 1 | /* ************************************************************************** * |
---|
[581] | 2 | * Interface auto generated - do not modify * |
---|
[472] | 3 | * ************************************************************************** */ |
---|
| 4 | |
---|
| 5 | #include <boost/multi_array.hpp> |
---|
| 6 | #include <boost/shared_ptr.hpp> |
---|
[591] | 7 | #include "xios.hpp" |
---|
[472] | 8 | #include "attribute_template.hpp" |
---|
| 9 | #include "object_template.hpp" |
---|
| 10 | #include "group_template.hpp" |
---|
| 11 | #include "icutil.hpp" |
---|
[532] | 12 | #include "icdate.hpp" |
---|
[472] | 13 | #include "timer.hpp" |
---|
| 14 | #include "node_type.hpp" |
---|
| 15 | |
---|
| 16 | extern "C" |
---|
| 17 | { |
---|
[581] | 18 | typedef xios::CVariable* variable_Ptr; |
---|
| 19 | |
---|
[472] | 20 | void cxios_set_variable_name(variable_Ptr variable_hdl, const char * name, int name_size) |
---|
| 21 | { |
---|
| 22 | std::string name_str; |
---|
[581] | 23 | if (!cstr2string(name, name_size, name_str)) return; |
---|
| 24 | CTimer::get("XIOS").resume(); |
---|
[472] | 25 | variable_hdl->name.setValue(name_str); |
---|
[581] | 26 | CTimer::get("XIOS").suspend(); |
---|
[472] | 27 | } |
---|
[581] | 28 | |
---|
[472] | 29 | void cxios_get_variable_name(variable_Ptr variable_hdl, char * name, int name_size) |
---|
| 30 | { |
---|
[581] | 31 | CTimer::get("XIOS").resume(); |
---|
| 32 | if (!string_copy(variable_hdl->name.getInheritedValue(), name, name_size)) |
---|
| 33 | ERROR("void cxios_get_variable_name(variable_Ptr variable_hdl, char * name, int name_size)", << "Input string is too short"); |
---|
| 34 | CTimer::get("XIOS").suspend(); |
---|
[472] | 35 | } |
---|
[581] | 36 | |
---|
| 37 | bool cxios_is_defined_variable_name(variable_Ptr variable_hdl) |
---|
[472] | 38 | { |
---|
| 39 | CTimer::get("XIOS").resume(); |
---|
[581] | 40 | bool isDefined = variable_hdl->name.hasInheritedValue(); |
---|
[472] | 41 | CTimer::get("XIOS").suspend(); |
---|
[581] | 42 | return isDefined; |
---|
[472] | 43 | } |
---|
[581] | 44 | |
---|
| 45 | |
---|
[1041] | 46 | void cxios_set_variable_ts_target(variable_Ptr variable_hdl, const char * ts_target, int ts_target_size) |
---|
| 47 | { |
---|
| 48 | std::string ts_target_str; |
---|
| 49 | if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return; |
---|
| 50 | CTimer::get("XIOS").resume(); |
---|
| 51 | variable_hdl->ts_target.fromString(ts_target_str); |
---|
| 52 | CTimer::get("XIOS").suspend(); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size) |
---|
| 56 | { |
---|
| 57 | CTimer::get("XIOS").resume(); |
---|
| 58 | if (!string_copy(variable_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size)) |
---|
| 59 | ERROR("void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size)", << "Input string is too short"); |
---|
| 60 | CTimer::get("XIOS").suspend(); |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | bool cxios_is_defined_variable_ts_target(variable_Ptr variable_hdl) |
---|
| 64 | { |
---|
| 65 | CTimer::get("XIOS").resume(); |
---|
| 66 | bool isDefined = variable_hdl->ts_target.hasInheritedValue(); |
---|
| 67 | CTimer::get("XIOS").suspend(); |
---|
| 68 | return isDefined; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | |
---|
[472] | 72 | void cxios_set_variable_type(variable_Ptr variable_hdl, const char * type, int type_size) |
---|
| 73 | { |
---|
| 74 | std::string type_str; |
---|
[581] | 75 | if (!cstr2string(type, type_size, type_str)) return; |
---|
| 76 | CTimer::get("XIOS").resume(); |
---|
[527] | 77 | variable_hdl->type.fromString(type_str); |
---|
[581] | 78 | CTimer::get("XIOS").suspend(); |
---|
[472] | 79 | } |
---|
[581] | 80 | |
---|
[472] | 81 | void cxios_get_variable_type(variable_Ptr variable_hdl, char * type, int type_size) |
---|
| 82 | { |
---|
[581] | 83 | CTimer::get("XIOS").resume(); |
---|
| 84 | if (!string_copy(variable_hdl->type.getInheritedStringValue(), type, type_size)) |
---|
| 85 | ERROR("void cxios_get_variable_type(variable_Ptr variable_hdl, char * type, int type_size)", << "Input string is too short"); |
---|
| 86 | CTimer::get("XIOS").suspend(); |
---|
[472] | 87 | } |
---|
[581] | 88 | |
---|
| 89 | bool cxios_is_defined_variable_type(variable_Ptr variable_hdl) |
---|
[472] | 90 | { |
---|
| 91 | CTimer::get("XIOS").resume(); |
---|
[581] | 92 | bool isDefined = variable_hdl->type.hasInheritedValue(); |
---|
[472] | 93 | CTimer::get("XIOS").suspend(); |
---|
[581] | 94 | return isDefined; |
---|
[472] | 95 | } |
---|
| 96 | } |
---|