[325] | 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" |
---|
[352] | 8 | #include "attribute_template.hpp" |
---|
| 9 | #include "object_template.hpp" |
---|
| 10 | #include "group_template.hpp" |
---|
[325] | 11 | #include "icutil.hpp" |
---|
[347] | 12 | #include "timer.hpp" |
---|
[369] | 13 | #include "node_type.hpp" |
---|
[325] | 14 | |
---|
| 15 | extern "C" |
---|
| 16 | { |
---|
[345] | 17 | typedef xios::CGrid* grid_Ptr; |
---|
[325] | 18 | |
---|
| 19 | void cxios_set_grid_axis_ref(grid_Ptr grid_hdl, const char * axis_ref, int axis_ref_size) |
---|
| 20 | { |
---|
| 21 | std::string axis_ref_str; |
---|
| 22 | if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; |
---|
[347] | 23 | CTimer::get("XIOS").resume(); |
---|
[325] | 24 | grid_hdl->axis_ref.setValue(axis_ref_str); |
---|
| 25 | grid_hdl->sendAttributToServer(grid_hdl->axis_ref); |
---|
[347] | 26 | CTimer::get("XIOS").suspend(); |
---|
[325] | 27 | } |
---|
| 28 | |
---|
| 29 | void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size) |
---|
| 30 | { |
---|
[347] | 31 | CTimer::get("XIOS").resume(); |
---|
[445] | 32 | if(!string_copy(grid_hdl->axis_ref.getInheritedValue(),axis_ref , axis_ref_size)) |
---|
[325] | 33 | ERROR("void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short"); |
---|
[347] | 34 | CTimer::get("XIOS").suspend(); |
---|
[325] | 35 | } |
---|
| 36 | |
---|
[432] | 37 | bool cxios_is_defined_grid_axis_ref(grid_Ptr grid_hdl ) |
---|
| 38 | { |
---|
| 39 | CTimer::get("XIOS").resume(); |
---|
[445] | 40 | return grid_hdl->axis_ref.hasInheritedValue(); |
---|
[432] | 41 | CTimer::get("XIOS").suspend(); |
---|
| 42 | } |
---|
[325] | 43 | |
---|
[432] | 44 | |
---|
| 45 | |
---|
[325] | 46 | void cxios_set_grid_description(grid_Ptr grid_hdl, const char * description, int description_size) |
---|
| 47 | { |
---|
| 48 | std::string description_str; |
---|
| 49 | if(!cstr2string(description, description_size, description_str)) return; |
---|
[347] | 50 | CTimer::get("XIOS").resume(); |
---|
[325] | 51 | grid_hdl->description.setValue(description_str); |
---|
| 52 | grid_hdl->sendAttributToServer(grid_hdl->description); |
---|
[347] | 53 | CTimer::get("XIOS").suspend(); |
---|
[325] | 54 | } |
---|
| 55 | |
---|
| 56 | void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size) |
---|
| 57 | { |
---|
[347] | 58 | CTimer::get("XIOS").resume(); |
---|
[445] | 59 | if(!string_copy(grid_hdl->description.getInheritedValue(),description , description_size)) |
---|
[325] | 60 | ERROR("void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)", <<"Input string is to short"); |
---|
[347] | 61 | CTimer::get("XIOS").suspend(); |
---|
[325] | 62 | } |
---|
| 63 | |
---|
[432] | 64 | bool cxios_is_defined_grid_description(grid_Ptr grid_hdl ) |
---|
| 65 | { |
---|
| 66 | CTimer::get("XIOS").resume(); |
---|
[445] | 67 | return grid_hdl->description.hasInheritedValue(); |
---|
[432] | 68 | CTimer::get("XIOS").suspend(); |
---|
| 69 | } |
---|
[325] | 70 | |
---|
[432] | 71 | |
---|
| 72 | |
---|
[325] | 73 | void cxios_set_grid_domain_ref(grid_Ptr grid_hdl, const char * domain_ref, int domain_ref_size) |
---|
| 74 | { |
---|
| 75 | std::string domain_ref_str; |
---|
| 76 | if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; |
---|
[347] | 77 | CTimer::get("XIOS").resume(); |
---|
[325] | 78 | grid_hdl->domain_ref.setValue(domain_ref_str); |
---|
| 79 | grid_hdl->sendAttributToServer(grid_hdl->domain_ref); |
---|
[347] | 80 | CTimer::get("XIOS").suspend(); |
---|
[325] | 81 | } |
---|
| 82 | |
---|
| 83 | void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size) |
---|
| 84 | { |
---|
[347] | 85 | CTimer::get("XIOS").resume(); |
---|
[445] | 86 | if(!string_copy(grid_hdl->domain_ref.getInheritedValue(),domain_ref , domain_ref_size)) |
---|
[325] | 87 | ERROR("void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short"); |
---|
[347] | 88 | CTimer::get("XIOS").suspend(); |
---|
[325] | 89 | } |
---|
| 90 | |
---|
[432] | 91 | bool cxios_is_defined_grid_domain_ref(grid_Ptr grid_hdl ) |
---|
| 92 | { |
---|
| 93 | CTimer::get("XIOS").resume(); |
---|
[445] | 94 | return grid_hdl->domain_ref.hasInheritedValue(); |
---|
[432] | 95 | CTimer::get("XIOS").suspend(); |
---|
| 96 | } |
---|
[325] | 97 | |
---|
[432] | 98 | |
---|
| 99 | |
---|
[415] | 100 | void cxios_set_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3) |
---|
| 101 | { |
---|
| 102 | CTimer::get("XIOS").resume(); |
---|
| 103 | CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ; |
---|
| 104 | grid_hdl->mask.reference(tmp.copy()); |
---|
| 105 | grid_hdl->sendAttributToServer(grid_hdl->mask); |
---|
[416] | 106 | CTimer::get("XIOS").suspend(); |
---|
[415] | 107 | } |
---|
| 108 | |
---|
| 109 | void cxios_get_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3) |
---|
| 110 | { |
---|
[416] | 111 | CTimer::get("XIOS").resume(); |
---|
[415] | 112 | CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ; |
---|
[445] | 113 | tmp=grid_hdl->mask.getInheritedValue() ; |
---|
[415] | 114 | CTimer::get("XIOS").suspend(); |
---|
| 115 | } |
---|
| 116 | |
---|
[432] | 117 | bool cxios_is_defined_grid_mask(grid_Ptr grid_hdl ) |
---|
| 118 | { |
---|
| 119 | CTimer::get("XIOS").resume(); |
---|
[445] | 120 | return grid_hdl->mask.hasInheritedValue(); |
---|
[432] | 121 | CTimer::get("XIOS").suspend(); |
---|
| 122 | } |
---|
[415] | 123 | |
---|
[432] | 124 | |
---|
| 125 | |
---|
[325] | 126 | void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size) |
---|
| 127 | { |
---|
| 128 | std::string name_str; |
---|
| 129 | if(!cstr2string(name, name_size, name_str)) return; |
---|
[347] | 130 | CTimer::get("XIOS").resume(); |
---|
[325] | 131 | grid_hdl->name.setValue(name_str); |
---|
| 132 | grid_hdl->sendAttributToServer(grid_hdl->name); |
---|
[347] | 133 | CTimer::get("XIOS").suspend(); |
---|
[325] | 134 | } |
---|
| 135 | |
---|
| 136 | void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size) |
---|
| 137 | { |
---|
[347] | 138 | CTimer::get("XIOS").resume(); |
---|
[445] | 139 | if(!string_copy(grid_hdl->name.getInheritedValue(),name , name_size)) |
---|
[325] | 140 | ERROR("void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)", <<"Input string is to short"); |
---|
[347] | 141 | CTimer::get("XIOS").suspend(); |
---|
[325] | 142 | } |
---|
| 143 | |
---|
[432] | 144 | bool cxios_is_defined_grid_name(grid_Ptr grid_hdl ) |
---|
| 145 | { |
---|
| 146 | CTimer::get("XIOS").resume(); |
---|
[445] | 147 | return grid_hdl->name.hasInheritedValue(); |
---|
[432] | 148 | CTimer::get("XIOS").suspend(); |
---|
| 149 | } |
---|
[325] | 150 | |
---|
| 151 | |
---|
[432] | 152 | |
---|
| 153 | |
---|
[325] | 154 | } |
---|