source: vendor/nemo/current/NEMOGCM/EXTERNAL/XIOS/src/interface/c_attr/icfile_attr.cpp @ 44

Last change on this file since 44 was 44, checked in by cholod, 12 years ago

Load NEMO_TMP into vendor/nemo/current.

File size: 7.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 "file.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_name(file_Ptr file_hdl, const char * name, int name_size)
53  {
54    std::string name_str;
55    if(!cstr2string(name, name_size, name_str)) return;
56     CTimer::get("XIOS").resume();
57    file_hdl->name.setValue(name_str);
58    file_hdl->sendAttributToServer(file_hdl->name);
59     CTimer::get("XIOS").suspend();
60  }
61 
62  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
63  {
64     CTimer::get("XIOS").resume();
65    if(!string_copy(file_hdl->name.getValue(),name , name_size))
66      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", <<"Input string is to short");
67     CTimer::get("XIOS").suspend();
68  }
69 
70 
71  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
72  {
73    std::string name_suffix_str;
74    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
75     CTimer::get("XIOS").resume();
76    file_hdl->name_suffix.setValue(name_suffix_str);
77    file_hdl->sendAttributToServer(file_hdl->name_suffix);
78     CTimer::get("XIOS").suspend();
79  }
80 
81  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
82  {
83     CTimer::get("XIOS").resume();
84    if(!string_copy(file_hdl->name_suffix.getValue(),name_suffix , name_suffix_size))
85      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
86     CTimer::get("XIOS").suspend();
87  }
88 
89 
90  void cxios_set_file_output_freq(file_Ptr file_hdl, const char * output_freq, int output_freq_size)
91  {
92    std::string output_freq_str;
93    if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return;
94     CTimer::get("XIOS").resume();
95    file_hdl->output_freq.setValue(output_freq_str);
96    file_hdl->sendAttributToServer(file_hdl->output_freq);
97     CTimer::get("XIOS").suspend();
98  }
99 
100  void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)
101  {
102     CTimer::get("XIOS").resume();
103    if(!string_copy(file_hdl->output_freq.getValue(),output_freq , output_freq_size))
104      ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
105     CTimer::get("XIOS").suspend();
106  }
107 
108 
109  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
110  {
111     CTimer::get("XIOS").resume();
112    file_hdl->output_level.setValue(output_level);
113    file_hdl->sendAttributToServer(file_hdl->output_level);
114     CTimer::get("XIOS").suspend();
115  }
116 
117  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
118  {
119    *output_level = file_hdl->output_level.getValue();
120  }
121 
122 
123  void cxios_set_file_par_access(file_Ptr file_hdl, const char * par_access, int par_access_size)
124  {
125    std::string par_access_str;
126    if(!cstr2string(par_access, par_access_size, par_access_str)) return;
127     CTimer::get("XIOS").resume();
128    file_hdl->par_access.setValue(par_access_str);
129    file_hdl->sendAttributToServer(file_hdl->par_access);
130     CTimer::get("XIOS").suspend();
131  }
132 
133  void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)
134  {
135     CTimer::get("XIOS").resume();
136    if(!string_copy(file_hdl->par_access.getValue(),par_access , par_access_size))
137      ERROR("void cxios_get_file_par_access(file_Ptr file_hdl, char * par_access, int par_access_size)", <<"Input string is to short");
138     CTimer::get("XIOS").suspend();
139  }
140 
141 
142  void cxios_set_file_split_freq(file_Ptr file_hdl, const char * split_freq, int split_freq_size)
143  {
144    std::string split_freq_str;
145    if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return;
146     CTimer::get("XIOS").resume();
147    file_hdl->split_freq.setValue(split_freq_str);
148    file_hdl->sendAttributToServer(file_hdl->split_freq);
149     CTimer::get("XIOS").suspend();
150  }
151 
152  void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)
153  {
154     CTimer::get("XIOS").resume();
155    if(!string_copy(file_hdl->split_freq.getValue(),split_freq , split_freq_size))
156      ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
157     CTimer::get("XIOS").suspend();
158  }
159 
160 
161  void cxios_set_file_sync_freq(file_Ptr file_hdl, const char * sync_freq, int sync_freq_size)
162  {
163    std::string sync_freq_str;
164    if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return;
165     CTimer::get("XIOS").resume();
166    file_hdl->sync_freq.setValue(sync_freq_str);
167    file_hdl->sendAttributToServer(file_hdl->sync_freq);
168     CTimer::get("XIOS").suspend();
169  }
170 
171  void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)
172  {
173     CTimer::get("XIOS").resume();
174    if(!string_copy(file_hdl->sync_freq.getValue(),sync_freq , sync_freq_size))
175      ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
176     CTimer::get("XIOS").suspend();
177  }
178 
179 
180  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
181  {
182    std::string type_str;
183    if(!cstr2string(type, type_size, type_str)) return;
184     CTimer::get("XIOS").resume();
185    file_hdl->type.setValue(type_str);
186    file_hdl->sendAttributToServer(file_hdl->type);
187     CTimer::get("XIOS").suspend();
188  }
189 
190  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
191  {
192     CTimer::get("XIOS").resume();
193    if(!string_copy(file_hdl->type.getValue(),type , type_size))
194      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short");
195     CTimer::get("XIOS").suspend();
196  }
197 
198 
199 
200}
Note: See TracBrowser for help on using the repository browser.