[784] | 1 | /* ************************************************************************** * |
---|
| 2 | * Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011 * |
---|
| 3 | * ************************************************************************** */ |
---|
| 4 | |
---|
| 5 | #include <boost/multi_array.hpp> |
---|
| 6 | |
---|
[1542] | 7 | #include <memory> |
---|
| 8 | |
---|
[784] | 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" |
---|
[786] | 18 | #include "zoom_domain.hpp" |
---|
[784] | 19 | |
---|
| 20 | extern "C" |
---|
| 21 | { |
---|
| 22 | // /////////////////////////////// Définitions ////////////////////////////// // |
---|
| 23 | |
---|
| 24 | // ----------------------- Redéfinition de types ---------------------------- |
---|
| 25 | |
---|
| 26 | typedef xios::CZoomAxis * XZoomAxisPtr; |
---|
[786] | 27 | typedef xios::CZoomDomain * XZoomDomainPtr; |
---|
[784] | 28 | // ------------------------ Création des handle ----------------------------- |
---|
| 29 | void cxios_zoom_axis_handle_create (XZoomAxisPtr * _ret, const char * _id, int _id_len) |
---|
[1622] | 30 | TRY |
---|
[784] | 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 | } |
---|
[1622] | 38 | CATCH_DUMP_STACK |
---|
[784] | 39 | |
---|
| 40 | // -------------------- Vérification des identifiants ----------------------- |
---|
| 41 | void cxios_zoom_axis_valid_id (bool * _ret, const char * _id, int _id_len) |
---|
[1622] | 42 | TRY |
---|
[784] | 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 | } |
---|
[1622] | 51 | CATCH_DUMP_STACK |
---|
[786] | 52 | |
---|
| 53 | // ------------------------ Création des handle ----------------------------- |
---|
| 54 | void cxios_zoom_domain_handle_create(XZoomDomainPtr * _ret, const char * _id, int _id_len) |
---|
[1622] | 55 | TRY |
---|
[786] | 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 | } |
---|
[1622] | 63 | CATCH_DUMP_STACK |
---|
[786] | 64 | |
---|
| 65 | // -------------------- Vérification des identifiants ----------------------- |
---|
| 66 | void cxios_zoom_domain_valid_id(bool * _ret, const char * _id, int _id_len) |
---|
[1622] | 67 | TRY |
---|
[786] | 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 | } |
---|
[1622] | 76 | CATCH_DUMP_STACK |
---|
[784] | 77 | } // extern "C" |
---|