source: XIOS/trunk/src/interface/c/icdomain.cpp @ 347

Last change on this file since 347 was 347, checked in by ymipsl, 12 years ago
  • Supress lot of shared_ptr
  • instrument code for vampir-trace and timer diagnostic

YM

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
7
8#include "xmlioserver.hpp"
9
10#include "attribute_template_impl.hpp"
11#include "object_template_impl.hpp"
12#include "group_template_impl.hpp"
13
14#include "icutil.hpp"
15#include "timer.hpp"
16
17extern "C"
18{
19// /////////////////////////////// Définitions ////////////////////////////// //
20
21   // ----------------------- Redéfinition de types ----------------------------
22
23   typedef xios::CDomain      * XDomainPtr;
24   typedef xios::CDomainGroup * XDomainGroupPtr;
25
26   // ------------------------ Création des handle -----------------------------
27   
28   void cxios_domain_handle_create (XDomainPtr * _ret, const char * _id, int _id_len)
29   {
30      std::string id; 
31      if (!cstr2string(_id, _id_len, id)) return;
32      CTimer::get("XIOS").resume() ;
33      *_ret = CDomain::get(id);
34      CTimer::get("XIOS").suspend() ;
35   }
36   
37   void cxios_domaingroup_handle_create (XDomainGroupPtr * _ret, const char * _id, int _id_len)
38   {
39      std::string id; 
40      if (!cstr2string(_id, _id_len, id)) return;
41
42      CTimer::get("XIOS").resume() ;
43      *_ret = CDomainGroup::get(id);
44      CTimer::get("XIOS").suspend() ;
45   }
46
47   // -------------------- Vérification des identifiants -----------------------
48
49   void cxios_domain_valid_id (bool * _ret, const char * _id, int _id_len)
50   {
51      std::string id;
52      if (!cstr2string(_id, _id_len, id)) return;
53
54      CTimer::get("XIOS").resume() ;
55      *_ret = CDomain::has(id);
56      CTimer::get("XIOS").suspend() ;
57   }
58
59   void cxios_domaingroup_valid_id (bool * _ret, const char * _id, int _id_len)
60   {
61      std::string id;
62      if (!cstr2string(_id, _id_len, id)) return;
63      CTimer::get("XIOS").resume() ;
64      *_ret = CDomainGroup::has(id);
65      CTimer::get("XIOS").suspend() ;
66   }
67} // extern "C"
Note: See TracBrowser for help on using the repository browser.