1 | /* ************************************************************************** * |
---|
2 | * Interface auto generated - do not modify * |
---|
3 | * ************************************************************************** */ |
---|
4 | |
---|
5 | #include <boost/multi_array.hpp> |
---|
6 | #include "xios.hpp" |
---|
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 | { |
---|
17 | typedef xios::CVariable* variable_Ptr; |
---|
18 | |
---|
19 | void cxios_set_variable_name(variable_Ptr variable_hdl, const char * name, int name_size) |
---|
20 | { |
---|
21 | std::string name_str; |
---|
22 | if (!cstr2string(name, name_size, name_str)) return; |
---|
23 | CTimer::get("XIOS").resume(); |
---|
24 | variable_hdl->name.setValue(name_str); |
---|
25 | CTimer::get("XIOS").suspend(); |
---|
26 | } |
---|
27 | |
---|
28 | void cxios_get_variable_name(variable_Ptr variable_hdl, char * name, int name_size) |
---|
29 | { |
---|
30 | CTimer::get("XIOS").resume(); |
---|
31 | if (!string_copy(variable_hdl->name.getInheritedValue(), name, name_size)) |
---|
32 | ERROR("void cxios_get_variable_name(variable_Ptr variable_hdl, char * name, int name_size)", << "Input string is too short"); |
---|
33 | CTimer::get("XIOS").suspend(); |
---|
34 | } |
---|
35 | |
---|
36 | bool cxios_is_defined_variable_name(variable_Ptr variable_hdl) |
---|
37 | { |
---|
38 | CTimer::get("XIOS").resume(); |
---|
39 | bool isDefined = variable_hdl->name.hasInheritedValue(); |
---|
40 | CTimer::get("XIOS").suspend(); |
---|
41 | return isDefined; |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
45 | void cxios_set_variable_ts_target(variable_Ptr variable_hdl, const char * ts_target, int ts_target_size) |
---|
46 | { |
---|
47 | std::string ts_target_str; |
---|
48 | if (!cstr2string(ts_target, ts_target_size, ts_target_str)) return; |
---|
49 | CTimer::get("XIOS").resume(); |
---|
50 | variable_hdl->ts_target.fromString(ts_target_str); |
---|
51 | CTimer::get("XIOS").suspend(); |
---|
52 | } |
---|
53 | |
---|
54 | void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size) |
---|
55 | { |
---|
56 | CTimer::get("XIOS").resume(); |
---|
57 | if (!string_copy(variable_hdl->ts_target.getInheritedStringValue(), ts_target, ts_target_size)) |
---|
58 | ERROR("void cxios_get_variable_ts_target(variable_Ptr variable_hdl, char * ts_target, int ts_target_size)", << "Input string is too short"); |
---|
59 | CTimer::get("XIOS").suspend(); |
---|
60 | } |
---|
61 | |
---|
62 | bool cxios_is_defined_variable_ts_target(variable_Ptr variable_hdl) |
---|
63 | { |
---|
64 | CTimer::get("XIOS").resume(); |
---|
65 | bool isDefined = variable_hdl->ts_target.hasInheritedValue(); |
---|
66 | CTimer::get("XIOS").suspend(); |
---|
67 | return isDefined; |
---|
68 | } |
---|
69 | |
---|
70 | |
---|
71 | void cxios_set_variable_type(variable_Ptr variable_hdl, const char * type, int type_size) |
---|
72 | { |
---|
73 | std::string type_str; |
---|
74 | if (!cstr2string(type, type_size, type_str)) return; |
---|
75 | CTimer::get("XIOS").resume(); |
---|
76 | variable_hdl->type.fromString(type_str); |
---|
77 | CTimer::get("XIOS").suspend(); |
---|
78 | } |
---|
79 | |
---|
80 | void cxios_get_variable_type(variable_Ptr variable_hdl, char * type, int type_size) |
---|
81 | { |
---|
82 | CTimer::get("XIOS").resume(); |
---|
83 | if (!string_copy(variable_hdl->type.getInheritedStringValue(), type, type_size)) |
---|
84 | ERROR("void cxios_get_variable_type(variable_Ptr variable_hdl, char * type, int type_size)", << "Input string is too short"); |
---|
85 | CTimer::get("XIOS").suspend(); |
---|
86 | } |
---|
87 | |
---|
88 | bool cxios_is_defined_variable_type(variable_Ptr variable_hdl) |
---|
89 | { |
---|
90 | CTimer::get("XIOS").resume(); |
---|
91 | bool isDefined = variable_hdl->type.hasInheritedValue(); |
---|
92 | CTimer::get("XIOS").suspend(); |
---|
93 | return isDefined; |
---|
94 | } |
---|
95 | } |
---|