1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
24 // File : SALOME_ModuleCatalog_Acomponent_impl.hxx
25 // Author : Estelle Deville
29 #ifndef ACOMPONENT_IMPL_H
30 #define ACOMPONENT_IMPL_H
32 #include "SALOME_ModuleCatalog.hxx"
34 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
39 #pragma warning(disable:4275) // Disable warning interface non dll
40 #pragma warning(disable:4290) // Warning Exception ...
43 class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent
46 //! standard constructor
47 SALOME_ModuleCatalog_AcomponentImpl(SALOME_ModuleCatalog::ComponentDef &C);
49 //! standard destructor
50 virtual ~SALOME_ModuleCatalog_AcomponentImpl();
52 //! method to get a list of the interfaces name of a component
54 \return a list of the interfaces of a component
56 virtual SALOME_ModuleCatalog::ListOfInterfaces* GetInterfaceList() ;
58 //! method to get one interface of a component
59 /*! If the specified interface doesn't exist, the Notfound exception is thrown
60 \param interface name const car* arguments
61 \return the wanted interface
63 virtual SALOME_ModuleCatalog::DefinitionInterface*
64 GetInterface(const char* interfacename)
65 throw(SALOME_ModuleCatalog::NotFound);
67 //! method to get a list of the services name of an interface of a component
68 /*!If the specified interface doesn't exist, the Notfound exception is thrown
69 \param interfacename const char* arguments
70 \return a list of the services of the wanted interface
72 virtual SALOME_ModuleCatalog::ListOfServices*
73 GetServiceList(const char* interfacename)
74 throw(SALOME_ModuleCatalog::NotFound);
77 //! method to get one service of an interface of a component
78 /*! If the wanted service or the specified interface don't exist,
79 * the Notfound exception is thrown
80 \param interfacename const char* arguments
81 \param servicename const char* arguments
82 \return the wanted service
84 virtual SALOME_ModuleCatalog::Service*
85 GetService(const char* interfacename,
86 const char* servicename)
87 throw(SALOME_ModuleCatalog::NotFound);
89 //! method to get the default service of an interface of a component
90 /*! If the specified interface doesn't exist, the Notfound exception is thrown
91 \param interfacename const char* arguments
92 \return the default service of the interface
94 virtual SALOME_ModuleCatalog::Service*
95 GetDefaultService(const char* interfacename)
96 throw(SALOME_ModuleCatalog::NotFound);
98 //! method to get the PathPrefix of a computer
99 /*! If the wanted computer doesn't exist, the Notfound exception is thrown
100 \param machinename const char* arguments
101 \return the prefix path
103 virtual char* GetPathPrefix(const char* machinename)
104 throw(SALOME_ModuleCatalog::NotFound);
106 //! method to obtain the constraint affected to a component
107 /*! to be resolved by LifeCycle for the computer choice
108 \return the constraint
110 virtual char* constraint() ;
112 //! method to obtain the componentname
114 \return the component name
116 virtual char* componentname();
118 //! method to obtain the componentusername
120 \return the component user name
122 virtual char* componentusername();
124 //! method to define if a component can be multistudy or not
126 \return true if the component supports multistudy
128 virtual CORBA::Boolean multistudy();
130 //! method to define the type of the component
132 \return the component type
134 virtual SALOME_ModuleCatalog::ComponentType component_type() ;
136 //! method to obtain the component icone (for IAPP)
138 \return the component icon
140 virtual char* component_icone();
142 //! method to define if a component is implemented in a dyn lib a python module or an executable
144 \return an enum SO or PY or EXE or CEXE
146 virtual SALOME_ModuleCatalog::ImplType implementation_type();
148 //! method to obtain the implementation name of the component if the default one is not convenient
150 \return the implementation name to exec
152 virtual char* implementation_name();
156 SALOME_ModuleCatalog::ComponentDef _Component;
158 //! method to duplicate an interface
160 \param service SALOME_ModuleCatalog::DefinitionInterface arguments
161 \return the interface
163 void duplicate(SALOME_ModuleCatalog::DefinitionInterface &I_out,
164 const SALOME_ModuleCatalog::DefinitionInterface &I_in);
166 //! method to duplicate a service
168 \param service SALOME_ModuleCatalog::Service arguments
171 void duplicate(SALOME_ModuleCatalog::Service & S_out,
172 const SALOME_ModuleCatalog::Service &S_in);
174 //! method to duplicate a parameter
176 \param parameter SALOME_ModuleCatalog::ServicesParameter arguments
177 \return the parameter
179 void duplicate(SALOME_ModuleCatalog::ServicesParameter & P_out,
180 const SALOME_ModuleCatalog::ServicesParameter & P_in);
182 //! method to duplicate a parameter
184 \param parameter SALOME_ModuleCatalog::ServicesDataStreamParameter arguments
185 \return the parameter
187 void duplicate(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_out,
188 const SALOME_ModuleCatalog::ServicesDataStreamParameter &P_in);
193 #endif // ACOMPONENT_IMPL_H