source: XIOS/trunk/src/interface/c_attr/icfile_attr.cpp @ 415

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

Add grid mask attribute

YM

  • Property svn:eol-style set to native
File size: 7.7 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::CFile*  file_Ptr;
18 
19  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size)
20  {
21    std::string description_str;
22    if(!cstr2string(description, description_size, description_str)) return;
23     CTimer::get("XIOS").resume();
24    file_hdl->description.setValue(description_str);
25    file_hdl->sendAttributToServer(file_hdl->description);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(file_hdl->description.getValue(),description , description_size))
33      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37 
38  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
39  {
40     CTimer::get("XIOS").resume();
41    file_hdl->enabled.setValue(enabled);
42    file_hdl->sendAttributToServer(file_hdl->enabled);
43     CTimer::get("XIOS").suspend();
44  }
45 
46  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
47  {
48    *enabled = file_hdl->enabled.getValue();
49  }
50 
51 
52  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits)
53  {
54     CTimer::get("XIOS").resume();
55    file_hdl->min_digits.setValue(min_digits);
56    file_hdl->sendAttributToServer(file_hdl->min_digits);
57     CTimer::get("XIOS").suspend();
58  }
59 
60  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits)
61  {
62    *min_digits = file_hdl->min_digits.getValue();
63  }
64 
65 
66  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
67  {
68    std::string name_str;
69    if(!cstr2string(name, name_size, name_str)) return;
70     CTimer::get("XIOS").resume();
71    file_hdl->name.setValue(name_str);
72    file_hdl->sendAttributToServer(file_hdl->name);
73     CTimer::get("XIOS").suspend();
74  }
75 
76  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
77  {
78     CTimer::get("XIOS").resume();
79    if(!string_copy(file_hdl->name.getValue(),name , name_size))
80      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", <<"Input string is to short");
81     CTimer::get("XIOS").suspend();
82  }
83 
84 
85  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
86  {
87    std::string name_suffix_str;
88    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
89     CTimer::get("XIOS").resume();
90    file_hdl->name_suffix.setValue(name_suffix_str);
91    file_hdl->sendAttributToServer(file_hdl->name_suffix);
92     CTimer::get("XIOS").suspend();
93  }
94 
95  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
96  {
97     CTimer::get("XIOS").resume();
98    if(!string_copy(file_hdl->name_suffix.getValue(),name_suffix , name_suffix_size))
99      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
100     CTimer::get("XIOS").suspend();
101  }
102 
103 
104  void cxios_set_file_output_freq(file_Ptr file_hdl, const char * output_freq, int output_freq_size)
105  {
106    std::string output_freq_str;
107    if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return;
108     CTimer::get("XIOS").resume();
109    file_hdl->output_freq.setValue(output_freq_str);
110    file_hdl->sendAttributToServer(file_hdl->output_freq);
111     CTimer::get("XIOS").suspend();
112  }
113 
114  void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)
115  {
116     CTimer::get("XIOS").resume();
117    if(!string_copy(file_hdl->output_freq.getValue(),output_freq , output_freq_size))
118      ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
119     CTimer::get("XIOS").suspend();
120  }
121 
122 
123  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
124  {
125     CTimer::get("XIOS").resume();
126    file_hdl->output_level.setValue(output_level);
127    file_hdl->sendAttributToServer(file_hdl->output_level);
128     CTimer::get("XIOS").suspend();
129  }
130 
131  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
132  {
133    *output_level = file_hdl->output_level.getValue();
134  }
135 
136 
137  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
138  {
139    std::string par_access_str;
140    if(!cstr2string(par_access, par_access_size, par_access_str)) return;
141     CTimer::get("XIOS").resume();
142    file_hdl->par_access.setValue(par_access_str);
143    file_hdl->sendAttributToServer(file_hdl->par_access);
144     CTimer::get("XIOS").suspend();
145  }
146 
147  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
148  {
149     CTimer::get("XIOS").resume();
150    if(!string_copy(file_hdl->par_access.getValue(),par_access , par_access_size))
151      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short");
152     CTimer::get("XIOS").suspend();
153  }
154 
155 
156  void cxios_set_file_split_freq(file_Ptr file_hdl, const char * split_freq, int split_freq_size)
157  {
158    std::string split_freq_str;
159    if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return;
160     CTimer::get("XIOS").resume();
161    file_hdl->split_freq.setValue(split_freq_str);
162    file_hdl->sendAttributToServer(file_hdl->split_freq);
163     CTimer::get("XIOS").suspend();
164  }
165 
166  void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)
167  {
168     CTimer::get("XIOS").resume();
169    if(!string_copy(file_hdl->split_freq.getValue(),split_freq , split_freq_size))
170      ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
171     CTimer::get("XIOS").suspend();
172  }
173 
174 
175  void cxios_set_file_sync_freq(file_Ptr file_hdl, const char * sync_freq, int sync_freq_size)
176  {
177    std::string sync_freq_str;
178    if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return;
179     CTimer::get("XIOS").resume();
180    file_hdl->sync_freq.setValue(sync_freq_str);
181    file_hdl->sendAttributToServer(file_hdl->sync_freq);
182     CTimer::get("XIOS").suspend();
183  }
184 
185  void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)
186  {
187     CTimer::get("XIOS").resume();
188    if(!string_copy(file_hdl->sync_freq.getValue(),sync_freq , sync_freq_size))
189      ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
190     CTimer::get("XIOS").suspend();
191  }
192 
193 
194  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
195  {
196    std::string type_str;
197    if(!cstr2string(type, type_size, type_str)) return;
198     CTimer::get("XIOS").resume();
199    file_hdl->type.fromString(type_str);
200    file_hdl->sendAttributToServer(file_hdl->type);
201     CTimer::get("XIOS").suspend();
202  }
203 
204  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
205  {
206     CTimer::get("XIOS").resume();
207    if(!string_copy(file_hdl->type.getStringValue(),type , type_size))
208      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short");
209     CTimer::get("XIOS").suspend();
210  }
211 
212 
213 
214}
Note: See TracBrowser for help on using the repository browser.