source: XIOS/dev/dev_ym/XIOS_COUPLING/src/interface/c_attr/iccontext_attr.cpp @ 2291

Last change on this file since 2291 was 1941, checked in by ymipsl, 4 years ago

XIOS coupling : Update fortran interface
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: 2.2 KB
RevLine 
[325]1/* ************************************************************************** *
[581]2 *               Interface auto generated - do not modify                     *
[325]3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
[591]6#include "xios.hpp"
[352]7#include "attribute_template.hpp"
8#include "object_template.hpp"
9#include "group_template.hpp"
[325]10#include "icutil.hpp"
[532]11#include "icdate.hpp"
[347]12#include "timer.hpp"
[369]13#include "node_type.hpp"
[325]14
15extern "C"
16{
[581]17  typedef xios::CContext* context_Ptr;
18
[1941]19  void cxios_set_context_attached_mode(context_Ptr context_hdl, bool attached_mode)
20  {
21    CTimer::get("XIOS").resume();
22    context_hdl->attached_mode.setValue(attached_mode);
23    CTimer::get("XIOS").suspend();
24  }
25
26  void cxios_get_context_attached_mode(context_Ptr context_hdl, bool* attached_mode)
27  {
28    CTimer::get("XIOS").resume();
29    *attached_mode = context_hdl->attached_mode.getInheritedValue();
30    CTimer::get("XIOS").suspend();
31  }
32
33  bool cxios_is_defined_context_attached_mode(context_Ptr context_hdl)
34  {
35     CTimer::get("XIOS").resume();
36     bool isDefined = context_hdl->attached_mode.hasInheritedValue();
37     CTimer::get("XIOS").suspend();
38     return isDefined;
39  }
40
41
[325]42  void cxios_set_context_output_dir(context_Ptr context_hdl, const char * output_dir, int output_dir_size)
43  {
44    std::string output_dir_str;
[581]45    if (!cstr2string(output_dir, output_dir_size, output_dir_str)) return;
46    CTimer::get("XIOS").resume();
[325]47    context_hdl->output_dir.setValue(output_dir_str);
[581]48    CTimer::get("XIOS").suspend();
[325]49  }
[581]50
[325]51  void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)
52  {
[581]53    CTimer::get("XIOS").resume();
54    if (!string_copy(context_hdl->output_dir.getInheritedValue(), output_dir, output_dir_size))
55      ERROR("void cxios_get_context_output_dir(context_Ptr context_hdl, char * output_dir, int output_dir_size)", << "Input string is too short");
56    CTimer::get("XIOS").suspend();
[325]57  }
[581]58
59  bool cxios_is_defined_context_output_dir(context_Ptr context_hdl)
[432]60  {
61     CTimer::get("XIOS").resume();
[581]62     bool isDefined = context_hdl->output_dir.hasInheritedValue();
[432]63     CTimer::get("XIOS").suspend();
[581]64     return isDefined;
[432]65  }
[325]66}
Note: See TracBrowser for help on using the repository browser.