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, 5 years ago

Dev: adding exception handling.

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

File size: 1.6 KB
RevLine 
[934]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)
[1612]27   TRY
[934]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   }
[1612]35   CATCH_DUMP_STACK
[934]36
37   // -------------------- Vérification des identifiants -----------------------
38   void cxios_compute_connectivity_domain_valid_id(bool * _ret, const char * _id, int _id_len)
[1612]39   TRY
[934]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   }
[1612]48   CATCH_DUMP_STACK
[934]49} // extern "C"
Note: See TracBrowser for help on using the repository browser.