[270] | 1 | /* ************************************************************************** * |
---|
| 2 | * Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011 * |
---|
| 3 | * ************************************************************************** */ |
---|
| 4 | |
---|
| 5 | #include <boost/multi_array.hpp> |
---|
| 6 | #include <boost/shared_ptr.hpp> |
---|
| 7 | |
---|
| 8 | #include "xmlioserver.hpp" |
---|
| 9 | |
---|
| 10 | #include "attribute_template_impl.hpp" |
---|
| 11 | #include "object_template_impl.hpp" |
---|
| 12 | #include "group_template_impl.hpp" |
---|
| 13 | |
---|
| 14 | #include "icutil.hpp" |
---|
| 15 | |
---|
| 16 | extern "C" |
---|
| 17 | { |
---|
| 18 | // /////////////////////////////// Définitions ////////////////////////////// // |
---|
| 19 | |
---|
| 20 | // ----------------------- Redéfinition de types ---------------------------- |
---|
| 21 | |
---|
| 22 | typedef xmlioserver::tree::CField * XFieldPtr; |
---|
| 23 | typedef xmlioserver::tree::CFieldGroup * XFieldGroupPtr; |
---|
| 24 | |
---|
| 25 | // ------------------------- Attributs des champs --------------------------- |
---|
| 26 | |
---|
| 27 | void xios_set_field_name(XFieldPtr field_hdl, const char * name, int name_size) |
---|
| 28 | { |
---|
| 29 | std::string name_str; |
---|
| 30 | if (!cstr2string(name, name_size, name_str)) return; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | void xios_set_field_standard_name(XFieldPtr field_hdl, const char * standard_name, int standard_name_size) |
---|
| 34 | { |
---|
| 35 | std::string standard_name_str; |
---|
| 36 | if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | void xios_set_field_long_name(XFieldPtr field_hdl, const char * long_name, int long_name_size) |
---|
| 40 | { |
---|
| 41 | std::string long_name_str; |
---|
| 42 | if (!cstr2string(long_name, long_name_size, long_name_str)) return; |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | void xios_set_field_unit(XFieldPtr field_hdl, const char * unit, int unit_size) |
---|
| 46 | { |
---|
| 47 | std::string unit_str; |
---|
| 48 | if (!cstr2string(unit, unit_size, unit_str)) return; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | void xios_set_field_operation(XFieldPtr field_hdl, const char * operation, int operation_size) |
---|
| 52 | { |
---|
| 53 | std::string operation_str; |
---|
| 54 | if (!cstr2string(operation, operation_size, operation_str)) return; |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | void xios_set_field_freq_op(XFieldPtr field_hdl, const char * freq_op, int freq_op_size) |
---|
| 58 | { |
---|
| 59 | std::string freq_op_str; |
---|
| 60 | if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | void xios_set_field_level(XFieldPtr field_hdl, int level) |
---|
| 64 | { |
---|
| 65 | |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | void xios_set_field_prec(XFieldPtr field_hdl, int prec) |
---|
| 69 | { |
---|
| 70 | |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | void xios_set_field_enabled(XFieldPtr field_hdl, bool enabled) |
---|
| 74 | { |
---|
| 75 | |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | void xios_set_field_domain_ref(XFieldPtr field_hdl, const char * domain_ref, int domain_ref_size) |
---|
| 79 | { |
---|
| 80 | std::string domain_ref_str; |
---|
| 81 | if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; |
---|
| 82 | } |
---|
| 83 | |
---|
| 84 | void xios_set_field_axis_ref(XFieldPtr field_hdl, const char * axis_ref, int axis_ref_size) |
---|
| 85 | { |
---|
| 86 | std::string axis_ref_str; |
---|
| 87 | if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | void xios_set_field_grid_ref(XFieldPtr field_hdl, const char * grid_ref, int grid_ref_size) |
---|
| 91 | { |
---|
| 92 | std::string grid_ref_str; |
---|
| 93 | if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; |
---|
| 94 | } |
---|
| 95 | |
---|
| 96 | void xios_set_field_field_ref(XFieldPtr field_hdl, const char * field_ref, int field_ref_size) |
---|
| 97 | { |
---|
| 98 | std::string field_ref_str; |
---|
| 99 | if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | void xios_set_field_default_value(XFieldPtr field_hdl, double default_value) |
---|
| 103 | { |
---|
| 104 | |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | // -------------------- Attributs des groupes de champs --------------------- |
---|
| 108 | |
---|
| 109 | void xios_set_fieldgroup_name(XFieldGroupPtr fieldgroup_hdl, const char * name, int name_size) |
---|
| 110 | { |
---|
| 111 | std::string name_str; |
---|
| 112 | if (!cstr2string(name, name_size, name_str)) return; |
---|
| 113 | } |
---|
| 114 | |
---|
| 115 | void xios_set_fieldgroup_standard_name(XFieldGroupPtr fieldgroup_hdl, const char * standard_name, int standard_name_size) |
---|
| 116 | { |
---|
| 117 | std::string standard_name_str; |
---|
| 118 | if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; |
---|
| 119 | } |
---|
| 120 | |
---|
| 121 | void xios_set_fieldgroup_long_name(XFieldGroupPtr fieldgroup_hdl, const char * long_name, int long_name_size) |
---|
| 122 | { |
---|
| 123 | std::string long_name_str; |
---|
| 124 | if (!cstr2string(long_name, long_name_size, long_name_str)) return; |
---|
| 125 | } |
---|
| 126 | |
---|
| 127 | void xios_set_fieldgroup_unit(XFieldGroupPtr fieldgroup_hdl, const char * unit, int unit_size) |
---|
| 128 | { |
---|
| 129 | std::string unit_str; |
---|
| 130 | if (!cstr2string(unit, unit_size, unit_str)) return; |
---|
| 131 | } |
---|
| 132 | |
---|
| 133 | void xios_set_fieldgroup_operation(XFieldGroupPtr fieldgroup_hdl, const char * operation, int operation_size) |
---|
| 134 | { |
---|
| 135 | std::string operation_str; |
---|
| 136 | if (!cstr2string(operation, operation_size, operation_str)) return; |
---|
| 137 | } |
---|
| 138 | |
---|
| 139 | void xios_set_fieldgroup_freq_op(XFieldGroupPtr fieldgroup_hdl, const char * freq_op, int freq_op_size) |
---|
| 140 | { |
---|
| 141 | std::string freq_op_str; |
---|
| 142 | if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; |
---|
| 143 | } |
---|
| 144 | |
---|
| 145 | void xios_set_fieldgroup_level(XFieldGroupPtr fieldgroup_hdl, int level) |
---|
| 146 | { |
---|
| 147 | |
---|
| 148 | } |
---|
| 149 | |
---|
| 150 | void xios_set_fieldgroup_prec(XFieldGroupPtr fieldgroup_hdl, int prec) |
---|
| 151 | { |
---|
| 152 | |
---|
| 153 | } |
---|
| 154 | |
---|
| 155 | void xios_set_fieldgroup_enabled(XFieldGroupPtr fieldgroup_hdl, bool enabled) |
---|
| 156 | { |
---|
| 157 | |
---|
| 158 | } |
---|
| 159 | |
---|
| 160 | void xios_set_fieldgroup_domain_ref(XFieldGroupPtr fieldgroup_hdl, const char * domain_ref, int domain_ref_size) |
---|
| 161 | { |
---|
| 162 | std::string domain_ref_str; |
---|
| 163 | if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; |
---|
| 164 | } |
---|
| 165 | |
---|
| 166 | void xios_set_fieldgroup_axis_ref(XFieldGroupPtr fieldgroup_hdl, const char * axis_ref, int axis_ref_size) |
---|
| 167 | { |
---|
| 168 | std::string axis_ref_str; |
---|
| 169 | if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; |
---|
| 170 | } |
---|
| 171 | |
---|
| 172 | void xios_set_fieldgroup_grid_ref(XFieldGroupPtr fieldgroup_hdl, const char * grid_ref, int grid_ref_size) |
---|
| 173 | { |
---|
| 174 | std::string grid_ref_str; |
---|
| 175 | if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; |
---|
| 176 | } |
---|
| 177 | |
---|
| 178 | void xios_set_fieldgroup_field_ref(XFieldGroupPtr fieldgroup_hdl, const char * field_ref, int field_ref_size) |
---|
| 179 | { |
---|
| 180 | std::string field_ref_str; |
---|
| 181 | if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; |
---|
| 182 | } |
---|
| 183 | |
---|
| 184 | void xios_set_fieldgroup_default_value(XFieldGroupPtr fieldgroup_hdl, double default_value) |
---|
| 185 | { |
---|
| 186 | |
---|
| 187 | } |
---|
| 188 | |
---|
| 189 | // ------------------------ Création des handle ----------------------------- |
---|
| 190 | |
---|
| 191 | void xios_field_handle_create (XFieldPtr * _ret, const char * _id, int _id_len) |
---|
| 192 | { |
---|
| 193 | std::string id; |
---|
| 194 | if (!cstr2string(_id, _id_len, id)) return; |
---|
| 195 | } |
---|
| 196 | |
---|
| 197 | void xios_fieldgroup_handle_create (XFieldGroupPtr * _ret, const char * _id, int _id_len) |
---|
| 198 | { |
---|
| 199 | std::string id; |
---|
| 200 | if (!cstr2string(_id, _id_len, id)) return; |
---|
| 201 | } |
---|
| 202 | |
---|
| 203 | } // extern "C" |
---|