New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
iccontext_attr.cpp in vendors/XIOS/current/src/interface/c_attr – NEMO

source: vendors/XIOS/current/src/interface/c_attr/iccontext_attr.cpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 4.6 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 "context.hpp"
14
15extern "C"
16{
17  typedef xios::CContext*  context_Ptr;
18 
19  void cxios_set_context_calendar_type(context_Ptr context_hdl, const char * calendar_type, int calendar_type_size)
20  {
21    std::string calendar_type_str;
22    if(!cstr2string(calendar_type, calendar_type_size, calendar_type_str)) return;
23     CTimer::get("XIOS").resume();
24    context_hdl->calendar_type.setValue(calendar_type_str);
25    context_hdl->sendAttributToServer(context_hdl->calendar_type);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(context_hdl->calendar_type.getValue(),calendar_type , calendar_type_size))
33      ERROR("void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37 
38  void cxios_set_context_output_dir(context_Ptr context_hdl, const char * output_dir, int output_dir_size)
39  {
40    std::string output_dir_str;
41    if(!cstr2string(output_dir, output_dir_size, output_dir_str)) return;
42     CTimer::get("XIOS").resume();
43    context_hdl->output_dir.setValue(output_dir_str);
44    context_hdl->sendAttributToServer(context_hdl->output_dir);
45     CTimer::get("XIOS").suspend();
46  }
47 
48  void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)
49  {
50     CTimer::get("XIOS").resume();
51    if(!string_copy(context_hdl->output_dir.getValue(),output_dir , output_dir_size))
52      ERROR("void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)", <<"Input string is to short");
53     CTimer::get("XIOS").suspend();
54  }
55 
56 
57  void cxios_set_context_start_date(context_Ptr context_hdl, const char * start_date, int start_date_size)
58  {
59    std::string start_date_str;
60    if(!cstr2string(start_date, start_date_size, start_date_str)) return;
61     CTimer::get("XIOS").resume();
62    context_hdl->start_date.setValue(start_date_str);
63    context_hdl->sendAttributToServer(context_hdl->start_date);
64     CTimer::get("XIOS").suspend();
65  }
66 
67  void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)
68  {
69     CTimer::get("XIOS").resume();
70    if(!string_copy(context_hdl->start_date.getValue(),start_date , start_date_size))
71      ERROR("void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)", <<"Input string is to short");
72     CTimer::get("XIOS").suspend();
73  }
74 
75 
76  void cxios_set_context_time_origin(context_Ptr context_hdl, const char * time_origin, int time_origin_size)
77  {
78    std::string time_origin_str;
79    if(!cstr2string(time_origin, time_origin_size, time_origin_str)) return;
80     CTimer::get("XIOS").resume();
81    context_hdl->time_origin.setValue(time_origin_str);
82    context_hdl->sendAttributToServer(context_hdl->time_origin);
83     CTimer::get("XIOS").suspend();
84  }
85 
86  void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)
87  {
88     CTimer::get("XIOS").resume();
89    if(!string_copy(context_hdl->time_origin.getValue(),time_origin , time_origin_size))
90      ERROR("void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)", <<"Input string is to short");
91     CTimer::get("XIOS").suspend();
92  }
93 
94 
95  void cxios_set_context_timestep(context_Ptr context_hdl, const char * timestep, int timestep_size)
96  {
97    std::string timestep_str;
98    if(!cstr2string(timestep, timestep_size, timestep_str)) return;
99     CTimer::get("XIOS").resume();
100    context_hdl->timestep.setValue(timestep_str);
101    context_hdl->sendAttributToServer(context_hdl->timestep);
102     CTimer::get("XIOS").suspend();
103  }
104 
105  void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)
106  {
107     CTimer::get("XIOS").resume();
108    if(!string_copy(context_hdl->timestep.getValue(),timestep , timestep_size))
109      ERROR("void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)", <<"Input string is to short");
110     CTimer::get("XIOS").suspend();
111  }
112 
113 
114 
115}
Note: See TracBrowser for help on using the repository browser.