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

Last change on this file since 416 was 416, checked in by ymipsl, 11 years ago

add some missing trace in c interface

YM

  • Property svn:eol-style set to native
File size: 4.1 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 "xmlioserver.hpp"
8#include "attribute_template.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "icutil.hpp"
12#include "timer.hpp"
13#include "node_type.hpp"
14
15extern "C"
16{
17  typedef xios::CGrid*  grid_Ptr;
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;
23     CTimer::get("XIOS").resume();
24    grid_hdl->axis_ref.setValue(axis_ref_str);
25    grid_hdl->sendAttributToServer(grid_hdl->axis_ref);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_grid_axis_ref(grid_Ptr grid_hdl, char * axis_ref, int axis_ref_size)
30  {
31     CTimer::get("XIOS").resume();
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");
34     CTimer::get("XIOS").suspend();
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;
42     CTimer::get("XIOS").resume();
43    grid_hdl->description.setValue(description_str);
44    grid_hdl->sendAttributToServer(grid_hdl->description);
45     CTimer::get("XIOS").suspend();
46  }
47 
48  void cxios_get_grid_description(grid_Ptr grid_hdl, char * description, int description_size)
49  {
50     CTimer::get("XIOS").resume();
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");
53     CTimer::get("XIOS").suspend();
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;
61     CTimer::get("XIOS").resume();
62    grid_hdl->domain_ref.setValue(domain_ref_str);
63    grid_hdl->sendAttributToServer(grid_hdl->domain_ref);
64     CTimer::get("XIOS").suspend();
65  }
66 
67  void cxios_get_grid_domain_ref(grid_Ptr grid_hdl, char * domain_ref, int domain_ref_size)
68  {
69     CTimer::get("XIOS").resume();
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");
72     CTimer::get("XIOS").suspend();
73  }
74 
75 
76  void cxios_set_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3)
77  {
78    CTimer::get("XIOS").resume();
79    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
80    grid_hdl->mask.reference(tmp.copy());
81    grid_hdl->sendAttributToServer(grid_hdl->mask);
82     CTimer::get("XIOS").suspend();
83  }
84 
85  void cxios_get_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3)
86  {
87    CTimer::get("XIOS").resume();
88    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ;
89    tmp=grid_hdl->mask ;
90     CTimer::get("XIOS").suspend();
91  }
92 
93 
94  void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size)
95  {
96    std::string name_str;
97    if(!cstr2string(name, name_size, name_str)) return;
98     CTimer::get("XIOS").resume();
99    grid_hdl->name.setValue(name_str);
100    grid_hdl->sendAttributToServer(grid_hdl->name);
101     CTimer::get("XIOS").suspend();
102  }
103 
104  void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)
105  {
106     CTimer::get("XIOS").resume();
107    if(!string_copy(grid_hdl->name.getValue(),name , name_size))
108      ERROR("void cxios_get_grid_name(grid_Ptr grid_hdl, char * name, int name_size)", <<"Input string is to short");
109     CTimer::get("XIOS").suspend();
110  }
111 
112 
113 
114}
Note: See TracBrowser for help on using the repository browser.