source: XIOS/dev/dev_olga/src/interface/c/icextract_to_axis.cpp @ 1612

Last change on this file since 1612 was 1612, checked in by oabramkina, 5 years ago

Dev: adding exception handling.

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

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