[784] | 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" |
---|
[786] | 16 | #include "inverse_axis.hpp" |
---|
[784] | 17 | |
---|
| 18 | extern "C" |
---|
| 19 | { |
---|
| 20 | // /////////////////////////////// Définitions ////////////////////////////// // |
---|
| 21 | |
---|
| 22 | // ----------------------- Redéfinition de types ---------------------------- |
---|
| 23 | |
---|
[786] | 24 | typedef xios::CInverseAxis * XInverseAxisPtr; |
---|
[784] | 25 | |
---|
| 26 | // ------------------------ Création des handle ----------------------------- |
---|
[786] | 27 | void cxios_inverse_axis_handle_create(XInverseAxisPtr * _ret, const char * _id, int _id_len) |
---|
[784] | 28 | { |
---|
| 29 | std::string id; |
---|
| 30 | if (!cstr2string(_id, _id_len, id)) return; |
---|
| 31 | CTimer::get("XIOS").resume() ; |
---|
[786] | 32 | *_ret = xios::CInverseAxis::get(id); |
---|
[784] | 33 | CTimer::get("XIOS").suspend() ; |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | // -------------------- Vérification des identifiants ----------------------- |
---|
[786] | 37 | void cxios_inverse_axis_valid_id(bool * _ret, const char * _id, int _id_len) |
---|
[784] | 38 | { |
---|
| 39 | std::string id; |
---|
| 40 | if (!cstr2string(_id, _id_len, id)) return; |
---|
| 41 | |
---|
| 42 | CTimer::get("XIOS").resume() ; |
---|
[786] | 43 | *_ret = xios::CInverseAxis::has(id); |
---|
[784] | 44 | CTimer::get("XIOS").suspend() ; |
---|
| 45 | } |
---|
| 46 | } // extern "C" |
---|