[549] | 1 | /* ************************************************************************** * |
---|
[581] | 2 | * Interface auto generated - do not modify * |
---|
[549] | 3 | * ************************************************************************** */ |
---|
| 4 | |
---|
| 5 | #include <boost/multi_array.hpp> |
---|
[591] | 6 | #include "xios.hpp" |
---|
[549] | 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 | { |
---|
[581] | 17 | typedef xios::CCalendarWrapper* calendar_wrapper_Ptr; |
---|
| 18 | |
---|
[1492] | 19 | void cxios_set_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * comment, int comment_size) |
---|
| 20 | { |
---|
| 21 | std::string comment_str; |
---|
| 22 | if (!cstr2string(comment, comment_size, comment_str)) return; |
---|
| 23 | CTimer::get("XIOS").resume(); |
---|
| 24 | calendar_wrapper_hdl->comment.setValue(comment_str); |
---|
| 25 | CTimer::get("XIOS").suspend(); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size) |
---|
| 29 | { |
---|
| 30 | CTimer::get("XIOS").resume(); |
---|
| 31 | if (!string_copy(calendar_wrapper_hdl->comment.getInheritedValue(), comment, comment_size)) |
---|
| 32 | ERROR("void cxios_get_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl, char * comment, int comment_size)", << "Input string is too short"); |
---|
| 33 | CTimer::get("XIOS").suspend(); |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | bool cxios_is_defined_calendar_wrapper_comment(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
| 37 | { |
---|
| 38 | CTimer::get("XIOS").resume(); |
---|
| 39 | bool isDefined = calendar_wrapper_hdl->comment.hasInheritedValue(); |
---|
| 40 | CTimer::get("XIOS").suspend(); |
---|
| 41 | return isDefined; |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | |
---|
[550] | 45 | void cxios_set_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int day_length) |
---|
| 46 | { |
---|
[581] | 47 | CTimer::get("XIOS").resume(); |
---|
[550] | 48 | calendar_wrapper_hdl->day_length.setValue(day_length); |
---|
[581] | 49 | CTimer::get("XIOS").suspend(); |
---|
[550] | 50 | } |
---|
[581] | 51 | |
---|
[550] | 52 | void cxios_get_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int* day_length) |
---|
| 53 | { |
---|
[581] | 54 | CTimer::get("XIOS").resume(); |
---|
[550] | 55 | *day_length = calendar_wrapper_hdl->day_length.getInheritedValue(); |
---|
[581] | 56 | CTimer::get("XIOS").suspend(); |
---|
[550] | 57 | } |
---|
[581] | 58 | |
---|
| 59 | bool cxios_is_defined_calendar_wrapper_day_length(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[550] | 60 | { |
---|
| 61 | CTimer::get("XIOS").resume(); |
---|
[581] | 62 | bool isDefined = calendar_wrapper_hdl->day_length.hasInheritedValue(); |
---|
[550] | 63 | CTimer::get("XIOS").suspend(); |
---|
[581] | 64 | return isDefined; |
---|
[550] | 65 | } |
---|
[581] | 66 | |
---|
| 67 | |
---|
[550] | 68 | void cxios_set_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl, double leap_year_drift) |
---|
| 69 | { |
---|
[581] | 70 | CTimer::get("XIOS").resume(); |
---|
[550] | 71 | calendar_wrapper_hdl->leap_year_drift.setValue(leap_year_drift); |
---|
[581] | 72 | CTimer::get("XIOS").suspend(); |
---|
[550] | 73 | } |
---|
[581] | 74 | |
---|
[550] | 75 | void cxios_get_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl, double* leap_year_drift) |
---|
| 76 | { |
---|
[581] | 77 | CTimer::get("XIOS").resume(); |
---|
[550] | 78 | *leap_year_drift = calendar_wrapper_hdl->leap_year_drift.getInheritedValue(); |
---|
[581] | 79 | CTimer::get("XIOS").suspend(); |
---|
[550] | 80 | } |
---|
[581] | 81 | |
---|
| 82 | bool cxios_is_defined_calendar_wrapper_leap_year_drift(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[550] | 83 | { |
---|
| 84 | CTimer::get("XIOS").resume(); |
---|
[581] | 85 | bool isDefined = calendar_wrapper_hdl->leap_year_drift.hasInheritedValue(); |
---|
[550] | 86 | CTimer::get("XIOS").suspend(); |
---|
[581] | 87 | return isDefined; |
---|
[550] | 88 | } |
---|
[581] | 89 | |
---|
| 90 | |
---|
[550] | 91 | void cxios_set_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl, double leap_year_drift_offset) |
---|
| 92 | { |
---|
[581] | 93 | CTimer::get("XIOS").resume(); |
---|
[550] | 94 | calendar_wrapper_hdl->leap_year_drift_offset.setValue(leap_year_drift_offset); |
---|
[581] | 95 | CTimer::get("XIOS").suspend(); |
---|
[550] | 96 | } |
---|
[581] | 97 | |
---|
[550] | 98 | void cxios_get_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl, double* leap_year_drift_offset) |
---|
| 99 | { |
---|
[581] | 100 | CTimer::get("XIOS").resume(); |
---|
[550] | 101 | *leap_year_drift_offset = calendar_wrapper_hdl->leap_year_drift_offset.getInheritedValue(); |
---|
[581] | 102 | CTimer::get("XIOS").suspend(); |
---|
[550] | 103 | } |
---|
[581] | 104 | |
---|
| 105 | bool cxios_is_defined_calendar_wrapper_leap_year_drift_offset(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[550] | 106 | { |
---|
| 107 | CTimer::get("XIOS").resume(); |
---|
[581] | 108 | bool isDefined = calendar_wrapper_hdl->leap_year_drift_offset.hasInheritedValue(); |
---|
[550] | 109 | CTimer::get("XIOS").suspend(); |
---|
[581] | 110 | return isDefined; |
---|
[550] | 111 | } |
---|
[581] | 112 | |
---|
| 113 | |
---|
[550] | 114 | void cxios_set_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl, int leap_year_month) |
---|
| 115 | { |
---|
[581] | 116 | CTimer::get("XIOS").resume(); |
---|
[550] | 117 | calendar_wrapper_hdl->leap_year_month.setValue(leap_year_month); |
---|
[581] | 118 | CTimer::get("XIOS").suspend(); |
---|
[550] | 119 | } |
---|
[581] | 120 | |
---|
[550] | 121 | void cxios_get_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl, int* leap_year_month) |
---|
| 122 | { |
---|
[581] | 123 | CTimer::get("XIOS").resume(); |
---|
[550] | 124 | *leap_year_month = calendar_wrapper_hdl->leap_year_month.getInheritedValue(); |
---|
[581] | 125 | CTimer::get("XIOS").suspend(); |
---|
[550] | 126 | } |
---|
[581] | 127 | |
---|
| 128 | bool cxios_is_defined_calendar_wrapper_leap_year_month(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[550] | 129 | { |
---|
| 130 | CTimer::get("XIOS").resume(); |
---|
[581] | 131 | bool isDefined = calendar_wrapper_hdl->leap_year_month.hasInheritedValue(); |
---|
[550] | 132 | CTimer::get("XIOS").suspend(); |
---|
[581] | 133 | return isDefined; |
---|
[550] | 134 | } |
---|
[581] | 135 | |
---|
| 136 | |
---|
[674] | 137 | void cxios_set_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl, int* month_lengths, int* extent) |
---|
[550] | 138 | { |
---|
| 139 | CTimer::get("XIOS").resume(); |
---|
[674] | 140 | CArray<int,1> tmp(month_lengths, shape(extent[0]), neverDeleteData); |
---|
[550] | 141 | calendar_wrapper_hdl->month_lengths.reference(tmp.copy()); |
---|
| 142 | CTimer::get("XIOS").suspend(); |
---|
| 143 | } |
---|
[581] | 144 | |
---|
[674] | 145 | void cxios_get_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl, int* month_lengths, int* extent) |
---|
[550] | 146 | { |
---|
| 147 | CTimer::get("XIOS").resume(); |
---|
[674] | 148 | CArray<int,1> tmp(month_lengths, shape(extent[0]), neverDeleteData); |
---|
[581] | 149 | tmp=calendar_wrapper_hdl->month_lengths.getInheritedValue(); |
---|
[550] | 150 | CTimer::get("XIOS").suspend(); |
---|
| 151 | } |
---|
[581] | 152 | |
---|
| 153 | bool cxios_is_defined_calendar_wrapper_month_lengths(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[550] | 154 | { |
---|
| 155 | CTimer::get("XIOS").resume(); |
---|
[581] | 156 | bool isDefined = calendar_wrapper_hdl->month_lengths.hasInheritedValue(); |
---|
[550] | 157 | CTimer::get("XIOS").suspend(); |
---|
[581] | 158 | return isDefined; |
---|
[550] | 159 | } |
---|
[581] | 160 | |
---|
| 161 | |
---|
[549] | 162 | void cxios_set_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * start_date, int start_date_size) |
---|
| 163 | { |
---|
| 164 | std::string start_date_str; |
---|
[581] | 165 | if (!cstr2string(start_date, start_date_size, start_date_str)) return; |
---|
| 166 | CTimer::get("XIOS").resume(); |
---|
[549] | 167 | calendar_wrapper_hdl->start_date.setValue(start_date_str); |
---|
[581] | 168 | CTimer::get("XIOS").suspend(); |
---|
[549] | 169 | } |
---|
[581] | 170 | |
---|
[549] | 171 | void cxios_get_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, char * start_date, int start_date_size) |
---|
| 172 | { |
---|
[581] | 173 | CTimer::get("XIOS").resume(); |
---|
| 174 | if (!string_copy(calendar_wrapper_hdl->start_date.getInheritedValue(), start_date, start_date_size)) |
---|
| 175 | ERROR("void cxios_get_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl, char * start_date, int start_date_size)", << "Input string is too short"); |
---|
| 176 | CTimer::get("XIOS").suspend(); |
---|
[549] | 177 | } |
---|
[581] | 178 | |
---|
| 179 | bool cxios_is_defined_calendar_wrapper_start_date(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[549] | 180 | { |
---|
| 181 | CTimer::get("XIOS").resume(); |
---|
[581] | 182 | bool isDefined = calendar_wrapper_hdl->start_date.hasInheritedValue(); |
---|
[549] | 183 | CTimer::get("XIOS").suspend(); |
---|
[581] | 184 | return isDefined; |
---|
[549] | 185 | } |
---|
[581] | 186 | |
---|
| 187 | |
---|
[549] | 188 | void cxios_set_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * time_origin, int time_origin_size) |
---|
| 189 | { |
---|
| 190 | std::string time_origin_str; |
---|
[581] | 191 | if (!cstr2string(time_origin, time_origin_size, time_origin_str)) return; |
---|
| 192 | CTimer::get("XIOS").resume(); |
---|
[549] | 193 | calendar_wrapper_hdl->time_origin.setValue(time_origin_str); |
---|
[581] | 194 | CTimer::get("XIOS").suspend(); |
---|
[549] | 195 | } |
---|
[581] | 196 | |
---|
[549] | 197 | void cxios_get_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, char * time_origin, int time_origin_size) |
---|
| 198 | { |
---|
[581] | 199 | CTimer::get("XIOS").resume(); |
---|
| 200 | if (!string_copy(calendar_wrapper_hdl->time_origin.getInheritedValue(), time_origin, time_origin_size)) |
---|
| 201 | ERROR("void cxios_get_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl, char * time_origin, int time_origin_size)", << "Input string is too short"); |
---|
| 202 | CTimer::get("XIOS").suspend(); |
---|
[549] | 203 | } |
---|
[581] | 204 | |
---|
| 205 | bool cxios_is_defined_calendar_wrapper_time_origin(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[549] | 206 | { |
---|
| 207 | CTimer::get("XIOS").resume(); |
---|
[581] | 208 | bool isDefined = calendar_wrapper_hdl->time_origin.hasInheritedValue(); |
---|
[549] | 209 | CTimer::get("XIOS").suspend(); |
---|
[581] | 210 | return isDefined; |
---|
[549] | 211 | } |
---|
[581] | 212 | |
---|
| 213 | |
---|
[549] | 214 | void cxios_set_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl, cxios_duration timestep_c) |
---|
| 215 | { |
---|
| 216 | CTimer::get("XIOS").resume(); |
---|
| 217 | calendar_wrapper_hdl->timestep.allocate(); |
---|
| 218 | CDuration& timestep = calendar_wrapper_hdl->timestep.get(); |
---|
| 219 | timestep.year = timestep_c.year; |
---|
| 220 | timestep.month = timestep_c.month; |
---|
| 221 | timestep.day = timestep_c.day; |
---|
| 222 | timestep.hour = timestep_c.hour; |
---|
| 223 | timestep.minute = timestep_c.minute; |
---|
| 224 | timestep.second = timestep_c.second; |
---|
| 225 | timestep.timestep = timestep_c.timestep; |
---|
| 226 | CTimer::get("XIOS").suspend(); |
---|
| 227 | } |
---|
[581] | 228 | |
---|
[549] | 229 | void cxios_get_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl, cxios_duration* timestep_c) |
---|
| 230 | { |
---|
| 231 | CTimer::get("XIOS").resume(); |
---|
| 232 | CDuration timestep = calendar_wrapper_hdl->timestep.getInheritedValue(); |
---|
| 233 | timestep_c->year = timestep.year; |
---|
| 234 | timestep_c->month = timestep.month; |
---|
| 235 | timestep_c->day = timestep.day; |
---|
| 236 | timestep_c->hour = timestep.hour; |
---|
| 237 | timestep_c->minute = timestep.minute; |
---|
| 238 | timestep_c->second = timestep.second; |
---|
| 239 | timestep_c->timestep = timestep.timestep; |
---|
| 240 | CTimer::get("XIOS").suspend(); |
---|
| 241 | } |
---|
[581] | 242 | |
---|
| 243 | bool cxios_is_defined_calendar_wrapper_timestep(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[549] | 244 | { |
---|
| 245 | CTimer::get("XIOS").resume(); |
---|
[581] | 246 | bool isDefined = calendar_wrapper_hdl->timestep.hasInheritedValue(); |
---|
[549] | 247 | CTimer::get("XIOS").suspend(); |
---|
[581] | 248 | return isDefined; |
---|
[549] | 249 | } |
---|
[581] | 250 | |
---|
| 251 | |
---|
[549] | 252 | void cxios_set_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, const char * type, int type_size) |
---|
| 253 | { |
---|
| 254 | std::string type_str; |
---|
[581] | 255 | if (!cstr2string(type, type_size, type_str)) return; |
---|
| 256 | CTimer::get("XIOS").resume(); |
---|
[549] | 257 | calendar_wrapper_hdl->type.fromString(type_str); |
---|
[581] | 258 | CTimer::get("XIOS").suspend(); |
---|
[549] | 259 | } |
---|
[581] | 260 | |
---|
[549] | 261 | void cxios_get_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, char * type, int type_size) |
---|
| 262 | { |
---|
[581] | 263 | CTimer::get("XIOS").resume(); |
---|
| 264 | if (!string_copy(calendar_wrapper_hdl->type.getInheritedStringValue(), type, type_size)) |
---|
| 265 | ERROR("void cxios_get_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl, char * type, int type_size)", << "Input string is too short"); |
---|
| 266 | CTimer::get("XIOS").suspend(); |
---|
[549] | 267 | } |
---|
[581] | 268 | |
---|
| 269 | bool cxios_is_defined_calendar_wrapper_type(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[549] | 270 | { |
---|
| 271 | CTimer::get("XIOS").resume(); |
---|
[581] | 272 | bool isDefined = calendar_wrapper_hdl->type.hasInheritedValue(); |
---|
[549] | 273 | CTimer::get("XIOS").suspend(); |
---|
[581] | 274 | return isDefined; |
---|
[549] | 275 | } |
---|
[581] | 276 | |
---|
| 277 | |
---|
[550] | 278 | void cxios_set_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int year_length) |
---|
| 279 | { |
---|
[581] | 280 | CTimer::get("XIOS").resume(); |
---|
[550] | 281 | calendar_wrapper_hdl->year_length.setValue(year_length); |
---|
[581] | 282 | CTimer::get("XIOS").suspend(); |
---|
[550] | 283 | } |
---|
[581] | 284 | |
---|
[550] | 285 | void cxios_get_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl, int* year_length) |
---|
| 286 | { |
---|
[581] | 287 | CTimer::get("XIOS").resume(); |
---|
[550] | 288 | *year_length = calendar_wrapper_hdl->year_length.getInheritedValue(); |
---|
[581] | 289 | CTimer::get("XIOS").suspend(); |
---|
[550] | 290 | } |
---|
[581] | 291 | |
---|
| 292 | bool cxios_is_defined_calendar_wrapper_year_length(calendar_wrapper_Ptr calendar_wrapper_hdl) |
---|
[550] | 293 | { |
---|
| 294 | CTimer::get("XIOS").resume(); |
---|
[581] | 295 | bool isDefined = calendar_wrapper_hdl->year_length.hasInheritedValue(); |
---|
[550] | 296 | CTimer::get("XIOS").suspend(); |
---|
[581] | 297 | return isDefined; |
---|
[550] | 298 | } |
---|
[549] | 299 | } |
---|