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