source: XIOS/trunk/src/interface/c_attr/icgridgroup_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: 5.1 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::CGridGroup*  gridgroup_Ptr;
[325]19 
[541]20  void cxios_set_gridgroup_axisDomOrder(gridgroup_Ptr gridgroup_hdl, int* axisDomOrder, int extent1)
[325]21  {
[541]22    CTimer::get("XIOS").resume();
23    CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ;
24    gridgroup_hdl->axisDomOrder.reference(tmp.copy());
[347]25     CTimer::get("XIOS").suspend();
[325]26  }
27 
[541]28  void cxios_get_gridgroup_axisDomOrder(gridgroup_Ptr gridgroup_hdl, int* axisDomOrder, int extent1)
[325]29  {
[541]30    CTimer::get("XIOS").resume();
31    CArray<int,1> tmp(axisDomOrder,shape(extent1),neverDeleteData) ;
32    tmp=gridgroup_hdl->axisDomOrder.getInheritedValue() ;
[347]33     CTimer::get("XIOS").suspend();
[325]34  }
35 
[541]36  bool cxios_is_defined_gridgroup_axisDomOrder(gridgroup_Ptr gridgroup_hdl )
[432]37  {
38     CTimer::get("XIOS").resume();
[541]39    return gridgroup_hdl->axisDomOrder.hasInheritedValue();
[432]40     CTimer::get("XIOS").suspend();
41  }
[325]42 
[432]43 
44 
[325]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;
[347]49     CTimer::get("XIOS").resume();
[325]50    gridgroup_hdl->description.setValue(description_str);
[347]51     CTimer::get("XIOS").suspend();
[325]52  }
53 
54  void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_hdl, char * description, int description_size)
55  {
[347]56     CTimer::get("XIOS").resume();
[445]57    if(!string_copy(gridgroup_hdl->description.getInheritedValue(),description , description_size))
[325]58      ERROR("void cxios_get_gridgroup_description(gridgroup_Ptr gridgroup_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_gridgroup_description(gridgroup_Ptr gridgroup_hdl )
63  {
64     CTimer::get("XIOS").resume();
[445]65    return gridgroup_hdl->description.hasInheritedValue();
[432]66     CTimer::get("XIOS").suspend();
67  }
[325]68 
[432]69 
70 
[325]71  void cxios_set_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, const char * group_ref, int group_ref_size)
72  {
73    std::string group_ref_str;
74    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
[347]75     CTimer::get("XIOS").resume();
[325]76    gridgroup_hdl->group_ref.setValue(group_ref_str);
[347]77     CTimer::get("XIOS").suspend();
[325]78  }
79 
80  void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)
81  {
[347]82     CTimer::get("XIOS").resume();
[445]83    if(!string_copy(gridgroup_hdl->group_ref.getInheritedValue(),group_ref , group_ref_size))
[325]84      ERROR("void cxios_get_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
[347]85     CTimer::get("XIOS").suspend();
[325]86  }
87 
[432]88  bool cxios_is_defined_gridgroup_group_ref(gridgroup_Ptr gridgroup_hdl )
89  {
90     CTimer::get("XIOS").resume();
[445]91    return gridgroup_hdl->group_ref.hasInheritedValue();
[432]92     CTimer::get("XIOS").suspend();
93  }
[325]94 
[432]95 
96 
[415]97  void cxios_set_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3)
98  {
99    CTimer::get("XIOS").resume();
100    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
101    gridgroup_hdl->mask.reference(tmp.copy());
[416]102     CTimer::get("XIOS").suspend();
[415]103  }
104 
105  void cxios_get_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3)
106  {
[416]107    CTimer::get("XIOS").resume();
[415]108    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
[445]109    tmp=gridgroup_hdl->mask.getInheritedValue() ;
[415]110     CTimer::get("XIOS").suspend();
111  }
112 
[432]113  bool cxios_is_defined_gridgroup_mask(gridgroup_Ptr gridgroup_hdl )
114  {
115     CTimer::get("XIOS").resume();
[445]116    return gridgroup_hdl->mask.hasInheritedValue();
[432]117     CTimer::get("XIOS").suspend();
118  }
[415]119 
[432]120 
121 
[325]122  void cxios_set_gridgroup_name(gridgroup_Ptr gridgroup_hdl, const char * name, int name_size)
123  {
124    std::string name_str;
125    if(!cstr2string(name, name_size, name_str)) return;
[347]126     CTimer::get("XIOS").resume();
[325]127    gridgroup_hdl->name.setValue(name_str);
[347]128     CTimer::get("XIOS").suspend();
[325]129  }
130 
131  void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)
132  {
[347]133     CTimer::get("XIOS").resume();
[445]134    if(!string_copy(gridgroup_hdl->name.getInheritedValue(),name , name_size))
[325]135      ERROR("void cxios_get_gridgroup_name(gridgroup_Ptr gridgroup_hdl, char * name, int name_size)", <<"Input string is to short");
[347]136     CTimer::get("XIOS").suspend();
[325]137  }
138 
[432]139  bool cxios_is_defined_gridgroup_name(gridgroup_Ptr gridgroup_hdl )
140  {
141     CTimer::get("XIOS").resume();
[445]142    return gridgroup_hdl->name.hasInheritedValue();
[432]143     CTimer::get("XIOS").suspend();
144  }
[325]145 
146 
[432]147 
148 
[325]149}
Note: See TracBrowser for help on using the repository browser.