Salome HOME
updated copyright message
[modules/kernel.git] / src / ModuleCatalog / SALOME_ModuleCatalog_Acomponent_impl.hxx
1 // Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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, or (at your option) any later version.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
24 //  File   : SALOME_ModuleCatalog_Acomponent_impl.hxx
25 //  Author : Estelle Deville
26 //  Module : SALOME
27 //  $Header$
28 //
29 #ifndef ACOMPONENT_IMPL_H
30 #define ACOMPONENT_IMPL_H
31
32 #include "SALOME_ModuleCatalog.hxx"
33
34 #include <SALOMEconfig.h>
35
36 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
37
38 #ifdef WIN32
39 #pragma warning(disable:4275) // Disable warning interface non dll
40 //#pragma warning(disable:4290) // Warning Exception ...
41 #endif
42
43 class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent
44 {
45 public:
46   //! standard constructor
47   SALOME_ModuleCatalog_AcomponentImpl(SALOME_ModuleCatalog::ComponentDef &C);
48
49   //! standard destructor
50   virtual ~SALOME_ModuleCatalog_AcomponentImpl();
51
52   //! method to get a list of the interfaces name of a component
53   /*!
54     \return a list of the interfaces of a component 
55   */
56   virtual SALOME_ModuleCatalog::ListOfInterfaces* GetInterfaceList() ;
57
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
62   */
63   virtual SALOME_ModuleCatalog::DefinitionInterface* 
64              GetInterface(const char* interfacename);
65
66   //! method to get a list of the services name of an interface of a component
67  /*!If the specified interface doesn't exist, the Notfound exception is thrown
68    \param interfacename const char* arguments 
69    \return a list of the services of the wanted interface
70  */
71   virtual SALOME_ModuleCatalog::ListOfServices* 
72              GetServiceList(const char* interfacename);
73
74     
75   //! method to get one service of an interface of a component
76  /*! If the wanted service or the specified interface don't exist, 
77   *  the Notfound exception is thrown
78    \param interfacename const char* arguments 
79    \param servicename const char* arguments
80    \return the wanted service
81  */
82   virtual SALOME_ModuleCatalog::Service* 
83              GetService(const char* interfacename, 
84                         const char* servicename);
85
86   //! method to get the default service of an interface of a component
87   /*! If the specified interface doesn't exist, the Notfound exception is thrown
88     \param interfacename const char* arguments 
89     \return the default service of the interface
90   */
91   virtual SALOME_ModuleCatalog::Service* 
92              GetDefaultService(const char* interfacename);
93
94   //! method to get the PathPrefix of a computer
95  /*! If the wanted computer doesn't exist, the Notfound exception is thrown
96    \param machinename const char* arguments 
97    \return the prefix path
98  */
99   virtual char* GetPathPrefix(const char* machinename);
100
101   //! method to obtain the constraint affected to a component
102   /*! to be resolved by LifeCycle for the computer choice
103     \return the constraint
104   */
105   virtual char* constraint();
106
107   //! method to obtain the componentname
108   /*!
109     \return the component name
110   */
111   virtual char* componentname();
112
113   //! method to obtain the componentusername
114   /*!
115     \return the component user name
116   */
117   virtual char* componentusername();
118
119   //! method to define the type of the component
120   /*!
121     \return the component type
122   */
123   virtual SALOME_ModuleCatalog::ComponentType component_type() ;
124
125   //! method to obtain the component icone (for IAPP)
126   /*!
127     \return the component icon
128   */
129   virtual char* component_icone();
130
131   //! method to define if a component is implemented in a dyn lib a python module or an executable
132   /*!
133     \return an enum SO or PY or EXE or CEXE
134   */
135   virtual SALOME_ModuleCatalog::ImplType implementation_type();
136
137   //! method to obtain the implementation name of the component if the default one is not convenient
138   /*!
139     \return the implementation name to exec
140   */
141   virtual char* implementation_name();
142
143 private :
144
145   SALOME_ModuleCatalog::ComponentDef _Component;
146
147  //! method to duplicate an interface
148   /*!
149     \param service SALOME_ModuleCatalog::DefinitionInterface arguments
150     \return the interface
151   */
152   void duplicate(SALOME_ModuleCatalog::DefinitionInterface &I_out,
153                  const SALOME_ModuleCatalog::DefinitionInterface &I_in);
154
155  //! method to duplicate a service
156   /*!
157     \param service SALOME_ModuleCatalog::Service arguments
158     \return the service
159   */
160   void duplicate(SALOME_ModuleCatalog::Service & S_out,
161                  const SALOME_ModuleCatalog::Service &S_in);
162
163  //! method to duplicate a parameter
164   /*!
165     \param parameter SALOME_ModuleCatalog::ServicesParameter arguments
166     \return the parameter
167   */
168   void duplicate(SALOME_ModuleCatalog::ServicesParameter & P_out,
169                  const SALOME_ModuleCatalog::ServicesParameter & P_in);
170
171  //! method to duplicate a parameter
172   /*!
173     \param parameter SALOME_ModuleCatalog::ServicesDataStreamParameter arguments
174     \return the parameter
175   */
176   void duplicate(SALOME_ModuleCatalog::ServicesDataStreamParameter & P_out,
177                  const SALOME_ModuleCatalog::ServicesDataStreamParameter &P_in);
178
179 };
180
181
182 #endif // ACOMPONENT_IMPL_H