source: XIOS/dev/branch_openmp/src/interface/c/icdomain.cpp @ 1545

Last change on this file since 1545 was 1545, checked in by yushan, 6 years ago

branch_openmp merged with trunk r1544

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • 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
7#include <memory>
8
9#include "xios.hpp"
10
11#include "attribute_template.hpp"
12#include "object_template.hpp"
13#include "group_template.hpp"
14
15#include "icutil.hpp"
16#include "timer.hpp"
17#include "domain.hpp"
18
19extern "C"
20{
21// /////////////////////////////// Définitions ////////////////////////////// //
22
23   // ----------------------- Redéfinition de types ----------------------------
24
25   typedef xios::CDomain      * XDomainPtr;
26   typedef xios::CDomainGroup * XDomainGroupPtr;
27
28   // ------------------------ Création des handle -----------------------------
29   
30   void cxios_domain_handle_create (XDomainPtr * _ret, const char * _id, int _id_len)
31   {
32      std::string id; 
33      if (!cstr2string(_id, _id_len, id)) return;
34      CTimer::get("XIOS").resume() ;
35      *_ret = CDomain::get(id);
36      CTimer::get("XIOS").suspend() ;
37   }
38   
39   void cxios_domaingroup_handle_create (XDomainGroupPtr * _ret, const char * _id, int _id_len)
40   {
41      std::string id; 
42      if (!cstr2string(_id, _id_len, id)) return;
43
44      CTimer::get("XIOS").resume() ;
45      *_ret = CDomainGroup::get(id);
46      CTimer::get("XIOS").suspend() ;
47   }
48
49   // -------------------- Vérification des identifiants -----------------------
50
51   void cxios_domain_valid_id (bool * _ret, const char * _id, int _id_len)
52   {
53      std::string id;
54      if (!cstr2string(_id, _id_len, id)) return;
55
56      CTimer::get("XIOS").resume() ;
57      *_ret = CDomain::has(id);
58      CTimer::get("XIOS").suspend() ;
59   }
60
61   void cxios_domaingroup_valid_id (bool * _ret, const char * _id, int _id_len)
62   {
63      std::string id;
64      if (!cstr2string(_id, _id_len, id)) return;
65      CTimer::get("XIOS").resume() ;
66      *_ret = CDomainGroup::has(id);
67      CTimer::get("XIOS").suspend() ;
68   }
69} // extern "C"
Note: See TracBrowser for help on using the repository browser.