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

Last change on this file since 1612 was 1612, checked in by oabramkina, 21 months ago

Dev: adding exception handling.

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 "duplicate_scalar_to_axis.hpp"
17
18extern "C"
19{
20// /////////////////////////////// Définitions ////////////////////////////// //
21
22   // ----------------------- Redéfinition de types ----------------------------
23
24   typedef xios::CDuplicateScalarToAxis      * XDuplicateScalarToAxisPtr;
25   
26   // ------------------------ Création des handle -----------------------------
27   void cxios_duplicate_scalar_to_axis_handle_create(XDuplicateScalarToAxisPtr * _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::CDuplicateScalarToAxis::get(id);
34      CTimer::get("XIOS").suspend() ;
35   }
36   CATCH_DUMP_STACK
37
38   // -------------------- Vérification des identifiants -----------------------
39   void cxios_duplicate_scalar_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::CDuplicateScalarToAxis::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.