source: XIOS/dev/dev_olga/src/interface/c/iccompute_connectivity_domain.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
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 "compute_connectivity_domain.hpp"
16
17extern "C"
18{
19// /////////////////////////////// Définitions ////////////////////////////// //
20
21   // ----------------------- Redéfinition de types ----------------------------
22
23   typedef xios::CComputeConnectivityDomain   * XComConDomainPtr;
24
25   // ------------------------ Création des handle -----------------------------
26   void cxios_compute_connectivity_domain_handle_create(XComConDomainPtr * _ret, const char * _id, int _id_len)
27   TRY
28   {
29      std::string id;
30      if (!cstr2string(_id, _id_len, id)) return;
31      CTimer::get("XIOS").resume() ;
32      *_ret = xios::CComputeConnectivityDomain::get(id);
33      CTimer::get("XIOS").suspend() ;
34   }
35   CATCH_DUMP_STACK
36
37   // -------------------- Vérification des identifiants -----------------------
38   void cxios_compute_connectivity_domain_valid_id(bool * _ret, const char * _id, int _id_len)
39   TRY
40   {
41      std::string id;
42      if (!cstr2string(_id, _id_len, id)) return;
43
44      CTimer::get("XIOS").resume() ;
45      *_ret = xios::CComputeConnectivityDomain::has(id);
46      CTimer::get("XIOS").suspend() ;
47   }
48   CATCH_DUMP_STACK
49} // extern "C"
Note: See TracBrowser for help on using the repository browser.