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

Last change on this file since 325 was 325, checked in by ymipsl, 12 years ago

port to gfortran/g++

YM

  • Property svn:eol-style set to native
File size: 5.4 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_impl.hpp"
9#include "object_template_impl.hpp"
10#include "group_template_impl.hpp"
11#include "icutil.hpp"
12
13extern "C"
14{
15  typedef xmlioserver::tree::CFile*  file_Ptr;
16 
17  void cxios_set_file_description(file_Ptr file_hdl, const char * description, int description_size)
18  {
19    std::string description_str;
20    if(!cstr2string(description, description_size, description_str)) return;
21    file_hdl->description.setValue(description_str);
22    file_hdl->sendAttributToServer(file_hdl->description);
23  }
24 
25  void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)
26  {
27    if(!string_copy(file_hdl->description.getValue(),description , description_size))
28      ERROR("void cxios_get_file_description(file_Ptr file_hdl, char * description, int description_size)", <<"Input string is to short");
29  }
30 
31 
32  void cxios_set_file_enabled(file_Ptr file_hdl, bool enabled)
33  {
34    file_hdl->enabled.setValue(enabled);
35    file_hdl->sendAttributToServer(file_hdl->enabled);
36  }
37 
38  void cxios_get_file_enabled(file_Ptr file_hdl, bool* enabled)
39  {
40    *enabled = file_hdl->enabled.getValue();
41  }
42 
43 
44  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size)
45  {
46    std::string name_str;
47    if(!cstr2string(name, name_size, name_str)) return;
48    file_hdl->name.setValue(name_str);
49    file_hdl->sendAttributToServer(file_hdl->name);
50  }
51 
52  void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)
53  {
54    if(!string_copy(file_hdl->name.getValue(),name , name_size))
55      ERROR("void cxios_get_file_name(file_Ptr file_hdl, char * name, int name_size)", <<"Input string is to short");
56  }
57 
58 
59  void cxios_set_file_name_suffix(file_Ptr file_hdl, const char * name_suffix, int name_suffix_size)
60  {
61    std::string name_suffix_str;
62    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
63    file_hdl->name_suffix.setValue(name_suffix_str);
64    file_hdl->sendAttributToServer(file_hdl->name_suffix);
65  }
66 
67  void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)
68  {
69    if(!string_copy(file_hdl->name_suffix.getValue(),name_suffix , name_suffix_size))
70      ERROR("void cxios_get_file_name_suffix(file_Ptr file_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
71  }
72 
73 
74  void cxios_set_file_output_freq(file_Ptr file_hdl, const char * output_freq, int output_freq_size)
75  {
76    std::string output_freq_str;
77    if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return;
78    file_hdl->output_freq.setValue(output_freq_str);
79    file_hdl->sendAttributToServer(file_hdl->output_freq);
80  }
81 
82  void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)
83  {
84    if(!string_copy(file_hdl->output_freq.getValue(),output_freq , output_freq_size))
85      ERROR("void cxios_get_file_output_freq(file_Ptr file_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
86  }
87 
88 
89  void cxios_set_file_output_level(file_Ptr file_hdl, int output_level)
90  {
91    file_hdl->output_level.setValue(output_level);
92    file_hdl->sendAttributToServer(file_hdl->output_level);
93  }
94 
95  void cxios_get_file_output_level(file_Ptr file_hdl, int* output_level)
96  {
97    *output_level = file_hdl->output_level.getValue();
98  }
99 
100 
101  void cxios_set_file_split_freq(file_Ptr file_hdl, const char * split_freq, int split_freq_size)
102  {
103    std::string split_freq_str;
104    if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return;
105    file_hdl->split_freq.setValue(split_freq_str);
106    file_hdl->sendAttributToServer(file_hdl->split_freq);
107  }
108 
109  void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)
110  {
111    if(!string_copy(file_hdl->split_freq.getValue(),split_freq , split_freq_size))
112      ERROR("void cxios_get_file_split_freq(file_Ptr file_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
113  }
114 
115 
116  void cxios_set_file_sync_freq(file_Ptr file_hdl, const char * sync_freq, int sync_freq_size)
117  {
118    std::string sync_freq_str;
119    if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return;
120    file_hdl->sync_freq.setValue(sync_freq_str);
121    file_hdl->sendAttributToServer(file_hdl->sync_freq);
122  }
123 
124  void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)
125  {
126    if(!string_copy(file_hdl->sync_freq.getValue(),sync_freq , sync_freq_size))
127      ERROR("void cxios_get_file_sync_freq(file_Ptr file_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
128  }
129 
130 
131  void cxios_set_file_type(file_Ptr file_hdl, const char * type, int type_size)
132  {
133    std::string type_str;
134    if(!cstr2string(type, type_size, type_str)) return;
135    file_hdl->type.setValue(type_str);
136    file_hdl->sendAttributToServer(file_hdl->type);
137  }
138 
139  void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)
140  {
141    if(!string_copy(file_hdl->type.getValue(),type , type_size))
142      ERROR("void cxios_get_file_type(file_Ptr file_hdl, char * type, int type_size)", <<"Input string is to short");
143  }
144 
145 
146 
147}
Note: See TracBrowser for help on using the repository browser.