source: XIOS/dev/dev_trunk_omp/src/interface/c/iczoom.cpp @ 1646

Last change on this file since 1646 was 1646, checked in by yushan, 5 years ago

branch merged with trunk @1645. arch file (ep&mpi) added for ADA

File size: 2.3 KB
Line 
1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6
7#include <memory>
8
9#include "xios.hpp"
10
11#include "object_template.hpp"
12#include "group_template.hpp"
13#include "attribute_template.hpp"
14
15#include "icutil.hpp"
16#include "timer.hpp"
17#include "zoom_axis.hpp"
18#include "zoom_domain.hpp"
19
20extern "C"
21{
22// /////////////////////////////// Définitions ////////////////////////////// //
23
24   // ----------------------- Redéfinition de types ----------------------------
25
26   typedef xios::CZoomAxis   * XZoomAxisPtr;
27   typedef xios::CZoomDomain * XZoomDomainPtr;
28   // ------------------------ Création des handle -----------------------------
29   void cxios_zoom_axis_handle_create (XZoomAxisPtr * _ret, const char * _id, int _id_len)
30   TRY
31   {
32      std::string id;
33      if (!cstr2string(_id, _id_len, id)) return;
34      CTimer::get("XIOS").resume() ;
35      *_ret = xios::CZoomAxis::get(id);
36      CTimer::get("XIOS").suspend() ;
37   }
38   CATCH_DUMP_STACK
39
40   // -------------------- Vérification des identifiants -----------------------
41   void cxios_zoom_axis_valid_id (bool * _ret, const char * _id, int _id_len)
42   TRY
43   {
44      std::string id;
45      if (!cstr2string(_id, _id_len, id)) return;
46
47      CTimer::get("XIOS").resume() ;
48      *_ret = xios::CZoomAxis::has(id);
49      CTimer::get("XIOS").suspend() ;
50   }
51   CATCH_DUMP_STACK
52
53   // ------------------------ Création des handle -----------------------------
54   void cxios_zoom_domain_handle_create(XZoomDomainPtr * _ret, const char * _id, int _id_len)
55   TRY
56   {
57      std::string id;
58      if (!cstr2string(_id, _id_len, id)) return;
59      CTimer::get("XIOS").resume() ;
60      *_ret = xios::CZoomDomain::get(id);
61      CTimer::get("XIOS").suspend() ;
62   }
63   CATCH_DUMP_STACK
64
65   // -------------------- Vérification des identifiants -----------------------
66   void cxios_zoom_domain_valid_id(bool * _ret, const char * _id, int _id_len)
67   TRY
68   {
69      std::string id;
70      if (!cstr2string(_id, _id_len, id)) return;
71
72      CTimer::get("XIOS").resume() ;
73      *_ret = xios::CZoomDomain::has(id);
74      CTimer::get("XIOS").suspend() ;
75   }
76   CATCH_DUMP_STACK
77} // extern "C"
Note: See TracBrowser for help on using the repository browser.