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

Last change on this file since 591 was 591, checked in by rlacroix, 9 years ago

Remove leftovers from the XMLIO age.

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