source: XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp @ 509

Last change on this file since 509 was 509, checked in by mhnguyen, 7 years ago

Implementing buffer size auto-detection for mode client -server

+) Process xml tree in client side then send all the information to server
+) Only information enabled fields in enabled files are sent to server
+) Some important change in structure of code which must be refactored

Test
+) On Curie
+) Only mode client-server
+) Passed for all tests

  • 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.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 "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     CTimer::get("XIOS").suspend();
26  }
27 
28  void cxios_get_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size)
29  {
30     CTimer::get("XIOS").resume();
31    if(!string_copy(gridgroup_hdl->axis_ref.getInheritedValue(),axis_ref , axis_ref_size))
32      ERROR("void cxios_get_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");
33     CTimer::get("XIOS").suspend();
34  }
35 
36  bool cxios_is_defined_gridgroup_axis_ref(gridgroup_Ptr gridgroup_hdl )
37  {
38     CTimer::get("XIOS").resume();
39    return gridgroup_hdl->axis_ref.hasInheritedValue();
40     CTimer::get("XIOS").suspend();
41  }
42 
43 
44 
45  void cxios_set_gridgroup_description(gridgroup_Ptr gridgroup_hdl, const char * description, int description_size)
46  {
47    std::string description_str;
48    if(!cstr2string(description, description_size, description_str)) return;
49     CTimer::get("XIOS").resume();
50    gridgroup_hdl->description.setValue(description_str);
51     CTimer::get("XIOS").suspend();
52  }
53 
54  void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)
55  {
56     CTimer::get("XIOS").resume();
57    if(!string_copy(gridgroup_hdl->description.getInheritedValue(),description , description_size))
58      ERROR("void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)", <<"Input string is to short");
59     CTimer::get("XIOS").suspend();
60  }
61 
62  bool cxios_is_defined_gridgroup_description(gridgroup_Ptr gridgroup_hdl )
63  {
64     CTimer::get("XIOS").resume();
65    return gridgroup_hdl->description.hasInheritedValue();
66     CTimer::get("XIOS").suspend();
67  }
68 
69 
70 
71  void cxios_set_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, const char * domain_ref, int domain_ref_size)
72  {
73    std::string domain_ref_str;
74    if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
75     CTimer::get("XIOS").resume();
76    gridgroup_hdl->domain_ref.setValue(domain_ref_str);
77     CTimer::get("XIOS").suspend();
78  }
79 
80  void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size)
81  {
82     CTimer::get("XIOS").resume();
83    if(!string_copy(gridgroup_hdl->domain_ref.getInheritedValue(),domain_ref , domain_ref_size))
84      ERROR("void cxios_get_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");
85     CTimer::get("XIOS").suspend();
86  }
87 
88  bool cxios_is_defined_gridgroup_domain_ref(gridgroup_Ptr gridgroup_hdl )
89  {
90     CTimer::get("XIOS").resume();
91    return gridgroup_hdl->domain_ref.hasInheritedValue();
92     CTimer::get("XIOS").suspend();
93  }
94 
95 
96 
97  void cxios_set_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, const char * group_ref, int group_ref_size)
98  {
99    std::string group_ref_str;
100    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
101     CTimer::get("XIOS").resume();
102    gridgroup_hdl->group_ref.setValue(group_ref_str);
103     CTimer::get("XIOS").suspend();
104  }
105 
106  void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)
107  {
108     CTimer::get("XIOS").resume();
109    if(!string_copy(gridgroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size))
110      ERROR("void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
111     CTimer::get("XIOS").suspend();
112  }
113 
114  bool cxios_is_defined_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl )
115  {
116     CTimer::get("XIOS").resume();
117    return gridgroup_hdl->group_ref.hasInheritedValue();
118     CTimer::get("XIOS").suspend();
119  }
120 
121 
122 
123  void cxios_set_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3)
124  {
125    CTimer::get("XIOS").resume();
126    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
127    gridgroup_hdl->mask.reference(tmp.copy());
128     CTimer::get("XIOS").suspend();
129  }
130 
131  void cxios_get_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    tmp=gridgroup_hdl->mask.getInheritedValue() ;
136     CTimer::get("XIOS").suspend();
137  }
138 
139  bool cxios_is_defined_gridgroup_mask(gridgroup_Ptr gridgroup_hdl )
140  {
141     CTimer::get("XIOS").resume();
142    return gridgroup_hdl->mask.hasInheritedValue();
143     CTimer::get("XIOS").suspend();
144  }
145 
146 
147 
148  void cxios_set_gridgroup_name(gridgroup_Ptr gridgroup_hdl, const char * name, int name_size)
149  {
150    std::string name_str;
151    if(!cstr2string(name, name_size, name_str)) return;
152     CTimer::get("XIOS").resume();
153    gridgroup_hdl->name.setValue(name_str);
154     CTimer::get("XIOS").suspend();
155  }
156 
157  void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)
158  {
159     CTimer::get("XIOS").resume();
160    if(!string_copy(gridgroup_hdl->name.getInheritedValue(),name , name_size))
161      ERROR("void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)", <<"Input string is to short");
162     CTimer::get("XIOS").suspend();
163  }
164 
165  bool cxios_is_defined_gridgroup_name(gridgroup_Ptr gridgroup_hdl )
166  {
167     CTimer::get("XIOS").resume();
168    return gridgroup_hdl->name.hasInheritedValue();
169     CTimer::get("XIOS").suspend();
170  }
171 
172 
173 
174 
175}
Note: See TracBrowser for help on using the repository browser.