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 "timer.hpp" |
---|
13 | #include "node_type.hpp" |
---|
14 | |
---|
15 | extern "C" |
---|
16 | { |
---|
17 | typedef xios::CContext* context_Ptr; |
---|
18 | |
---|
19 | void cxios_set_context_calendar_type(context_Ptr context_hdl, const char * calendar_type, int calendar_type_size) |
---|
20 | { |
---|
21 | std::string calendar_type_str; |
---|
22 | if(!cstr2string(calendar_type, calendar_type_size, calendar_type_str)) return; |
---|
23 | CTimer::get("XIOS").resume(); |
---|
24 | context_hdl->calendar_type.setValue(calendar_type_str); |
---|
25 | context_hdl->sendAttributToServer(context_hdl->calendar_type); |
---|
26 | CTimer::get("XIOS").suspend(); |
---|
27 | } |
---|
28 | |
---|
29 | void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size) |
---|
30 | { |
---|
31 | CTimer::get("XIOS").resume(); |
---|
32 | if(!string_copy(context_hdl->calendar_type.getInheritedValue(),calendar_type , calendar_type_size)) |
---|
33 | ERROR("void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)", <<"Input string is to short"); |
---|
34 | CTimer::get("XIOS").suspend(); |
---|
35 | } |
---|
36 | |
---|
37 | bool cxios_is_defined_context_calendar_type(context_Ptr context_hdl ) |
---|
38 | { |
---|
39 | CTimer::get("XIOS").resume(); |
---|
40 | bool isDefined = context_hdl->calendar_type.hasInheritedValue(); |
---|
41 | CTimer::get("XIOS").suspend(); |
---|
42 | return isDefined; |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | void cxios_set_context_output_dir(context_Ptr context_hdl, const char * output_dir, int output_dir_size) |
---|
48 | { |
---|
49 | std::string output_dir_str; |
---|
50 | if(!cstr2string(output_dir, output_dir_size, output_dir_str)) return; |
---|
51 | CTimer::get("XIOS").resume(); |
---|
52 | context_hdl->output_dir.setValue(output_dir_str); |
---|
53 | context_hdl->sendAttributToServer(context_hdl->output_dir); |
---|
54 | CTimer::get("XIOS").suspend(); |
---|
55 | } |
---|
56 | |
---|
57 | void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size) |
---|
58 | { |
---|
59 | CTimer::get("XIOS").resume(); |
---|
60 | if(!string_copy(context_hdl->output_dir.getInheritedValue(),output_dir , output_dir_size)) |
---|
61 | ERROR("void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)", <<"Input string is to short"); |
---|
62 | CTimer::get("XIOS").suspend(); |
---|
63 | } |
---|
64 | |
---|
65 | bool cxios_is_defined_context_output_dir(context_Ptr context_hdl ) |
---|
66 | { |
---|
67 | CTimer::get("XIOS").resume(); |
---|
68 | bool isDefined = context_hdl->output_dir.hasInheritedValue(); |
---|
69 | CTimer::get("XIOS").suspend(); |
---|
70 | return isDefined; |
---|
71 | } |
---|
72 | |
---|
73 | |
---|
74 | |
---|
75 | void cxios_set_context_start_date(context_Ptr context_hdl, const char * start_date, int start_date_size) |
---|
76 | { |
---|
77 | std::string start_date_str; |
---|
78 | if(!cstr2string(start_date, start_date_size, start_date_str)) return; |
---|
79 | CTimer::get("XIOS").resume(); |
---|
80 | context_hdl->start_date.setValue(start_date_str); |
---|
81 | context_hdl->sendAttributToServer(context_hdl->start_date); |
---|
82 | CTimer::get("XIOS").suspend(); |
---|
83 | } |
---|
84 | |
---|
85 | void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size) |
---|
86 | { |
---|
87 | CTimer::get("XIOS").resume(); |
---|
88 | if(!string_copy(context_hdl->start_date.getInheritedValue(),start_date , start_date_size)) |
---|
89 | ERROR("void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)", <<"Input string is to short"); |
---|
90 | CTimer::get("XIOS").suspend(); |
---|
91 | } |
---|
92 | |
---|
93 | bool cxios_is_defined_context_start_date(context_Ptr context_hdl ) |
---|
94 | { |
---|
95 | CTimer::get("XIOS").resume(); |
---|
96 | bool isDefined = context_hdl->start_date.hasInheritedValue(); |
---|
97 | CTimer::get("XIOS").suspend(); |
---|
98 | return isDefined; |
---|
99 | } |
---|
100 | |
---|
101 | |
---|
102 | |
---|
103 | void cxios_set_context_time_origin(context_Ptr context_hdl, const char * time_origin, int time_origin_size) |
---|
104 | { |
---|
105 | std::string time_origin_str; |
---|
106 | if(!cstr2string(time_origin, time_origin_size, time_origin_str)) return; |
---|
107 | CTimer::get("XIOS").resume(); |
---|
108 | context_hdl->time_origin.setValue(time_origin_str); |
---|
109 | context_hdl->sendAttributToServer(context_hdl->time_origin); |
---|
110 | CTimer::get("XIOS").suspend(); |
---|
111 | } |
---|
112 | |
---|
113 | void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size) |
---|
114 | { |
---|
115 | CTimer::get("XIOS").resume(); |
---|
116 | if(!string_copy(context_hdl->time_origin.getInheritedValue(),time_origin , time_origin_size)) |
---|
117 | ERROR("void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)", <<"Input string is to short"); |
---|
118 | CTimer::get("XIOS").suspend(); |
---|
119 | } |
---|
120 | |
---|
121 | bool cxios_is_defined_context_time_origin(context_Ptr context_hdl ) |
---|
122 | { |
---|
123 | CTimer::get("XIOS").resume(); |
---|
124 | bool isDefined = context_hdl->time_origin.hasInheritedValue(); |
---|
125 | CTimer::get("XIOS").suspend(); |
---|
126 | return isDefined; |
---|
127 | } |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | void cxios_set_context_timestep(context_Ptr context_hdl, const char * timestep, int timestep_size) |
---|
132 | { |
---|
133 | std::string timestep_str; |
---|
134 | if(!cstr2string(timestep, timestep_size, timestep_str)) return; |
---|
135 | CTimer::get("XIOS").resume(); |
---|
136 | context_hdl->timestep.setValue(timestep_str); |
---|
137 | context_hdl->sendAttributToServer(context_hdl->timestep); |
---|
138 | CTimer::get("XIOS").suspend(); |
---|
139 | } |
---|
140 | |
---|
141 | void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size) |
---|
142 | { |
---|
143 | CTimer::get("XIOS").resume(); |
---|
144 | if(!string_copy(context_hdl->timestep.getInheritedValue(),timestep , timestep_size)) |
---|
145 | ERROR("void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)", <<"Input string is to short"); |
---|
146 | CTimer::get("XIOS").suspend(); |
---|
147 | } |
---|
148 | |
---|
149 | bool cxios_is_defined_context_timestep(context_Ptr context_hdl ) |
---|
150 | { |
---|
151 | CTimer::get("XIOS").resume(); |
---|
152 | bool isDefined = context_hdl->timestep.hasInheritedValue(); |
---|
153 | CTimer::get("XIOS").suspend(); |
---|
154 | return isDefined; |
---|
155 | } |
---|
156 | |
---|
157 | |
---|
158 | |
---|
159 | |
---|
160 | } |
---|