source: XIOS/branchs/xios-1.0/src/interface/c_attr/icgridgroup_attr.cpp @ 611

Last change on this file since 611 was 581, checked in by rlacroix, 9 years ago

Fix the Fortran interface generation to avoid generating dead code that caused a timer not to be stopped.

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 6.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::CGridGroup*  gridgroup_Ptr;
18 
19  void cxios_set_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, const char * axis_ref, int axis_ref_size)
20  {
21    std::string axis_ref_str;
22    if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
23     CTimer::get("XIOS").resume();
24    gridgroup_hdl->axis_ref.setValue(axis_ref_str);
25    gridgroup_hdl->sendAttributToServer(gridgroup_hdl->axis_ref);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(gridgroup_hdl->axis_ref.getInheritedValue(),axis_ref , axis_ref_size))
33      ERROR("void cxios_get_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37  bool cxios_is_defined_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl )
38  {
39    CTimer::get("XIOS").resume();
40    bool isDefined = gridgroup_hdl->axis_ref.hasInheritedValue();
41    CTimer::get("XIOS").suspend();
42    return isDefined;
43  }
44 
45 
46 
47  void cxios_set_gridgroup_description(gridgroup_Ptr gridgroup_hdl, const char * description, int description_size)
48  {
49    std::string description_str;
50    if(!cstr2string(description, description_size, description_str)) return;
51     CTimer::get("XIOS").resume();
52    gridgroup_hdl->description.setValue(description_str);
53    gridgroup_hdl->sendAttributToServer(gridgroup_hdl->description);
54     CTimer::get("XIOS").suspend();
55  }
56 
57  void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)
58  {
59     CTimer::get("XIOS").resume();
60    if(!string_copy(gridgroup_hdl->description.getInheritedValue(),description , description_size))
61      ERROR("void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)", <<"Input string is to short");
62     CTimer::get("XIOS").suspend();
63  }
64 
65  bool cxios_is_defined_gridgroup_description(gridgroup_Ptr gridgroup_hdl )
66  {
67    CTimer::get("XIOS").resume();
68    bool isDefined = gridgroup_hdl->description.hasInheritedValue();
69    CTimer::get("XIOS").suspend();
70    return isDefined;
71  }
72 
73 
74 
75  void cxios_set_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, const char * domain_ref, int domain_ref_size)
76  {
77    std::string domain_ref_str;
78    if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
79     CTimer::get("XIOS").resume();
80    gridgroup_hdl->domain_ref.setValue(domain_ref_str);
81    gridgroup_hdl->sendAttributToServer(gridgroup_hdl->domain_ref);
82     CTimer::get("XIOS").suspend();
83  }
84 
85  void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size)
86  {
87     CTimer::get("XIOS").resume();
88    if(!string_copy(gridgroup_hdl->domain_ref.getInheritedValue(),domain_ref , domain_ref_size))
89      ERROR("void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");
90     CTimer::get("XIOS").suspend();
91  }
92 
93  bool cxios_is_defined_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl )
94  {
95    CTimer::get("XIOS").resume();
96    bool isDefined = gridgroup_hdl->domain_ref.hasInheritedValue();
97    CTimer::get("XIOS").suspend();
98    return isDefined;
99  }
100 
101 
102 
103  void cxios_set_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, const char * group_ref, int group_ref_size)
104  {
105    std::string group_ref_str;
106    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
107     CTimer::get("XIOS").resume();
108    gridgroup_hdl->group_ref.setValue(group_ref_str);
109    gridgroup_hdl->sendAttributToServer(gridgroup_hdl->group_ref);
110     CTimer::get("XIOS").suspend();
111  }
112 
113  void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)
114  {
115     CTimer::get("XIOS").resume();
116    if(!string_copy(gridgroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size))
117      ERROR("void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
118     CTimer::get("XIOS").suspend();
119  }
120 
121  bool cxios_is_defined_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl )
122  {
123    CTimer::get("XIOS").resume();
124    bool isDefined = gridgroup_hdl->group_ref.hasInheritedValue();
125    CTimer::get("XIOS").suspend();
126    return isDefined;
127  }
128 
129 
130 
131  void cxios_set_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3)
132  {
133    CTimer::get("XIOS").resume();
134    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
135    gridgroup_hdl->mask.reference(tmp.copy());
136    gridgroup_hdl->sendAttributToServer(gridgroup_hdl->mask);
137     CTimer::get("XIOS").suspend();
138  }
139 
140  void cxios_get_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3)
141  {
142    CTimer::get("XIOS").resume();
143    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
144    tmp=gridgroup_hdl->mask.getInheritedValue() ;
145     CTimer::get("XIOS").suspend();
146  }
147 
148  bool cxios_is_defined_gridgroup_mask(gridgroup_Ptr gridgroup_hdl )
149  {
150    CTimer::get("XIOS").resume();
151    bool isDefined = gridgroup_hdl->mask.hasInheritedValue();
152    CTimer::get("XIOS").suspend();
153    return isDefined;
154  }
155 
156 
157 
158  void cxios_set_gridgroup_name(gridgroup_Ptr gridgroup_hdl, const char * name, int name_size)
159  {
160    std::string name_str;
161    if(!cstr2string(name, name_size, name_str)) return;
162     CTimer::get("XIOS").resume();
163    gridgroup_hdl->name.setValue(name_str);
164    gridgroup_hdl->sendAttributToServer(gridgroup_hdl->name);
165     CTimer::get("XIOS").suspend();
166  }
167 
168  void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)
169  {
170     CTimer::get("XIOS").resume();
171    if(!string_copy(gridgroup_hdl->name.getInheritedValue(),name , name_size))
172      ERROR("void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)", <<"Input string is to short");
173     CTimer::get("XIOS").suspend();
174  }
175 
176  bool cxios_is_defined_gridgroup_name(gridgroup_Ptr gridgroup_hdl )
177  {
178    CTimer::get("XIOS").resume();
179    bool isDefined = gridgroup_hdl->name.hasInheritedValue();
180    CTimer::get("XIOS").suspend();
181    return isDefined;
182  }
183 
184 
185 
186 
187}
Note: See TracBrowser for help on using the repository browser.