/* ************************************************************************** * * Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011 * * ************************************************************************** */ #include #include #include "xios.hpp" #include "attribute_template.hpp" #include "object_template.hpp" #include "group_template.hpp" #include "icutil.hpp" #include "timer.hpp" #include "domain.hpp" extern "C" { // /////////////////////////////// Définitions ////////////////////////////// // // ----------------------- Redéfinition de types ---------------------------- typedef xios::CDomain * XDomainPtr; typedef xios::CDomainGroup * XDomainGroupPtr; // ------------------------ Création des handle ----------------------------- void cxios_domain_handle_create (XDomainPtr * _ret, const char * _id, int _id_len) TRY { std::string id; if (!cstr2string(_id, _id_len, id)) return; CTimer::get("XIOS").resume() ; *_ret = CDomain::get(id); CTimer::get("XIOS").suspend() ; } CATCH_DUMP_STACK void cxios_domaingroup_handle_create (XDomainGroupPtr * _ret, const char * _id, int _id_len) TRY { std::string id; if (!cstr2string(_id, _id_len, id)) return; CTimer::get("XIOS").resume() ; *_ret = CDomainGroup::get(id); CTimer::get("XIOS").suspend() ; } CATCH_DUMP_STACK // -------------------- Vérification des identifiants ----------------------- void cxios_domain_valid_id (bool * _ret, const char * _id, int _id_len) TRY { std::string id; if (!cstr2string(_id, _id_len, id)) return; CTimer::get("XIOS").resume() ; *_ret = CDomain::has(id); CTimer::get("XIOS").suspend() ; } CATCH_DUMP_STACK void cxios_domaingroup_valid_id (bool * _ret, const char * _id, int _id_len) TRY { std::string id; if (!cstr2string(_id, _id_len, id)) return; CTimer::get("XIOS").resume() ; *_ret = CDomainGroup::has(id); CTimer::get("XIOS").suspend() ; } CATCH_DUMP_STACK } // extern "C"