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

Last change on this file since 352 was 352, checked in by ymipsl, 12 years ago
  • Property svn:eol-style set to native
File size: 3.5 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"
[347]12#include "timer.hpp"
[352]13#include "grid.hpp"
[325]14
15extern "C"
16{
[345]17  typedef xios::CGrid*  grid_Ptr;
[325]18 
19  void cxios_set_grid_axis_ref(grid_Ptr grid_hdl, const char * axis_ref, int axis_ref_size)
20  {
21    std::string axis_ref_str;
22    if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
[347]23     CTimer::get("XIOS").resume();
[325]24    grid_hdl->axis_ref.setValue(axis_ref_str);
25    grid_hdl->sendAttributToServer(grid_hdl->axis_ref);
[347]26     CTimer::get("XIOS").suspend();
[325]27  }
28 
29  void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)
30  {
[347]31     CTimer::get("XIOS").resume();
[325]32    if(!string_copy(grid_hdl->axis_ref.getValue(),axis_ref , axis_ref_size))
33      ERROR("void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");
[347]34     CTimer::get("XIOS").suspend();
[325]35  }
36 
37 
38  void cxios_set_grid_description(grid_Ptr grid_hdl, const char * description, int description_size)
39  {
40    std::string description_str;
41    if(!cstr2string(description, description_size, description_str)) return;
[347]42     CTimer::get("XIOS").resume();
[325]43    grid_hdl->description.setValue(description_str);
44    grid_hdl->sendAttributToServer(grid_hdl->description);
[347]45     CTimer::get("XIOS").suspend();
[325]46  }
47 
48  void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)
49  {
[347]50     CTimer::get("XIOS").resume();
[325]51    if(!string_copy(grid_hdl->description.getValue(),description , description_size))
52      ERROR("void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)", <<"Input string is to short");
[347]53     CTimer::get("XIOS").suspend();
[325]54  }
55 
56 
57  void cxios_set_grid_domain_ref(grid_Ptr grid_hdl, const char * domain_ref, int domain_ref_size)
58  {
59    std::string domain_ref_str;
60    if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
[347]61     CTimer::get("XIOS").resume();
[325]62    grid_hdl->domain_ref.setValue(domain_ref_str);
63    grid_hdl->sendAttributToServer(grid_hdl->domain_ref);
[347]64     CTimer::get("XIOS").suspend();
[325]65  }
66 
67  void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)
68  {
[347]69     CTimer::get("XIOS").resume();
[325]70    if(!string_copy(grid_hdl->domain_ref.getValue(),domain_ref , domain_ref_size))
71      ERROR("void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");
[347]72     CTimer::get("XIOS").suspend();
[325]73  }
74 
75 
76  void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size)
77  {
78    std::string name_str;
79    if(!cstr2string(name, name_size, name_str)) return;
[347]80     CTimer::get("XIOS").resume();
[325]81    grid_hdl->name.setValue(name_str);
82    grid_hdl->sendAttributToServer(grid_hdl->name);
[347]83     CTimer::get("XIOS").suspend();
[325]84  }
85 
86  void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)
87  {
[347]88     CTimer::get("XIOS").resume();
[325]89    if(!string_copy(grid_hdl->name.getValue(),name , name_size))
90      ERROR("void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)", <<"Input string is to short");
[347]91     CTimer::get("XIOS").suspend();
[325]92  }
93 
94 
95 
96}
Note: See TracBrowser for help on using the repository browser.