source: XMLIO_V2/dev/dev_rv/src/xmlio/fortran/icgrid.cpp @ 270

Last change on this file since 270 was 270, checked in by hozdoba, 13 years ago

Début nouvelle interface fortran

File size: 3.1 KB
Line 
1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
7
8#include "xmlioserver.hpp"
9
10#include "attribute_template_impl.hpp"
11#include "object_template_impl.hpp"
12#include "group_template_impl.hpp"
13
14#include "icutil.hpp"
15
16extern "C"
17{
18// /////////////////////////////// Définitions ////////////////////////////// //
19
20   // ----------------------- Redéfinition de types ----------------------------
21   
22   typedef xmlioserver::tree::CGrid      * XGridPtr;
23   typedef xmlioserver::tree::CGridGroup * XGridGroupPtr;
24
25   // ------------------------- Attributs des axes -----------------------------
26   
27   void xios_set_grid_name(XGridPtr grid_hdl, const char * name,  int name_size)
28   {
29      std::string name_str; 
30      if (!cstr2string(name, name_size, name_str)) return; 
31   }
32   
33   void xios_set_grid_description(XGridPtr grid_hdl, const char * description,  int description_size)
34   {
35      std::string description_str; 
36      if (!cstr2string(description, description_size, description_str)) return;
37   }
38   
39   void xios_set_grid_domain_ref(XGridPtr grid_hdl, const char * domain_ref,  int domain_ref_size)
40   {
41      std::string domain_ref_str; 
42      if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 
43   }
44   
45   void xios_set_grid_axis_ref(XGridPtr grid_hdl, const char * axis_ref,  int axis_ref_size)
46   {
47      std::string axis_ref_str; 
48      if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 
49   }
50   
51   // -------------------- Attributs des groupes de grilles --------------------
52   
53   void xios_set_gridgroup_name(XGridGroupPtr gridgroup_hdl, const char * name,  int name_size)
54   {
55      std::string name_str; 
56      if (!cstr2string(name, name_size, name_str)) return; 
57   }
58   
59   void xios_set_gridgroup_description(XGridGroupPtr gridgroup_hdl, const char * description,  int description_size)
60   {
61      std::string description_str; 
62      if (!cstr2string(description, description_size, description_str)) return;
63   }
64   
65   void xios_set_gridgroup_domain_ref(XGridGroupPtr gridgroup_hdl, const char * domain_ref,  int domain_ref_size)
66   {
67      std::string domain_ref_str; 
68      if (!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 
69   }
70   
71   void xios_set_gridgroup_axis_ref(XGridGroupPtr gridgroup_hdl, const char * axis_ref,  int axis_ref_size)
72   {
73      std::string axis_ref_str; 
74      if (!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 
75   }
76   
77   // ------------------------ Création des handle -----------------------------
78 
79   void xios_grid_handle_create (XGridPtr * _ret, const char * _id, int _id_len)
80   {
81      std::string id; 
82      if (!cstr2string(_id, _id_len, id)) return;
83   }
84   
85   void xios_gridgroup_handle_create (XGridGroupPtr * _ret, const char * _id, int _id_len)
86   {
87      std::string id; 
88      if (!cstr2string(_id, _id_len, id)) return;
89   }
90 
91   
92} // extern "C"
Note: See TracBrowser for help on using the repository browser.