source: XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp @ 529

Last change on this file since 529 was 509, checked in by mhnguyen, 10 years ago

Implementing buffer size auto-detection for mode client -server

+) Process xml tree in client side then send all the information to server
+) Only information enabled fields in enabled files are sent to server
+) Some important change in structure of code which must be refactored

Test
+) On Curie
+) Only mode client-server
+) Passed for all tests

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 9.3 KB
Line 
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
15extern "C"
16{
17  typedef xios::CAxisGroup*  axisgroup_Ptr;
18 
19  void cxios_set_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, const char * group_ref, int group_ref_size)
20  {
21    std::string group_ref_str;
22    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
23     CTimer::get("XIOS").resume();
24    axisgroup_hdl->group_ref.setValue(group_ref_str);
25     CTimer::get("XIOS").suspend();
26  }
27 
28  void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)
29  {
30     CTimer::get("XIOS").resume();
31    if(!string_copy(axisgroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size))
32      ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
33     CTimer::get("XIOS").suspend();
34  }
35 
36  bool cxios_is_defined_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl )
37  {
38     CTimer::get("XIOS").resume();
39    return axisgroup_hdl->group_ref.hasInheritedValue();
40     CTimer::get("XIOS").suspend();
41  }
42 
43 
44 
45  void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size)
46  {
47    std::string long_name_str;
48    if(!cstr2string(long_name, long_name_size, long_name_str)) return;
49     CTimer::get("XIOS").resume();
50    axisgroup_hdl->long_name.setValue(long_name_str);
51     CTimer::get("XIOS").suspend();
52  }
53 
54  void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)
55  {
56     CTimer::get("XIOS").resume();
57    if(!string_copy(axisgroup_hdl->long_name.getInheritedValue(),long_name , long_name_size))
58      ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short");
59     CTimer::get("XIOS").suspend();
60  }
61 
62  bool cxios_is_defined_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl )
63  {
64     CTimer::get("XIOS").resume();
65    return axisgroup_hdl->long_name.hasInheritedValue();
66     CTimer::get("XIOS").suspend();
67  }
68 
69 
70 
71  void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size)
72  {
73    std::string name_str;
74    if(!cstr2string(name, name_size, name_str)) return;
75     CTimer::get("XIOS").resume();
76    axisgroup_hdl->name.setValue(name_str);
77     CTimer::get("XIOS").suspend();
78  }
79 
80  void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)
81  {
82     CTimer::get("XIOS").resume();
83    if(!string_copy(axisgroup_hdl->name.getInheritedValue(),name , name_size))
84      ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", <<"Input string is to short");
85     CTimer::get("XIOS").suspend();
86  }
87 
88  bool cxios_is_defined_axisgroup_name(axisgroup_Ptr axisgroup_hdl )
89  {
90     CTimer::get("XIOS").resume();
91    return axisgroup_hdl->name.hasInheritedValue();
92     CTimer::get("XIOS").suspend();
93  }
94 
95 
96 
97  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size)
98  {
99    std::string positive_str;
100    if(!cstr2string(positive, positive_size, positive_str)) return;
101     CTimer::get("XIOS").resume();
102    axisgroup_hdl->positive.fromString(positive_str);
103     CTimer::get("XIOS").suspend();
104  }
105 
106  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)
107  {
108     CTimer::get("XIOS").resume();
109    if(!string_copy(axisgroup_hdl->positive.getInheritedStringValue(),positive , positive_size))
110      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", <<"Input string is to short");
111     CTimer::get("XIOS").suspend();
112  }
113 
114  bool cxios_is_defined_axisgroup_positive(axisgroup_Ptr axisgroup_hdl )
115  {
116     CTimer::get("XIOS").resume();
117    return axisgroup_hdl->positive.hasInheritedValue();
118     CTimer::get("XIOS").suspend();
119  }
120 
121 
122 
123  void cxios_set_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int size)
124  {
125     CTimer::get("XIOS").resume();
126    axisgroup_hdl->size.setValue(size);
127     CTimer::get("XIOS").suspend();
128  }
129 
130  void cxios_get_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int* size)
131  {
132    *size = axisgroup_hdl->size.getInheritedValue();
133  }
134 
135  bool cxios_is_defined_axisgroup_size(axisgroup_Ptr axisgroup_hdl )
136  {
137     CTimer::get("XIOS").resume();
138    return axisgroup_hdl->size.hasInheritedValue();
139     CTimer::get("XIOS").suspend();
140  }
141 
142 
143 
144  void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size)
145  {
146    std::string standard_name_str;
147    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
148     CTimer::get("XIOS").resume();
149    axisgroup_hdl->standard_name.setValue(standard_name_str);
150     CTimer::get("XIOS").suspend();
151  }
152 
153  void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)
154  {
155     CTimer::get("XIOS").resume();
156    if(!string_copy(axisgroup_hdl->standard_name.getInheritedValue(),standard_name , standard_name_size))
157      ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short");
158     CTimer::get("XIOS").suspend();
159  }
160 
161  bool cxios_is_defined_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl )
162  {
163     CTimer::get("XIOS").resume();
164    return axisgroup_hdl->standard_name.hasInheritedValue();
165     CTimer::get("XIOS").suspend();
166  }
167 
168 
169 
170  void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size)
171  {
172    std::string unit_str;
173    if(!cstr2string(unit, unit_size, unit_str)) return;
174     CTimer::get("XIOS").resume();
175    axisgroup_hdl->unit.setValue(unit_str);
176     CTimer::get("XIOS").suspend();
177  }
178 
179  void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)
180  {
181     CTimer::get("XIOS").resume();
182    if(!string_copy(axisgroup_hdl->unit.getInheritedValue(),unit , unit_size))
183      ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", <<"Input string is to short");
184     CTimer::get("XIOS").suspend();
185  }
186 
187  bool cxios_is_defined_axisgroup_unit(axisgroup_Ptr axisgroup_hdl )
188  {
189     CTimer::get("XIOS").resume();
190    return axisgroup_hdl->unit.hasInheritedValue();
191     CTimer::get("XIOS").suspend();
192  }
193 
194 
195 
196  void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1)
197  {
198    CTimer::get("XIOS").resume();
199    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
200    axisgroup_hdl->value.reference(tmp.copy());
201     CTimer::get("XIOS").suspend();
202  }
203 
204  void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1)
205  {
206    CTimer::get("XIOS").resume();
207    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
208    tmp=axisgroup_hdl->value.getInheritedValue() ;
209     CTimer::get("XIOS").suspend();
210  }
211 
212  bool cxios_is_defined_axisgroup_value(axisgroup_Ptr axisgroup_hdl )
213  {
214     CTimer::get("XIOS").resume();
215    return axisgroup_hdl->value.hasInheritedValue();
216     CTimer::get("XIOS").suspend();
217  }
218 
219 
220 
221  void cxios_set_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl, int zoom_begin)
222  {
223     CTimer::get("XIOS").resume();
224    axisgroup_hdl->zoom_begin.setValue(zoom_begin);
225     CTimer::get("XIOS").suspend();
226  }
227 
228  void cxios_get_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl, int* zoom_begin)
229  {
230    *zoom_begin = axisgroup_hdl->zoom_begin.getInheritedValue();
231  }
232 
233  bool cxios_is_defined_axisgroup_zoom_begin(axisgroup_Ptr axisgroup_hdl )
234  {
235     CTimer::get("XIOS").resume();
236    return axisgroup_hdl->zoom_begin.hasInheritedValue();
237     CTimer::get("XIOS").suspend();
238  }
239 
240 
241 
242  void cxios_set_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl, int zoom_end)
243  {
244     CTimer::get("XIOS").resume();
245    axisgroup_hdl->zoom_end.setValue(zoom_end);
246     CTimer::get("XIOS").suspend();
247  }
248 
249  void cxios_get_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl, int* zoom_end)
250  {
251    *zoom_end = axisgroup_hdl->zoom_end.getInheritedValue();
252  }
253 
254  bool cxios_is_defined_axisgroup_zoom_end(axisgroup_Ptr axisgroup_hdl )
255  {
256     CTimer::get("XIOS").resume();
257    return axisgroup_hdl->zoom_end.hasInheritedValue();
258     CTimer::get("XIOS").suspend();
259  }
260 
261 
262 
263  void cxios_set_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl, int zoom_size)
264  {
265     CTimer::get("XIOS").resume();
266    axisgroup_hdl->zoom_size.setValue(zoom_size);
267     CTimer::get("XIOS").suspend();
268  }
269 
270  void cxios_get_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl, int* zoom_size)
271  {
272    *zoom_size = axisgroup_hdl->zoom_size.getInheritedValue();
273  }
274 
275  bool cxios_is_defined_axisgroup_zoom_size(axisgroup_Ptr axisgroup_hdl )
276  {
277     CTimer::get("XIOS").resume();
278    return axisgroup_hdl->zoom_size.hasInheritedValue();
279     CTimer::get("XIOS").suspend();
280  }
281 
282 
283 
284 
285}
Note: See TracBrowser for help on using the repository browser.