source: XIOS/trunk/src/interface/c_attr/icscalargroup_attr.cpp @ 891

Last change on this file since 891 was 891, checked in by mhnguyen, 8 years ago

Adding Fortran interface for reduce_axis_to_scalar

Test
+) On Curie
+) Only compilation

File size: 7.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 "xios.hpp"
8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "icutil.hpp"
12#include "icdate.hpp"
13#include "timer.hpp"
14#include "node_type.hpp"
15
16extern "C"
17{
18  typedef xios::CScalarGroup* scalargroup_Ptr;
19
20  void cxios_set_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, const char * group_ref, int group_ref_size)
21  {
22    std::string group_ref_str;
23    if (!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
24    CTimer::get("XIOS").resume();
25    scalargroup_hdl->group_ref.setValue(group_ref_str);
26    CTimer::get("XIOS").suspend();
27  }
28
29  void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)
30  {
31    CTimer::get("XIOS").resume();
32    if (!string_copy(scalargroup_hdl->group_ref.getInheritedValue(), group_ref, group_ref_size))
33      ERROR("void cxios_get_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl, char * group_ref, int group_ref_size)", << "Input string is too short");
34    CTimer::get("XIOS").suspend();
35  }
36
37  bool cxios_is_defined_scalargroup_group_ref(scalargroup_Ptr scalargroup_hdl)
38  {
39     CTimer::get("XIOS").resume();
40     bool isDefined = scalargroup_hdl->group_ref.hasInheritedValue();
41     CTimer::get("XIOS").suspend();
42     return isDefined;
43  }
44
45
46  void cxios_set_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, const char * long_name, int long_name_size)
47  {
48    std::string long_name_str;
49    if (!cstr2string(long_name, long_name_size, long_name_str)) return;
50    CTimer::get("XIOS").resume();
51    scalargroup_hdl->long_name.setValue(long_name_str);
52    CTimer::get("XIOS").suspend();
53  }
54
55  void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)
56  {
57    CTimer::get("XIOS").resume();
58    if (!string_copy(scalargroup_hdl->long_name.getInheritedValue(), long_name, long_name_size))
59      ERROR("void cxios_get_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl, char * long_name, int long_name_size)", << "Input string is too short");
60    CTimer::get("XIOS").suspend();
61  }
62
63  bool cxios_is_defined_scalargroup_long_name(scalargroup_Ptr scalargroup_hdl)
64  {
65     CTimer::get("XIOS").resume();
66     bool isDefined = scalargroup_hdl->long_name.hasInheritedValue();
67     CTimer::get("XIOS").suspend();
68     return isDefined;
69  }
70
71
72  void cxios_set_scalargroup_name(scalargroup_Ptr scalargroup_hdl, const char * name, int name_size)
73  {
74    std::string name_str;
75    if (!cstr2string(name, name_size, name_str)) return;
76    CTimer::get("XIOS").resume();
77    scalargroup_hdl->name.setValue(name_str);
78    CTimer::get("XIOS").suspend();
79  }
80
81  void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)
82  {
83    CTimer::get("XIOS").resume();
84    if (!string_copy(scalargroup_hdl->name.getInheritedValue(), name, name_size))
85      ERROR("void cxios_get_scalargroup_name(scalargroup_Ptr scalargroup_hdl, char * name, int name_size)", << "Input string is too short");
86    CTimer::get("XIOS").suspend();
87  }
88
89  bool cxios_is_defined_scalargroup_name(scalargroup_Ptr scalargroup_hdl)
90  {
91     CTimer::get("XIOS").resume();
92     bool isDefined = scalargroup_hdl->name.hasInheritedValue();
93     CTimer::get("XIOS").suspend();
94     return isDefined;
95  }
96
97
98  void cxios_set_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, const char * scalar_ref, int scalar_ref_size)
99  {
100    std::string scalar_ref_str;
101    if (!cstr2string(scalar_ref, scalar_ref_size, scalar_ref_str)) return;
102    CTimer::get("XIOS").resume();
103    scalargroup_hdl->scalar_ref.setValue(scalar_ref_str);
104    CTimer::get("XIOS").suspend();
105  }
106
107  void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)
108  {
109    CTimer::get("XIOS").resume();
110    if (!string_copy(scalargroup_hdl->scalar_ref.getInheritedValue(), scalar_ref, scalar_ref_size))
111      ERROR("void cxios_get_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl, char * scalar_ref, int scalar_ref_size)", << "Input string is too short");
112    CTimer::get("XIOS").suspend();
113  }
114
115  bool cxios_is_defined_scalargroup_scalar_ref(scalargroup_Ptr scalargroup_hdl)
116  {
117     CTimer::get("XIOS").resume();
118     bool isDefined = scalargroup_hdl->scalar_ref.hasInheritedValue();
119     CTimer::get("XIOS").suspend();
120     return isDefined;
121  }
122
123
124  void cxios_set_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, const char * standard_name, int standard_name_size)
125  {
126    std::string standard_name_str;
127    if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
128    CTimer::get("XIOS").resume();
129    scalargroup_hdl->standard_name.setValue(standard_name_str);
130    CTimer::get("XIOS").suspend();
131  }
132
133  void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)
134  {
135    CTimer::get("XIOS").resume();
136    if (!string_copy(scalargroup_hdl->standard_name.getInheritedValue(), standard_name, standard_name_size))
137      ERROR("void cxios_get_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl, char * standard_name, int standard_name_size)", << "Input string is too short");
138    CTimer::get("XIOS").suspend();
139  }
140
141  bool cxios_is_defined_scalargroup_standard_name(scalargroup_Ptr scalargroup_hdl)
142  {
143     CTimer::get("XIOS").resume();
144     bool isDefined = scalargroup_hdl->standard_name.hasInheritedValue();
145     CTimer::get("XIOS").suspend();
146     return isDefined;
147  }
148
149
150  void cxios_set_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, const char * unit, int unit_size)
151  {
152    std::string unit_str;
153    if (!cstr2string(unit, unit_size, unit_str)) return;
154    CTimer::get("XIOS").resume();
155    scalargroup_hdl->unit.setValue(unit_str);
156    CTimer::get("XIOS").suspend();
157  }
158
159  void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)
160  {
161    CTimer::get("XIOS").resume();
162    if (!string_copy(scalargroup_hdl->unit.getInheritedValue(), unit, unit_size))
163      ERROR("void cxios_get_scalargroup_unit(scalargroup_Ptr scalargroup_hdl, char * unit, int unit_size)", << "Input string is too short");
164    CTimer::get("XIOS").suspend();
165  }
166
167  bool cxios_is_defined_scalargroup_unit(scalargroup_Ptr scalargroup_hdl)
168  {
169     CTimer::get("XIOS").resume();
170     bool isDefined = scalargroup_hdl->unit.hasInheritedValue();
171     CTimer::get("XIOS").suspend();
172     return isDefined;
173  }
174
175
176  void cxios_set_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double value)
177  {
178    CTimer::get("XIOS").resume();
179    scalargroup_hdl->value.setValue(value);
180    CTimer::get("XIOS").suspend();
181  }
182
183  void cxios_get_scalargroup_value(scalargroup_Ptr scalargroup_hdl, double* value)
184  {
185    CTimer::get("XIOS").resume();
186    *value = scalargroup_hdl->value.getInheritedValue();
187    CTimer::get("XIOS").suspend();
188  }
189
190  bool cxios_is_defined_scalargroup_value(scalargroup_Ptr scalargroup_hdl)
191  {
192     CTimer::get("XIOS").resume();
193     bool isDefined = scalargroup_hdl->value.hasInheritedValue();
194     CTimer::get("XIOS").suspend();
195     return isDefined;
196  }
197}
Note: See TracBrowser for help on using the repository browser.