source: XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp @ 674

Last change on this file since 674 was 674, checked in by rlacroix, 6 years ago

Fix Fortran interface generation to avoid generating long lines.

Long lines can cause compilation issues with some compilers.

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