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 @ 3408

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

importing initial XIOS vendor drop

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
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_impl.hpp"
9#include "object_template_impl.hpp"
10#include "group_template_impl.hpp"
11#include "icutil.hpp"
12#include "timer.hpp"
13
14extern "C"
15{
16  typedef xios::CContext*  context_Ptr;
17 
18  void cxios_set_context_calendar_type(context_Ptr context_hdl, const char * calendar_type, int calendar_type_size)
19  {
20    std::string calendar_type_str;
21    if(!cstr2string(calendar_type, calendar_type_size, calendar_type_str)) return;
22     CTimer::get("XIOS").resume();
23    context_hdl->calendar_type.setValue(calendar_type_str);
24    context_hdl->sendAttributToServer(context_hdl->calendar_type);
25     CTimer::get("XIOS").suspend();
26  }
27 
28  void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)
29  {
30     CTimer::get("XIOS").resume();
31    if(!string_copy(context_hdl->calendar_type.getValue(),calendar_type , calendar_type_size))
32      ERROR("void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)", <<"Input string is to short");
33     CTimer::get("XIOS").suspend();
34  }
35 
36 
37  void cxios_set_context_output_dir(context_Ptr context_hdl, const char * output_dir, int output_dir_size)
38  {
39    std::string output_dir_str;
40    if(!cstr2string(output_dir, output_dir_size, output_dir_str)) return;
41     CTimer::get("XIOS").resume();
42    context_hdl->output_dir.setValue(output_dir_str);
43    context_hdl->sendAttributToServer(context_hdl->output_dir);
44     CTimer::get("XIOS").suspend();
45  }
46 
47  void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)
48  {
49     CTimer::get("XIOS").resume();
50    if(!string_copy(context_hdl->output_dir.getValue(),output_dir , output_dir_size))
51      ERROR("void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)", <<"Input string is to short");
52     CTimer::get("XIOS").suspend();
53  }
54 
55 
56  void cxios_set_context_start_date(context_Ptr context_hdl, const char * start_date, int start_date_size)
57  {
58    std::string start_date_str;
59    if(!cstr2string(start_date, start_date_size, start_date_str)) return;
60     CTimer::get("XIOS").resume();
61    context_hdl->start_date.setValue(start_date_str);
62    context_hdl->sendAttributToServer(context_hdl->start_date);
63     CTimer::get("XIOS").suspend();
64  }
65 
66  void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)
67  {
68     CTimer::get("XIOS").resume();
69    if(!string_copy(context_hdl->start_date.getValue(),start_date , start_date_size))
70      ERROR("void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)", <<"Input string is to short");
71     CTimer::get("XIOS").suspend();
72  }
73 
74 
75  void cxios_set_context_time_origin(context_Ptr context_hdl, const char * time_origin, int time_origin_size)
76  {
77    std::string time_origin_str;
78    if(!cstr2string(time_origin, time_origin_size, time_origin_str)) return;
79     CTimer::get("XIOS").resume();
80    context_hdl->time_origin.setValue(time_origin_str);
81    context_hdl->sendAttributToServer(context_hdl->time_origin);
82     CTimer::get("XIOS").suspend();
83  }
84 
85  void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)
86  {
87     CTimer::get("XIOS").resume();
88    if(!string_copy(context_hdl->time_origin.getValue(),time_origin , time_origin_size))
89      ERROR("void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)", <<"Input string is to short");
90     CTimer::get("XIOS").suspend();
91  }
92 
93 
94  void cxios_set_context_timestep(context_Ptr context_hdl, const char * timestep, int timestep_size)
95  {
96    std::string timestep_str;
97    if(!cstr2string(timestep, timestep_size, timestep_str)) return;
98     CTimer::get("XIOS").resume();
99    context_hdl->timestep.setValue(timestep_str);
100    context_hdl->sendAttributToServer(context_hdl->timestep);
101     CTimer::get("XIOS").suspend();
102  }
103 
104  void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)
105  {
106     CTimer::get("XIOS").resume();
107    if(!string_copy(context_hdl->timestep.getValue(),timestep , timestep_size))
108      ERROR("void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_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.