source: XIOS/dev/dev_rv/src4/xmlio/fortran/icgrid.cpp @ 302

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