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