/* ************************************************************************** * * Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011 * * ************************************************************************** */ #include #include #include "xmlioserver.hpp" #include "attribute_template_impl.hpp" #include "object_template_impl.hpp" #include "group_template_impl.hpp" #include "icutil.hpp" extern "C" { // /////////////////////////////// Définitions ////////////////////////////// // // ----------------------- Redéfinition de types ---------------------------- typedef xmlioserver::tree::CGrid * XGridPtr; typedef xmlioserver::tree::CGridGroup * XGridGroupPtr; // ------------------------ Création des handle ----------------------------- void cxios_grid_handle_create (XGridPtr * _ret, const char * _id, int _id_len) { std::string id; if (!cstr2string(_id, _id_len, id)) return; *_ret = xmlioserver::CObjectFactory::GetObject(id).get(); } void cxios_gridgroup_handle_create (XGridGroupPtr * _ret, const char * _id, int _id_len) { std::string id; if (!cstr2string(_id, _id_len, id)) return; *_ret = xmlioserver::CObjectFactory::GetObject(id).get(); } // -------------------- Vérification des identifiants ----------------------- void cxios_grid_valid_id (bool * _ret, const char * _id, int _id_len) { std::string id; if (!cstr2string(_id, _id_len, id)) return; *_ret = xmlioserver::CObjectFactory::HasObject(id); } void cxios_gridgroup_valid_id (bool * _ret, const char * _id, int _id_len) { std::string id; if (!cstr2string(_id, _id_len, id)) return; *_ret = xmlioserver::CObjectFactory::HasObject(id); } } // extern "C"