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

Last change on this file since 501 was 501, checked in by ymipsl, 10 years ago

Add licence copyright to all file ond directory src using the command :
svn propset -R copyright -F header_licence src

XIOS is now officialy under CeCILL licence

YM

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 5.7 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();
[445]32    if(!string_copy(context_hdl->calendar_type.getInheritedValue(),calendar_type , calendar_type_size))
[325]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 
[432]37  bool cxios_is_defined_context_calendar_type(context_Ptr context_hdl )
38  {
39     CTimer::get("XIOS").resume();
[445]40    return context_hdl->calendar_type.hasInheritedValue();
[432]41     CTimer::get("XIOS").suspend();
42  }
[325]43 
[432]44 
45 
[325]46  void cxios_set_context_output_dir(context_Ptr context_hdl, const char * output_dir, int output_dir_size)
47  {
48    std::string output_dir_str;
49    if(!cstr2string(output_dir, output_dir_size, output_dir_str)) return;
[347]50     CTimer::get("XIOS").resume();
[325]51    context_hdl->output_dir.setValue(output_dir_str);
52    context_hdl->sendAttributToServer(context_hdl->output_dir);
[347]53     CTimer::get("XIOS").suspend();
[325]54  }
55 
56  void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)
57  {
[347]58     CTimer::get("XIOS").resume();
[445]59    if(!string_copy(context_hdl->output_dir.getInheritedValue(),output_dir , output_dir_size))
[325]60      ERROR("void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)", <<"Input string is to short");
[347]61     CTimer::get("XIOS").suspend();
[325]62  }
63 
[432]64  bool cxios_is_defined_context_output_dir(context_Ptr context_hdl )
65  {
66     CTimer::get("XIOS").resume();
[445]67    return context_hdl->output_dir.hasInheritedValue();
[432]68     CTimer::get("XIOS").suspend();
69  }
[325]70 
[432]71 
72 
[325]73  void cxios_set_context_start_date(context_Ptr context_hdl, const char * start_date, int start_date_size)
74  {
75    std::string start_date_str;
76    if(!cstr2string(start_date, start_date_size, start_date_str)) return;
[347]77     CTimer::get("XIOS").resume();
[325]78    context_hdl->start_date.setValue(start_date_str);
79    context_hdl->sendAttributToServer(context_hdl->start_date);
[347]80     CTimer::get("XIOS").suspend();
[325]81  }
82 
83  void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)
84  {
[347]85     CTimer::get("XIOS").resume();
[445]86    if(!string_copy(context_hdl->start_date.getInheritedValue(),start_date , start_date_size))
[325]87      ERROR("void cxios_get_context_start_date(context_Ptr context_hdl, char * start_date, int start_date_size)", <<"Input string is to short");
[347]88     CTimer::get("XIOS").suspend();
[325]89  }
90 
[432]91  bool cxios_is_defined_context_start_date(context_Ptr context_hdl )
92  {
93     CTimer::get("XIOS").resume();
[445]94    return context_hdl->start_date.hasInheritedValue();
[432]95     CTimer::get("XIOS").suspend();
96  }
[325]97 
[432]98 
99 
[336]100  void cxios_set_context_time_origin(context_Ptr context_hdl, const char * time_origin, int time_origin_size)
101  {
102    std::string time_origin_str;
103    if(!cstr2string(time_origin, time_origin_size, time_origin_str)) return;
[347]104     CTimer::get("XIOS").resume();
[336]105    context_hdl->time_origin.setValue(time_origin_str);
106    context_hdl->sendAttributToServer(context_hdl->time_origin);
[347]107     CTimer::get("XIOS").suspend();
[336]108  }
109 
110  void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)
111  {
[347]112     CTimer::get("XIOS").resume();
[445]113    if(!string_copy(context_hdl->time_origin.getInheritedValue(),time_origin , time_origin_size))
[336]114      ERROR("void cxios_get_context_time_origin(context_Ptr context_hdl, char * time_origin, int time_origin_size)", <<"Input string is to short");
[347]115     CTimer::get("XIOS").suspend();
[336]116  }
117 
[432]118  bool cxios_is_defined_context_time_origin(context_Ptr context_hdl )
119  {
120     CTimer::get("XIOS").resume();
[445]121    return context_hdl->time_origin.hasInheritedValue();
[432]122     CTimer::get("XIOS").suspend();
123  }
[336]124 
[432]125 
126 
[325]127  void cxios_set_context_timestep(context_Ptr context_hdl, const char * timestep, int timestep_size)
128  {
129    std::string timestep_str;
130    if(!cstr2string(timestep, timestep_size, timestep_str)) return;
[347]131     CTimer::get("XIOS").resume();
[325]132    context_hdl->timestep.setValue(timestep_str);
133    context_hdl->sendAttributToServer(context_hdl->timestep);
[347]134     CTimer::get("XIOS").suspend();
[325]135  }
136 
137  void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)
138  {
[347]139     CTimer::get("XIOS").resume();
[445]140    if(!string_copy(context_hdl->timestep.getInheritedValue(),timestep , timestep_size))
[325]141      ERROR("void cxios_get_context_timestep(context_Ptr context_hdl, char * timestep, int timestep_size)", <<"Input string is to short");
[347]142     CTimer::get("XIOS").suspend();
[325]143  }
144 
[432]145  bool cxios_is_defined_context_timestep(context_Ptr context_hdl )
146  {
147     CTimer::get("XIOS").resume();
[445]148    return context_hdl->timestep.hasInheritedValue();
[432]149     CTimer::get("XIOS").suspend();
150  }
[325]151 
152 
[432]153 
154 
[325]155}
Note: See TracBrowser for help on using the repository browser.