source: XIOS/trunk/src/interface/c/iczoom.cpp @ 1542

Last change on this file since 1542 was 1542, checked in by oabramkina, 2 years ago

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File size: 2.2 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   {
31      std::string id;
32      if (!cstr2string(_id, _id_len, id)) return;
33      CTimer::get("XIOS").resume() ;
34      *_ret = xios::CZoomAxis::get(id);
35      CTimer::get("XIOS").suspend() ;
36   }
37
38   // -------------------- Vérification des identifiants -----------------------
39   void cxios_zoom_axis_valid_id (bool * _ret, const char * _id, int _id_len)
40   {
41      std::string id;
42      if (!cstr2string(_id, _id_len, id)) return;
43
44      CTimer::get("XIOS").resume() ;
45      *_ret = xios::CZoomAxis::has(id);
46      CTimer::get("XIOS").suspend() ;
47   }
48
49   // ------------------------ Création des handle -----------------------------
50   void cxios_zoom_domain_handle_create(XZoomDomainPtr * _ret, const char * _id, int _id_len)
51   {
52      std::string id;
53      if (!cstr2string(_id, _id_len, id)) return;
54      CTimer::get("XIOS").resume() ;
55      *_ret = xios::CZoomDomain::get(id);
56      CTimer::get("XIOS").suspend() ;
57   }
58
59   // -------------------- Vérification des identifiants -----------------------
60   void cxios_zoom_domain_valid_id(bool * _ret, const char * _id, int _id_len)
61   {
62      std::string id;
63      if (!cstr2string(_id, _id_len, id)) return;
64
65      CTimer::get("XIOS").resume() ;
66      *_ret = xios::CZoomDomain::has(id);
67      CTimer::get("XIOS").suspend() ;
68   }
69} // extern "C"
Note: See TracBrowser for help on using the repository browser.