[891] | 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::CScalar* scalar_Ptr; |
---|
| 19 | |
---|
| 20 | void cxios_set_scalar_long_name(scalar_Ptr scalar_hdl, const char * long_name, int long_name_size) |
---|
| 21 | { |
---|
| 22 | std::string long_name_str; |
---|
| 23 | if (!cstr2string(long_name, long_name_size, long_name_str)) return; |
---|
| 24 | CTimer::get("XIOS").resume(); |
---|
| 25 | scalar_hdl->long_name.setValue(long_name_str); |
---|
| 26 | CTimer::get("XIOS").suspend(); |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | void cxios_get_scalar_long_name(scalar_Ptr scalar_hdl, char * long_name, int long_name_size) |
---|
| 30 | { |
---|
| 31 | CTimer::get("XIOS").resume(); |
---|
| 32 | if (!string_copy(scalar_hdl->long_name.getInheritedValue(), long_name, long_name_size)) |
---|
| 33 | ERROR("void cxios_get_scalar_long_name(scalar_Ptr scalar_hdl, char * long_name, int long_name_size)", << "Input string is too short"); |
---|
| 34 | CTimer::get("XIOS").suspend(); |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | bool cxios_is_defined_scalar_long_name(scalar_Ptr scalar_hdl) |
---|
| 38 | { |
---|
| 39 | CTimer::get("XIOS").resume(); |
---|
| 40 | bool isDefined = scalar_hdl->long_name.hasInheritedValue(); |
---|
| 41 | CTimer::get("XIOS").suspend(); |
---|
| 42 | return isDefined; |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | void cxios_set_scalar_name(scalar_Ptr scalar_hdl, const char * name, int name_size) |
---|
| 47 | { |
---|
| 48 | std::string name_str; |
---|
| 49 | if (!cstr2string(name, name_size, name_str)) return; |
---|
| 50 | CTimer::get("XIOS").resume(); |
---|
| 51 | scalar_hdl->name.setValue(name_str); |
---|
| 52 | CTimer::get("XIOS").suspend(); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | void cxios_get_scalar_name(scalar_Ptr scalar_hdl, char * name, int name_size) |
---|
| 56 | { |
---|
| 57 | CTimer::get("XIOS").resume(); |
---|
| 58 | if (!string_copy(scalar_hdl->name.getInheritedValue(), name, name_size)) |
---|
| 59 | ERROR("void cxios_get_scalar_name(scalar_Ptr scalar_hdl, char * name, int name_size)", << "Input string is too short"); |
---|
| 60 | CTimer::get("XIOS").suspend(); |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | bool cxios_is_defined_scalar_name(scalar_Ptr scalar_hdl) |
---|
| 64 | { |
---|
| 65 | CTimer::get("XIOS").resume(); |
---|
| 66 | bool isDefined = scalar_hdl->name.hasInheritedValue(); |
---|
| 67 | CTimer::get("XIOS").suspend(); |
---|
| 68 | return isDefined; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | |
---|
[1158] | 72 | void cxios_set_scalar_prec(scalar_Ptr scalar_hdl, int prec) |
---|
| 73 | { |
---|
| 74 | CTimer::get("XIOS").resume(); |
---|
| 75 | scalar_hdl->prec.setValue(prec); |
---|
| 76 | CTimer::get("XIOS").suspend(); |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | void cxios_get_scalar_prec(scalar_Ptr scalar_hdl, int* prec) |
---|
| 80 | { |
---|
| 81 | CTimer::get("XIOS").resume(); |
---|
| 82 | *prec = scalar_hdl->prec.getInheritedValue(); |
---|
| 83 | CTimer::get("XIOS").suspend(); |
---|
| 84 | } |
---|
| 85 | |
---|
| 86 | bool cxios_is_defined_scalar_prec(scalar_Ptr scalar_hdl) |
---|
| 87 | { |
---|
| 88 | CTimer::get("XIOS").resume(); |
---|
| 89 | bool isDefined = scalar_hdl->prec.hasInheritedValue(); |
---|
| 90 | CTimer::get("XIOS").suspend(); |
---|
| 91 | return isDefined; |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | |
---|
[891] | 95 | void cxios_set_scalar_scalar_ref(scalar_Ptr scalar_hdl, const char * scalar_ref, int scalar_ref_size) |
---|
| 96 | { |
---|
| 97 | std::string scalar_ref_str; |
---|
| 98 | if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return; |
---|
| 99 | CTimer::get("XIOS").resume(); |
---|
| 100 | scalar_hdl->scalar_ref.setValue(scalar_ref_str); |
---|
| 101 | CTimer::get("XIOS").suspend(); |
---|
| 102 | } |
---|
| 103 | |
---|
| 104 | void cxios_get_scalar_scalar_ref(scalar_Ptr scalar_hdl, char * scalar_ref, int scalar_ref_size) |
---|
| 105 | { |
---|
| 106 | CTimer::get("XIOS").resume(); |
---|
| 107 | if (!string_copy(scalar_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size)) |
---|
| 108 | ERROR("void cxios_get_scalar_scalar_ref(scalar_Ptr scalar_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short"); |
---|
| 109 | CTimer::get("XIOS").suspend(); |
---|
| 110 | } |
---|
| 111 | |
---|
| 112 | bool cxios_is_defined_scalar_scalar_ref(scalar_Ptr scalar_hdl) |
---|
| 113 | { |
---|
| 114 | CTimer::get("XIOS").resume(); |
---|
| 115 | bool isDefined = scalar_hdl->scalar_ref.hasInheritedValue(); |
---|
| 116 | CTimer::get("XIOS").suspend(); |
---|
| 117 | return isDefined; |
---|
| 118 | } |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | void cxios_set_scalar_standard_name(scalar_Ptr scalar_hdl, const char * standard_name, int standard_name_size) |
---|
| 122 | { |
---|
| 123 | std::string standard_name_str; |
---|
| 124 | if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; |
---|
| 125 | CTimer::get("XIOS").resume(); |
---|
| 126 | scalar_hdl->standard_name.setValue(standard_name_str); |
---|
| 127 | CTimer::get("XIOS").suspend(); |
---|
| 128 | } |
---|
| 129 | |
---|
| 130 | void cxios_get_scalar_standard_name(scalar_Ptr scalar_hdl, char * standard_name, int standard_name_size) |
---|
| 131 | { |
---|
| 132 | CTimer::get("XIOS").resume(); |
---|
| 133 | if (!string_copy(scalar_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size)) |
---|
| 134 | ERROR("void cxios_get_scalar_standard_name(scalar_Ptr scalar_hdl, char * standard_name, int standard_name_size)", << "Input string is too short"); |
---|
| 135 | CTimer::get("XIOS").suspend(); |
---|
| 136 | } |
---|
| 137 | |
---|
| 138 | bool cxios_is_defined_scalar_standard_name(scalar_Ptr scalar_hdl) |
---|
| 139 | { |
---|
| 140 | CTimer::get("XIOS").resume(); |
---|
| 141 | bool isDefined = scalar_hdl->standard_name.hasInheritedValue(); |
---|
| 142 | CTimer::get("XIOS").suspend(); |
---|
| 143 | return isDefined; |
---|
| 144 | } |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | void cxios_set_scalar_unit(scalar_Ptr scalar_hdl, const char * unit, int unit_size) |
---|
| 148 | { |
---|
| 149 | std::string unit_str; |
---|
| 150 | if (!cstr2string(unit, unit_size, unit_str)) return; |
---|
| 151 | CTimer::get("XIOS").resume(); |
---|
| 152 | scalar_hdl->unit.setValue(unit_str); |
---|
| 153 | CTimer::get("XIOS").suspend(); |
---|
| 154 | } |
---|
| 155 | |
---|
| 156 | void cxios_get_scalar_unit(scalar_Ptr scalar_hdl, char * unit, int unit_size) |
---|
| 157 | { |
---|
| 158 | CTimer::get("XIOS").resume(); |
---|
| 159 | if (!string_copy(scalar_hdl->unit.getInheritedValue(), unit, unit_size)) |
---|
| 160 | ERROR("void cxios_get_scalar_unit(scalar_Ptr scalar_hdl, char * unit, int unit_size)", << "Input string is too short"); |
---|
| 161 | CTimer::get("XIOS").suspend(); |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | bool cxios_is_defined_scalar_unit(scalar_Ptr scalar_hdl) |
---|
| 165 | { |
---|
| 166 | CTimer::get("XIOS").resume(); |
---|
| 167 | bool isDefined = scalar_hdl->unit.hasInheritedValue(); |
---|
| 168 | CTimer::get("XIOS").suspend(); |
---|
| 169 | return isDefined; |
---|
| 170 | } |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | void cxios_set_scalar_value(scalar_Ptr scalar_hdl, double value) |
---|
| 174 | { |
---|
| 175 | CTimer::get("XIOS").resume(); |
---|
| 176 | scalar_hdl->value.setValue(value); |
---|
| 177 | CTimer::get("XIOS").suspend(); |
---|
| 178 | } |
---|
| 179 | |
---|
| 180 | void cxios_get_scalar_value(scalar_Ptr scalar_hdl, double* value) |
---|
| 181 | { |
---|
| 182 | CTimer::get("XIOS").resume(); |
---|
| 183 | *value = scalar_hdl->value.getInheritedValue(); |
---|
| 184 | CTimer::get("XIOS").suspend(); |
---|
| 185 | } |
---|
| 186 | |
---|
| 187 | bool cxios_is_defined_scalar_value(scalar_Ptr scalar_hdl) |
---|
| 188 | { |
---|
| 189 | CTimer::get("XIOS").resume(); |
---|
| 190 | bool isDefined = scalar_hdl->value.hasInheritedValue(); |
---|
| 191 | CTimer::get("XIOS").suspend(); |
---|
| 192 | return isDefined; |
---|
| 193 | } |
---|
| 194 | } |
---|