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