XIOS  1.0
Xml I/O Server
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Énumérations Valeurs énumérées Amis Macros
icexpand_domain.cpp
Aller à la documentation de ce fichier.
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 "object_template.hpp"
12 #include "group_template.hpp"
13 #include "attribute_template.hpp"
14 
15 #include "icutil.hpp"
16 #include "timer.hpp"
17 #include "expand_domain.hpp"
18 
19 extern "C"
20 {
21 // /////////////////////////////// Définitions ////////////////////////////// //
22 
23  // ----------------------- Redéfinition de types ----------------------------
24 
26 
27  // ------------------------ Création des handle -----------------------------
28  void cxios_expand_domain_handle_create(XExpandDomainPtr * _ret, const char * _id, int _id_len)
29  TRY
30  {
31  std::string id;
32  if (!cstr2string(_id, _id_len, id)) return;
33  CTimer::get("XIOS").resume() ;
34  *_ret = xios::CExpandDomain::get(id);
35  CTimer::get("XIOS").suspend() ;
36  }
38 
39  // -------------------- Vérification des identifiants -----------------------
40  void cxios_expand_domain_valid_id(bool * _ret, const char * _id, int _id_len)
41  TRY
42  {
43  std::string id;
44  if (!cstr2string(_id, _id_len, id)) return;
45 
46  CTimer::get("XIOS").resume() ;
47  *_ret = xios::CExpandDomain::has(id);
48  CTimer::get("XIOS").suspend() ;
49  }
51 } // extern "C"
static bool has(const string &id)
#define TRY
Definition: exception.hpp:154
#define CATCH_DUMP_STACK
Definition: exception.hpp:157
CATCH_DUMP_STACK void cxios_expand_domain_valid_id(bool *_ret, const char *_id, int _id_len) TRY
xios::CExpandDomain * XExpandDomainPtr
bool cstr2string(const char *cstr, int cstr_size, std::string &str)
Definition: icutil.hpp:14
void cxios_expand_domain_handle_create(XExpandDomainPtr *_ret, const char *_id, int _id_len) TRY