source: XMLIO_V2/dev/dev_rv/src4/xmlio/fortran/icfield.cpp @ 269

Last change on this file since 269 was 269, checked in by hozdoba, 13 years ago
File size: 6.2 KB
Line 
1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include "icutil.hpp"
6
7extern "C"
8{
9// /////////////////////////////// Définitions ////////////////////////////// //
10
11   // ----------------------- Redéfinition de types ----------------------------
12   
13   typedef void * XFieldPtr, * XFieldGroupPtr;
14
15   // ------------------------- Attributs des champs ---------------------------
16   
17   void xios_set_field_name(XFieldPtr field_hdl, const char * name, int name_size)
18   {
19      std::string name_str; 
20      if (!cstr2string(name, name_size, name_str)) return; 
21   }
22   
23   void xios_set_field_standard_name(XFieldPtr field_hdl, const char * standard_name, int standard_name_size)
24   {
25      std::string standard_name_str; 
26      if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 
27   }
28   
29   void xios_set_field_long_name(XFieldPtr field_hdl, const char * long_name, int long_name_size)
30   {
31      std::string long_name_str; 
32      if (!cstr2string(long_name, long_name_size, long_name_str)) return; 
33   }
34   
35   void xios_set_field_unit(XFieldPtr field_hdl, const char * unit, int unit_size)
36   {
37      std::string unit_str; 
38      if (!cstr2string(unit, unit_size, unit_str)) return; 
39   }
40   
41   void xios_set_field_operation(XFieldPtr field_hdl, const char * operation, int operation_size) 
42   {
43      std::string operation_str; 
44      if (!cstr2string(operation, operation_size, operation_str)) return; 
45   }
46   
47   void xios_set_field_freq_op(XFieldPtr field_hdl, const char * freq_op, int freq_op_size)
48   {
49      std::string freq_op_str; 
50      if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 
51   }
52   
53   void xios_set_field_level(XFieldPtr field_hdl, int level)
54   {
55     
56   }
57   
58   void xios_set_field_prec(XFieldPtr field_hdl, int prec)
59   {
60     
61   }
62   
63   void xios_set_field_enabled(XFieldPtr field_hdl, bool enabled)
64   {
65     
66   }
67   
68   void xios_set_field_domain_ref(XFieldPtr field_hdl,  const char * domain_ref, int domain_ref_size)
69   {
70      std::string domain_ref_str; 
71      if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 
72   }
73   
74   void xios_set_field_axis_ref(XFieldPtr field_hdl,  const char * axis_ref,  int axis_ref_size)
75   {
76      std::string axis_ref_str; 
77      if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 
78   }
79   
80   void xios_set_field_grid_ref(XFieldPtr field_hdl,  const char * grid_ref, int grid_ref_size)
81   {
82      std::string grid_ref_str; 
83      if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 
84   }
85   
86   void xios_set_field_field_ref(XFieldPtr field_hdl,  const char * field_ref,  int field_ref_size)
87   {
88      std::string field_ref_str; 
89      if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 
90   }
91   
92   void xios_set_field_default_value(XFieldPtr field_hdl, double default_value)
93   {
94     
95   } 
96   
97   // -------------------- Attributs des groupes de champs ---------------------
98 
99   void xios_set_fieldgroup_name(XFieldGroupPtr fieldgroup_hdl, const char * name, int name_size)
100   {
101      std::string name_str; 
102      if (!cstr2string(name, name_size, name_str)) return; 
103   }
104   
105   void xios_set_fieldgroup_standard_name(XFieldGroupPtr fieldgroup_hdl, const char * standard_name, int standard_name_size)
106   {
107      std::string standard_name_str; 
108      if (!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
109   }
110   
111   void xios_set_fieldgroup_long_name(XFieldGroupPtr fieldgroup_hdl, const char * long_name, int long_name_size)
112   {
113      std::string long_name_str; 
114      if (!cstr2string(long_name, long_name_size, long_name_str)) return;
115   }
116   
117   void xios_set_fieldgroup_unit(XFieldGroupPtr fieldgroup_hdl, const char * unit, int unit_size)
118   {
119      std::string unit_str; 
120      if (!cstr2string(unit, unit_size, unit_str)) return;
121   }
122   
123   void xios_set_fieldgroup_operation(XFieldGroupPtr fieldgroup_hdl, const char * operation, int operation_size) 
124   {
125      std::string operation_str; 
126      if (!cstr2string(operation, operation_size, operation_str)) return; 
127   }
128   
129   void xios_set_fieldgroup_freq_op(XFieldGroupPtr fieldgroup_hdl, const char * freq_op, int freq_op_size)
130   {
131      std::string freq_op_str; 
132      if (!cstr2string(freq_op, freq_op_size, freq_op_str)) return;
133   }
134   
135   void xios_set_fieldgroup_level(XFieldGroupPtr fieldgroup_hdl, int level)
136   {
137     
138   }
139   
140   void xios_set_fieldgroup_prec(XFieldGroupPtr fieldgroup_hdl, int prec)
141   {
142     
143   }
144   
145   void xios_set_fieldgroup_enabled(XFieldGroupPtr fieldgroup_hdl, bool enabled)
146   {
147     
148   }
149   
150   void xios_set_fieldgroup_domain_ref(XFieldGroupPtr fieldgroup_hdl,  const char * domain_ref, int domain_ref_size)
151   {
152      std::string domain_ref_str; 
153      if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 
154   }
155   
156   void xios_set_fieldgroup_axis_ref(XFieldGroupPtr fieldgroup_hdl,  const char * axis_ref,  int axis_ref_size)
157   {
158      std::string axis_ref_str; 
159      if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 
160   }
161   
162   void xios_set_fieldgroup_grid_ref(XFieldGroupPtr fieldgroup_hdl,  const char * grid_ref, int grid_ref_size)
163   {
164      std::string grid_ref_str; 
165      if (!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;
166   }
167   
168   void xios_set_fieldgroup_field_ref(XFieldGroupPtr fieldgroup_hdl,  const char * field_ref,  int field_ref_size)
169   {
170      std::string field_ref_str; 
171      if (!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 
172   }
173   
174   void xios_set_fieldgroup_default_value(XFieldGroupPtr fieldgroup_hdl, double default_value)
175   {
176     
177   } 
178   
179   // ------------------------ Création des handle -----------------------------
180   
181   void xios_field_handle_create (XFieldPtr * _ret, const char * _id, int _id_len)
182   {
183      std::string id; 
184      if (!cstr2string(_id, _id_len, id)) return;
185   }
186   
187   void xios_fieldgroup_handle_create (XFieldGroupPtr * _ret, const char * _id, int _id_len)
188   {
189      std::string id; 
190      if (!cstr2string(_id, _id_len, id)) return;
191   }
192   
193} // extern "C"
Note: See TracBrowser for help on using the repository browser.