X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleCatalog%2FSALOME_ModuleCatalog_Acomponent_impl.hxx;h=f43258904591c1df57b785d11f80ad8ae9539480;hb=e0561d7cf50075cec88e1a44438f3787a314ce00;hp=0a7c715d5d4b3c49c890e7723c11de383b64d163;hpb=4b3f8c24b90bd308efd30e6dd06b5af5ce66fa95;p=modules%2Fyacs.git diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx index 0a7c715d5..f43258904 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx @@ -1,52 +1,50 @@ -// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules // File : SALOME_ModuleCatalog_Acomponent_impl.hxx // Author : Estelle Deville // Module : SALOME // $Header$ - +// #ifndef ACOMPONENT_IMPL_H #define ACOMPONENT_IMPL_H -#include "utilities.h" -#include "PathPrefix.hxx" +#include "SALOME_ModuleCatalog.hxx" + #include + #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) -class SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent, - public PortableServer::RefCountServantBase +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4290) // Warning Exception ... +#endif + +class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent { public: //! standard constructor - SALOME_ModuleCatalog_AcomponentImpl(const char* name, - const char* username, - const char* constraint, - SALOME_ModuleCatalog::ComponentType componenttype, - CORBA::Boolean componentmultistudy, - const char* icone, - SALOME_ModuleCatalog::ListOfDefInterface list_interfaces, - ListOfPathPrefix pathes); + SALOME_ModuleCatalog_AcomponentImpl(SALOME_ModuleCatalog::ComponentDef &C); //! standard destructor virtual ~SALOME_ModuleCatalog_AcomponentImpl(); @@ -85,7 +83,7 @@ public: */ virtual SALOME_ModuleCatalog::Service* GetService(const char* interfacename, - const char* servicename) + const char* servicename) throw(SALOME_ModuleCatalog::NotFound); //! method to get the default service of an interface of a component @@ -137,27 +135,59 @@ public: //! method to obtain the component icone (for IAPP) /*! - \return the component icone + \return the component icon */ virtual char* component_icone(); + //! method to define if a component is implemented in a dyn lib a python module or an executable + /*! + \return an enum SO or PY or EXE or CEXE + */ + virtual SALOME_ModuleCatalog::ImplType implementation_type(); + + //! method to obtain the implementation name of the component if the default one is not convenient + /*! + \return the implementation name to exec + */ + virtual char* implementation_name(); + private : - char* _component_name ; - char* _component_user_name ; - char* _constraint; - char* _icone; - SALOME_ModuleCatalog::ComponentType _componenttype; - CORBA::Boolean _componentmultistudy; - SALOME_ModuleCatalog::ListOfDefInterface _list_interfaces; - ListOfPathPrefix _pathes ; - + + SALOME_ModuleCatalog::ComponentDef _Component; + + //! method to duplicate an interface + /*! + \param service SALOME_ModuleCatalog::DefinitionInterface arguments + \return the interface + */ + void duplicate(SALOME_ModuleCatalog::DefinitionInterface &I_out, + const SALOME_ModuleCatalog::DefinitionInterface &I_in); //! method to duplicate a service /*! \param service SALOME_ModuleCatalog::Service arguments \return the service */ - virtual SALOME_ModuleCatalog::Service_var _duplicate_service(SALOME_ModuleCatalog::Service service); + void duplicate(SALOME_ModuleCatalog::Service & S_out, + const SALOME_ModuleCatalog::Service &S_in); + + //! method to duplicate a parameter + /*! + \param parameter SALOME_ModuleCatalog::ServicesParameter arguments + \return the parameter + */ + void duplicate(SALOME_ModuleCatalog::ServicesParameter & P_out, + const SALOME_ModuleCatalog::ServicesParameter & P_in); + + //! method to duplicate a parameter + /*! + \param parameter SALOME_ModuleCatalog::ServicesDataStreamParameter arguments + \return the parameter + */ + void duplicate(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_out, + const SALOME_ModuleCatalog::ServicesDataStreamParameter &P_in); + }; + #endif // ACOMPONENT_IMPL_H