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

Last change on this file since 791 was 791, checked in by rlacroix, 8 years ago

Grid: Make the axis_domain_order attribute private.

It was never meant to be used directly by our users.

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