1 // Copyright (C) 2007-2008 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
22 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
23 // File : SALOME_ModuleCatalog_Acomponent_impl.hxx
24 // Author : Estelle Deville
28 #ifndef ACOMPONENT_IMPL_H
29 #define ACOMPONENT_IMPL_H
31 #include "SALOME_ModuleCatalog.hxx"
33 #include "SALOME_ModuleCatalog_Parser.hxx"
34 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
38 class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent
41 //! standard constructor
42 SALOME_ModuleCatalog_AcomponentImpl(SALOME_ModuleCatalog::ComponentDef &C);
44 //! standard destructor
45 virtual ~SALOME_ModuleCatalog_AcomponentImpl();
47 //! method to get a list of the interfaces name of a component
49 \return a list of the interfaces of a component
51 virtual SALOME_ModuleCatalog::ListOfInterfaces* GetInterfaceList() ;
53 //! method to get one interface of a component
54 /*! If the specified interface doesn't exist, the Notfound exception is thrown
55 \param interface name const car* arguments
56 \return the wanted interface
58 virtual SALOME_ModuleCatalog::DefinitionInterface*
59 GetInterface(const char* interfacename)
60 throw(SALOME_ModuleCatalog::NotFound);
62 //! method to get a list of the services name of an interface of a component
63 /*!If the specified interface doesn't exist, the Notfound exception is thrown
64 \param interfacename const char* arguments
65 \return a list of the services of the wanted interface
67 virtual SALOME_ModuleCatalog::ListOfServices*
68 GetServiceList(const char* interfacename)
69 throw(SALOME_ModuleCatalog::NotFound);
72 //! method to get one service of an interface of a component
73 /*! If the wanted service or the specified interface don't exist,
74 * the Notfound exception is thrown
75 \param interfacename const char* arguments
76 \param servicename const char* arguments
77 \return the wanted service
79 virtual SALOME_ModuleCatalog::Service*
80 GetService(const char* interfacename,
81 const char* servicename)
82 throw(SALOME_ModuleCatalog::NotFound);
84 //! method to get the default service of an interface of a component
85 /*! If the specified interface doesn't exist, the Notfound exception is thrown
86 \param interfacename const char* arguments
87 \return the default service of the interface
89 virtual SALOME_ModuleCatalog::Service*
90 GetDefaultService(const char* interfacename)
91 throw(SALOME_ModuleCatalog::NotFound);
93 //! method to get the PathPrefix of a computer
94 /*! If the wanted computer doesn't exist, the Notfound exception is thrown
95 \param machinename const char* arguments
96 \return the prefix path
98 virtual char* GetPathPrefix(const char* machinename)
99 throw(SALOME_ModuleCatalog::NotFound);
101 //! method to obtain the constraint affected to a component
102 /*! to be resolved by LifeCycle for the computer choice
103 \return the constraint
105 virtual char* constraint() ;
107 //! method to obtain the componentname
109 \return the component name
111 virtual char* componentname();
113 //! method to obtain the componentusername
115 \return the component user name
117 virtual char* componentusername();
119 //! method to define if a component can be multistudy or not
121 \return true if the component supports multistudy
123 virtual CORBA::Boolean multistudy();
125 //! method to define the type of the component
127 \return the component type
129 virtual SALOME_ModuleCatalog::ComponentType component_type() ;
131 //! method to obtain the component icone (for IAPP)
133 \return the component icon
135 virtual char* component_icone();
137 //! method to define if a component is implemented in a dyn lib a python module or an executable
139 \return an enum SO or PY or EXE or CEXE
141 virtual SALOME_ModuleCatalog::ImplType implementation_type();
143 //! method to obtain the implementation name of the component if the default one is not convenient
145 \return the implementation name to exec
147 virtual char* implementation_name();
151 SALOME_ModuleCatalog::ComponentDef _Component;
153 //! method to duplicate an interface
155 \param service SALOME_ModuleCatalog::DefinitionInterface arguments
156 \return the interface
158 void duplicate(SALOME_ModuleCatalog::DefinitionInterface &I_out,
159 const SALOME_ModuleCatalog::DefinitionInterface &I_in);
161 //! method to duplicate a service
163 \param service SALOME_ModuleCatalog::Service arguments
166 void duplicate(SALOME_ModuleCatalog::Service & S_out,
167 const SALOME_ModuleCatalog::Service &S_in);
169 //! method to duplicate a parameter
171 \param parameter SALOME_ModuleCatalog::ServicesParameter arguments
172 \return the parameter
174 void duplicate(SALOME_ModuleCatalog::ServicesParameter & P_out,
175 const SALOME_ModuleCatalog::ServicesParameter & P_in);
177 //! method to duplicate a parameter
179 \param parameter SALOME_ModuleCatalog::ServicesDataStreamParameter arguments
180 \return the parameter
182 void duplicate(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_out,
183 const SALOME_ModuleCatalog::ServicesDataStreamParameter &P_in);
188 #endif // ACOMPONENT_IMPL_H