source: XIOS/trunk/src/interface/c/icextract_to_axis.cpp @ 2278

Last change on this file since 2278 was 1622, checked in by oabramkina, 6 years ago

Exception handling on trunk.

To activate it, compilation flag -DXIOS_EXCEPTION should be added.

File size: 1.6 KB
Line 
1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <memory>
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 "extract_domain_to_axis.hpp"
17
18extern "C"
19{
20// /////////////////////////////// Définitions ////////////////////////////// //
21
22   // ----------------------- Redéfinition de types ----------------------------
23
24   typedef xios::CExtractDomainToAxis      * XExtractDomainToAxisPtr;
25   
26   // ------------------------ Création des handle -----------------------------
27   void cxios_extract_domain_to_axis_handle_create(XExtractDomainToAxisPtr * _ret, const char * _id, int _id_len)
28   TRY
29   {
30      std::string id;
31      if (!cstr2string(_id, _id_len, id)) return;
32      CTimer::get("XIOS").resume() ;
33      *_ret = xios::CExtractDomainToAxis::get(id);
34      CTimer::get("XIOS").suspend() ;
35   }
36   CATCH_DUMP_STACK
37
38   // -------------------- Vérification des identifiants -----------------------
39   void cxios_extract_domain_to_axis_valid_id(bool * _ret, const char * _id, int _id_len)
40   TRY
41   {
42      std::string id;
43      if (!cstr2string(_id, _id_len, id)) return;
44
45      CTimer::get("XIOS").resume() ;
46      *_ret = xios::CExtractDomainToAxis::has(id);
47      CTimer::get("XIOS").suspend() ;
48   }
49   CATCH_DUMP_STACK
50
51} // extern "C"
Note: See TracBrowser for help on using the repository browser.