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