source: XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp @ 369

Last change on this file since 369 was 369, checked in by ymipsl, 12 years ago

Major Update

  • redesign Type and attribute manipulation
  • add enumerate type and attribute
  • use blitz class array instead of boost class array

YM

  • Property svn:eol-style set to native
File size: 4.6 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"
[369]13#include "node_type.hpp"
[325]14
15extern "C"
16{
[345]17  typedef xios::CContext*  context_Ptr;
[325]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;
[347]23     CTimer::get("XIOS").resume();
[325]24    context_hdl->calendar_type.setValue(calendar_type_str);
25    context_hdl->sendAttributToServer(context_hdl->calendar_type);
[347]26     CTimer::get("XIOS").suspend();
[325]27  }
28 
29  void cxios_get_context_calendar_type(context_Ptr context_hdl, char * calendar_type, int calendar_type_size)
30  {
[347]31     CTimer::get("XIOS").resume();
[325]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");
[347]34     CTimer::get("XIOS").suspend();
[325]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;
[347]42     CTimer::get("XIOS").resume();
[325]43    context_hdl->output_dir.setValue(output_dir_str);
44    context_hdl->sendAttributToServer(context_hdl->output_dir);
[347]45     CTimer::get("XIOS").suspend();
[325]46  }
47 
48  void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)
49  {
[347]50     CTimer::get("XIOS").resume();
[325]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");
[347]53     CTimer::get("XIOS").suspend();
[325]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;
[347]61     CTimer::get("XIOS").resume();
[325]62    context_hdl->start_date.setValue(start_date_str);
63    context_hdl->sendAttributToServer(context_hdl->start_date);
[347]64     CTimer::get("XIOS").suspend();
[325]65  }
66 
67  void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)
68  {
[347]69     CTimer::get("XIOS").resume();
[325]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");
[347]72     CTimer::get("XIOS").suspend();
[325]73  }
74 
75 
[336]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;
[347]80     CTimer::get("XIOS").resume();
[336]81    context_hdl->time_origin.setValue(time_origin_str);
82    context_hdl->sendAttributToServer(context_hdl->time_origin);
[347]83     CTimer::get("XIOS").suspend();
[336]84  }
85 
86  void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)
87  {
[347]88     CTimer::get("XIOS").resume();
[336]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");
[347]91     CTimer::get("XIOS").suspend();
[336]92  }
93 
94 
[325]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;
[347]99     CTimer::get("XIOS").resume();
[325]100    context_hdl->timestep.setValue(timestep_str);
101    context_hdl->sendAttributToServer(context_hdl->timestep);
[347]102     CTimer::get("XIOS").suspend();
[325]103  }
104 
105  void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)
106  {
[347]107     CTimer::get("XIOS").resume();
[325]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");
[347]110     CTimer::get("XIOS").suspend();
[325]111  }
112 
113 
114 
115}
Note: See TracBrowser for help on using the repository browser.