source: XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp @ 416

Last change on this file since 416 was 416, checked in by ymipsl, 11 years ago

add some missing trace in c interface

YM

  • Property svn:eol-style set to native
File size: 6.2 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::CAxis*  axis_Ptr;
18 
19  void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size)
20  {
21    std::string long_name_str;
22    if(!cstr2string(long_name, long_name_size, long_name_str)) return;
23     CTimer::get("XIOS").resume();
24    axis_hdl->long_name.setValue(long_name_str);
25    axis_hdl->sendAttributToServer(axis_hdl->long_name);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(axis_hdl->long_name.getValue(),long_name , long_name_size))
33      ERROR("void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37 
38  void cxios_set_axis_name(axis_Ptr axis_hdl, const char * name, int name_size)
39  {
40    std::string name_str;
41    if(!cstr2string(name, name_size, name_str)) return;
42     CTimer::get("XIOS").resume();
43    axis_hdl->name.setValue(name_str);
44    axis_hdl->sendAttributToServer(axis_hdl->name);
45     CTimer::get("XIOS").suspend();
46  }
47 
48  void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)
49  {
50     CTimer::get("XIOS").resume();
51    if(!string_copy(axis_hdl->name.getValue(),name , name_size))
52      ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", <<"Input string is to short");
53     CTimer::get("XIOS").suspend();
54  }
55 
56 
57  void cxios_set_axis_positive(axis_Ptr axis_hdl, const char * positive, int positive_size)
58  {
59    std::string positive_str;
60    if(!cstr2string(positive, positive_size, positive_str)) return;
61     CTimer::get("XIOS").resume();
62    axis_hdl->positive.fromString(positive_str);
63    axis_hdl->sendAttributToServer(axis_hdl->positive);
64     CTimer::get("XIOS").suspend();
65  }
66 
67  void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)
68  {
69     CTimer::get("XIOS").resume();
70    if(!string_copy(axis_hdl->positive.getStringValue(),positive , positive_size))
71      ERROR("void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)", <<"Input string is to short");
72     CTimer::get("XIOS").suspend();
73  }
74 
75 
76  void cxios_set_axis_size(axis_Ptr axis_hdl, int size)
77  {
78     CTimer::get("XIOS").resume();
79    axis_hdl->size.setValue(size);
80    axis_hdl->sendAttributToServer(axis_hdl->size);
81     CTimer::get("XIOS").suspend();
82  }
83 
84  void cxios_get_axis_size(axis_Ptr axis_hdl, int* size)
85  {
86    *size = axis_hdl->size.getValue();
87  }
88 
89 
90  void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size)
91  {
92    std::string standard_name_str;
93    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
94     CTimer::get("XIOS").resume();
95    axis_hdl->standard_name.setValue(standard_name_str);
96    axis_hdl->sendAttributToServer(axis_hdl->standard_name);
97     CTimer::get("XIOS").suspend();
98  }
99 
100  void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)
101  {
102     CTimer::get("XIOS").resume();
103    if(!string_copy(axis_hdl->standard_name.getValue(),standard_name , standard_name_size))
104      ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short");
105     CTimer::get("XIOS").suspend();
106  }
107 
108 
109  void cxios_set_axis_unit(axis_Ptr axis_hdl, const char * unit, int unit_size)
110  {
111    std::string unit_str;
112    if(!cstr2string(unit, unit_size, unit_str)) return;
113     CTimer::get("XIOS").resume();
114    axis_hdl->unit.setValue(unit_str);
115    axis_hdl->sendAttributToServer(axis_hdl->unit);
116     CTimer::get("XIOS").suspend();
117  }
118 
119  void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)
120  {
121     CTimer::get("XIOS").resume();
122    if(!string_copy(axis_hdl->unit.getValue(),unit , unit_size))
123      ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", <<"Input string is to short");
124     CTimer::get("XIOS").suspend();
125  }
126 
127 
128  void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1)
129  {
130    CTimer::get("XIOS").resume();
131    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
132    axis_hdl->value.reference(tmp.copy());
133    axis_hdl->sendAttributToServer(axis_hdl->value);
134     CTimer::get("XIOS").suspend();
135  }
136 
137  void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int extent1)
138  {
139    CTimer::get("XIOS").resume();
140    CArray<double,1> tmp(value,shape(extent1),neverDeleteData) ;
141    tmp=axis_hdl->value ;
142     CTimer::get("XIOS").suspend();
143  }
144 
145 
146  void cxios_set_axis_zoom_begin(axis_Ptr axis_hdl, int zoom_begin)
147  {
148     CTimer::get("XIOS").resume();
149    axis_hdl->zoom_begin.setValue(zoom_begin);
150    axis_hdl->sendAttributToServer(axis_hdl->zoom_begin);
151     CTimer::get("XIOS").suspend();
152  }
153 
154  void cxios_get_axis_zoom_begin(axis_Ptr axis_hdl, int* zoom_begin)
155  {
156    *zoom_begin = axis_hdl->zoom_begin.getValue();
157  }
158 
159 
160  void cxios_set_axis_zoom_end(axis_Ptr axis_hdl, int zoom_end)
161  {
162     CTimer::get("XIOS").resume();
163    axis_hdl->zoom_end.setValue(zoom_end);
164    axis_hdl->sendAttributToServer(axis_hdl->zoom_end);
165     CTimer::get("XIOS").suspend();
166  }
167 
168  void cxios_get_axis_zoom_end(axis_Ptr axis_hdl, int* zoom_end)
169  {
170    *zoom_end = axis_hdl->zoom_end.getValue();
171  }
172 
173 
174  void cxios_set_axis_zoom_size(axis_Ptr axis_hdl, int zoom_size)
175  {
176     CTimer::get("XIOS").resume();
177    axis_hdl->zoom_size.setValue(zoom_size);
178    axis_hdl->sendAttributToServer(axis_hdl->zoom_size);
179     CTimer::get("XIOS").suspend();
180  }
181 
182  void cxios_get_axis_zoom_size(axis_Ptr axis_hdl, int* zoom_size)
183  {
184    *zoom_size = axis_hdl->zoom_size.getValue();
185  }
186 
187 
188 
189}
Note: See TracBrowser for help on using the repository browser.