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

Last change on this file since 541 was 541, checked in by mhnguyen, 10 years ago

Replacing some attribute files with new ones

  • 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: 3.8 KB
RevLine 
[325]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"
[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{
[345]18  typedef xios::CGrid*  grid_Ptr;
[325]19 
[541]20  void cxios_set_grid_axisDomOrder(grid_Ptr grid_hdl, int* axisDomOrder, int extent1)
[325]21  {
[541]22    CTimer::get("XIOS").resume();
23    CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ;
24    grid_hdl->axisDomOrder.reference(tmp.copy());
[347]25     CTimer::get("XIOS").suspend();
[325]26  }
27 
[541]28  void cxios_get_grid_axisDomOrder(grid_Ptr grid_hdl, int* axisDomOrder, int extent1)
[325]29  {
[541]30    CTimer::get("XIOS").resume();
31    CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ;
32    tmp=grid_hdl->axisDomOrder.getInheritedValue() ;
[347]33     CTimer::get("XIOS").suspend();
[325]34  }
35 
[541]36  bool cxios_is_defined_grid_axisDomOrder(grid_Ptr grid_hdl )
[432]37  {
38     CTimer::get("XIOS").resume();
[541]39    return grid_hdl->axisDomOrder.hasInheritedValue();
[432]40     CTimer::get("XIOS").suspend();
41  }
[325]42 
[432]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;
48    if(!cstr2string(description, description_size, description_str)) return;
[347]49     CTimer::get("XIOS").resume();
[325]50    grid_hdl->description.setValue(description_str);
[347]51     CTimer::get("XIOS").suspend();
[325]52  }
53 
54  void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)
55  {
[347]56     CTimer::get("XIOS").resume();
[445]57    if(!string_copy(grid_hdl->description.getInheritedValue(),description , description_size))
[325]58      ERROR("void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)", <<"Input string is to short");
[347]59     CTimer::get("XIOS").suspend();
[325]60  }
61 
[432]62  bool cxios_is_defined_grid_description(grid_Ptr grid_hdl )
63  {
64     CTimer::get("XIOS").resume();
[445]65    return grid_hdl->description.hasInheritedValue();
[432]66     CTimer::get("XIOS").suspend();
67  }
[325]68 
[432]69 
70 
[415]71  void cxios_set_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3)
72  {
73    CTimer::get("XIOS").resume();
74    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
75    grid_hdl->mask.reference(tmp.copy());
[416]76     CTimer::get("XIOS").suspend();
[415]77  }
78 
79  void cxios_get_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3)
80  {
[416]81    CTimer::get("XIOS").resume();
[415]82    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
[445]83    tmp=grid_hdl->mask.getInheritedValue() ;
[415]84     CTimer::get("XIOS").suspend();
85  }
86 
[432]87  bool cxios_is_defined_grid_mask(grid_Ptr grid_hdl )
88  {
89     CTimer::get("XIOS").resume();
[445]90    return grid_hdl->mask.hasInheritedValue();
[432]91     CTimer::get("XIOS").suspend();
92  }
[415]93 
[432]94 
95 
[325]96  void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size)
97  {
98    std::string name_str;
99    if(!cstr2string(name, name_size, name_str)) return;
[347]100     CTimer::get("XIOS").resume();
[325]101    grid_hdl->name.setValue(name_str);
[347]102     CTimer::get("XIOS").suspend();
[325]103  }
104 
105  void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)
106  {
[347]107     CTimer::get("XIOS").resume();
[445]108    if(!string_copy(grid_hdl->name.getInheritedValue(),name , name_size))
[325]109      ERROR("void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)", <<"Input string is to short");
[347]110     CTimer::get("XIOS").suspend();
[325]111  }
112 
[432]113  bool cxios_is_defined_grid_name(grid_Ptr grid_hdl )
114  {
115     CTimer::get("XIOS").resume();
[445]116    return grid_hdl->name.hasInheritedValue();
[432]117     CTimer::get("XIOS").suspend();
118  }
[325]119 
120 
[432]121 
122 
[325]123}
Note: See TracBrowser for help on using the repository browser.