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

Last change on this file since 778 was 674, checked in by rlacroix, 9 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
RevLine 
[325]1/* ************************************************************************** *
[581]2 *               Interface auto generated - do not modify                     *
[325]3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
[591]7#include "xios.hpp"
[352]8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
[325]11#include "icutil.hpp"
[532]12#include "icdate.hpp"
[347]13#include "timer.hpp"
[369]14#include "node_type.hpp"
[325]15
16extern "C"
17{
[581]18  typedef xios::CGrid* grid_Ptr;
19
[674]20  void cxios_set_grid_axis_domain_order(grid_Ptr grid_hdl, bool* axis_domain_order, int* extent)
[325]21  {
[541]22    CTimer::get("XIOS").resume();
[674]23    CArray<bool,1> tmp(axis_domain_order, shape(extent[0]), neverDeleteData);
[575]24    grid_hdl->axis_domain_order.reference(tmp.copy());
[347]25     CTimer::get("XIOS").suspend();
[325]26  }
[581]27
[674]28  void cxios_get_grid_axis_domain_order(grid_Ptr grid_hdl, bool* axis_domain_order, int* extent)
[325]29  {
[541]30    CTimer::get("XIOS").resume();
[674]31    CArray<bool,1> tmp(axis_domain_order, shape(extent[0]), neverDeleteData);
[581]32    tmp=grid_hdl->axis_domain_order.getInheritedValue();
[347]33     CTimer::get("XIOS").suspend();
[325]34  }
[581]35
36  bool cxios_is_defined_grid_axis_domain_order(grid_Ptr grid_hdl)
[432]37  {
38     CTimer::get("XIOS").resume();
[581]39     bool isDefined = grid_hdl->axis_domain_order.hasInheritedValue();
[432]40     CTimer::get("XIOS").suspend();
[581]41     return isDefined;
[432]42  }
[581]43
44
[325]45  void cxios_set_grid_description(grid_Ptr grid_hdl, const char * description, int description_size)
46  {
47    std::string description_str;
[581]48    if (!cstr2string(description, description_size, description_str)) return;
49    CTimer::get("XIOS").resume();
[325]50    grid_hdl->description.setValue(description_str);
[581]51    CTimer::get("XIOS").suspend();
[325]52  }
[581]53
[325]54  void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)
55  {
[581]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();
[325]60  }
[581]61
62  bool cxios_is_defined_grid_description(grid_Ptr grid_hdl)
[432]63  {
64     CTimer::get("XIOS").resume();
[581]65     bool isDefined = grid_hdl->description.hasInheritedValue();
[432]66     CTimer::get("XIOS").suspend();
[581]67     return isDefined;
[432]68  }
[581]69
70
[674]71  void cxios_set_grid_mask1(grid_Ptr grid_hdl, bool* mask1, int* extent)
[415]72  {
73    CTimer::get("XIOS").resume();
[674]74    CArray<bool,1> tmp(mask1, shape(extent[0]), neverDeleteData);
[567]75    grid_hdl->mask1.reference(tmp.copy());
[416]76     CTimer::get("XIOS").suspend();
[415]77  }
[581]78
[674]79  void cxios_get_grid_mask1(grid_Ptr grid_hdl, bool* mask1, int* extent)
[415]80  {
[416]81    CTimer::get("XIOS").resume();
[674]82    CArray<bool,1> tmp(mask1, shape(extent[0]), neverDeleteData);
[581]83    tmp=grid_hdl->mask1.getInheritedValue();
[415]84     CTimer::get("XIOS").suspend();
85  }
[581]86
87  bool cxios_is_defined_grid_mask1(grid_Ptr grid_hdl)
[432]88  {
89     CTimer::get("XIOS").resume();
[581]90     bool isDefined = grid_hdl->mask1.hasInheritedValue();
[432]91     CTimer::get("XIOS").suspend();
[581]92     return isDefined;
[432]93  }
[581]94
95
[674]96  void cxios_set_grid_mask2(grid_Ptr grid_hdl, bool* mask2, int* extent)
[567]97  {
98    CTimer::get("XIOS").resume();
[674]99    CArray<bool,2> tmp(mask2, shape(extent[0], extent[1]), neverDeleteData);
[567]100    grid_hdl->mask2.reference(tmp.copy());
101     CTimer::get("XIOS").suspend();
102  }
[581]103
[674]104  void cxios_get_grid_mask2(grid_Ptr grid_hdl, bool* mask2, int* extent)
[567]105  {
106    CTimer::get("XIOS").resume();
[674]107    CArray<bool,2> tmp(mask2, shape(extent[0], extent[1]), neverDeleteData);
[581]108    tmp=grid_hdl->mask2.getInheritedValue();
[567]109     CTimer::get("XIOS").suspend();
110  }
[581]111
112  bool cxios_is_defined_grid_mask2(grid_Ptr grid_hdl)
[567]113  {
114     CTimer::get("XIOS").resume();
[581]115     bool isDefined = grid_hdl->mask2.hasInheritedValue();
[567]116     CTimer::get("XIOS").suspend();
[581]117     return isDefined;
[567]118  }
[581]119
120
[674]121  void cxios_set_grid_mask3(grid_Ptr grid_hdl, bool* mask3, int* extent)
[567]122  {
123    CTimer::get("XIOS").resume();
[674]124    CArray<bool,3> tmp(mask3, shape(extent[0], extent[1], extent[2]), neverDeleteData);
[567]125    grid_hdl->mask3.reference(tmp.copy());
126     CTimer::get("XIOS").suspend();
127  }
[581]128
[674]129  void cxios_get_grid_mask3(grid_Ptr grid_hdl, bool* mask3, int* extent)
[567]130  {
131    CTimer::get("XIOS").resume();
[674]132    CArray<bool,3> tmp(mask3, shape(extent[0], extent[1], extent[2]), neverDeleteData);
[581]133    tmp=grid_hdl->mask3.getInheritedValue();
[567]134     CTimer::get("XIOS").suspend();
135  }
[581]136
137  bool cxios_is_defined_grid_mask3(grid_Ptr grid_hdl)
[567]138  {
139     CTimer::get("XIOS").resume();
[581]140     bool isDefined = grid_hdl->mask3.hasInheritedValue();
[567]141     CTimer::get("XIOS").suspend();
[581]142     return isDefined;
[567]143  }
[581]144
145
[325]146  void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size)
147  {
148    std::string name_str;
[581]149    if (!cstr2string(name, name_size, name_str)) return;
150    CTimer::get("XIOS").resume();
[325]151    grid_hdl->name.setValue(name_str);
[581]152    CTimer::get("XIOS").suspend();
[325]153  }
[581]154
[325]155  void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)
156  {
[581]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();
[325]161  }
[581]162
163  bool cxios_is_defined_grid_name(grid_Ptr grid_hdl)
[432]164  {
165     CTimer::get("XIOS").resume();
[581]166     bool isDefined = grid_hdl->name.hasInheritedValue();
[432]167     CTimer::get("XIOS").suspend();
[581]168     return isDefined;
[432]169  }
[325]170}
Note: See TracBrowser for help on using the repository browser.