Salome HOME
DCQ : Merge with Ecole_ete_a6.
[modules/yacs.git] / idl / SALOME_ModuleCatalog.idl
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
19 //
20 //
21 //
22 //  File   : SALOME_ModuleCatalog.idl
23 //  Author : Estelle Deville
24 //  $Header$
25
26 /*! \file SALOME_ModuleCatalog.idl This file conatins a set of interfaces used for  
27   creation of the catalog of components in %SALOME application
28 */
29
30 /*!  
31 The main package of interfaces used for creation of the module catalog in %SALOME application.
32 Module catalog allows to manage components of %SALOME application, to call specified in the
33 xml files interfaces with the help of AComponent interface.
34 */
35 module SALOME_ModuleCatalog
36 {
37   // Type Definitions
38 /*! 
39 This enumeration contains a current set of definitions of the components integrated
40 into %SALOME application.
41 */
42   enum ComponentType {  GEOM,  /*!<Module %GEOM */
43                         MESH,  /*!<Module %MESH */
44                          Med,  /*!<Module %Med*/
45                       SOLVER,  /*!<Module of %SOLVER type */
46                         DATA,  /*!<Module %DATA */
47                         VISU,  /*!<Module %VISU */
48                       SUPERV,  /*!<Module %SUPERVISION */
49                        OTHER   /*!<Any other type of module */
50                      } ;
51 /*! 
52 This struct contains fields defining the parameter of the service.
53 */
54
55   struct ServicesParameter
56   {
57     string Parametertype; /*!<Type of the parameter.*/
58     string Parametername; /*!<Name of the parameter.*/
59   } ;
60
61   enum DataStreamDependency {
62     DATASTREAM_UNDEFINED,
63     DATASTREAM_TEMPORAL,
64     DATASTREAM_ITERATIVE
65   } ;
66
67   enum DataStreamType {
68     DATASTREAM_UNKNOWN,
69     DATASTREAM_INTEGER,
70     DATASTREAM_FLOAT,
71     DATASTREAM_DOUBLE,
72     DATASTREAM_STRING,
73     DATASTREAM_BOOLEAN
74   } ;
75
76   struct ServicesDataStreamParameter
77   {
78     DataStreamType Parametertype; /*!<Type of the parameter.*/
79     string Parametername;         /*!<Name of the parameter.*/
80     DataStreamDependency Parameterdependency; /*!<Temporal or iterative dependency.*/
81   } ;
82
83 /*! 
84 The list of the parameters of service.
85 */
86
87   typedef sequence<ServicesParameter> ListOfServicesParameter;
88   typedef sequence<ServicesDataStreamParameter> ListOfServicesDataStreamParameter;
89
90 /*! 
91 This struct contains fields completely defining each service.
92 */
93
94   struct Service
95   {
96     string                            ServiceName; /*!<Name of the service.*/
97     ListOfServicesParameter           ServiceinParameter; /*!< List of input parameters of the services.*/
98     ListOfServicesParameter           ServiceoutParameter; /*!< List of output parameters of the services.*/
99     ListOfServicesDataStreamParameter ServiceinDataStreamParameter; /*!< List of input parameters of the services.*/
100     ListOfServicesDataStreamParameter ServiceoutDataStreamParameter; /*!< List of output parameters of the services.*/
101     boolean                           Servicebydefault; /*!<True if the service is taken with its default fields.*/
102     boolean                           TypeOfNode; /*!<True is the service is a factory node. Otherwise, it's a compute node.*/
103   } ;
104 /*! 
105 List of services of the interface.
106 */
107   typedef sequence<Service> ListOfInterfaceService;
108 /*! 
109 List of services.
110 */
111   typedef sequence<string> ListOfServices ;
112 /*! 
113 This struct contains fields defining each interface.
114 */
115   struct DefinitionInterface
116   {
117     string                 interfacename ; /*!<Name of the interface.*/
118     ListOfInterfaceService interfaceservicelist ; /*!<List of services of the interface.*/
119   } ;
120 /*! 
121 List of interface definitions.
122 */
123   typedef sequence<DefinitionInterface> ListOfDefInterface ;
124 /*! 
125 List of names of interfaces.
126 */
127   typedef sequence<string> ListOfInterfaces ;
128
129 /*!
130 PathPrefix : association of a machine name and
131 a path to a component
132 */
133   struct PathPrefix {
134     string             machine;
135     string             path;
136   };
137
138 /*! 
139 List of path prefixes
140 */
141   typedef sequence<PathPrefix> PathPrefixes;
142
143 /*!
144 Description of a component
145 */
146   struct Component
147   {
148     ComponentType      type;
149     string             name;
150     string             username;
151     boolean            multistudy;
152     boolean            implementationType;
153     string             icon;
154     string             constraint;
155     ListOfDefInterface interfaces;
156     PathPrefixes       paths;
157   };
158
159 /*! 
160 List of names of components.
161 */
162   typedef sequence<string> ListOfComponents ;
163 /*! 
164 List of names of computers.
165 */
166   typedef sequence<string> ListOfComputers ;
167 /*! 
168 This struct contains GUI elements used for representation of the module in %IAPP component.
169 */
170   struct IAPP_Affich
171   {
172     string modulename; /*!<Name of the module.*/
173     string moduleusername; /*!<UserName of the module.*/
174     string moduleicone; /*!<Icone representing the module.*/
175   };
176 /*!
177 List of pair GUI elements (component name, component icone)
178  used for representation of the module in %IAPP component.
179 */
180   typedef sequence<IAPP_Affich> ListOfIAPP_Affich ;
181
182 /*! 
183  This exception is raised when a %component, a %service or a % pathPrefix is not found.
184 */
185   exception NotFound
186   {
187     string what ; /*!<Indicates if it's a %component, a %service or a % pathPrefix.*/
188   } ;
189
190   /*!
191    This interface provides the common funcionality information of corresponding component.
192    Information is loaded from specific xml files.
193   */
194   interface Acomponent
195   {
196     // GetInterfaceList : operation to get a list of the interfaces name of
197     //                    a component
198   /*!
199    Gets the list of names of interfaces of the component
200     \return a list of interfaces of the component 
201   */
202     ListOfInterfaces GetInterfaceList() ;
203
204     // GetInterface : operation to get one interface of a component
205   
206   /*! 
207     Gets a definite interface of the component
208     \note <BR>If the specified interface doesn't exist, Notfound exception is thrown
209     \param interfacename  Name of the interface 
210     \return Required interface
211   */
212     DefinitionInterface GetInterface(in string interfacename) raises(NotFound);
213
214     // GetServiceList : operation to get a list of the services name of
215     //                  an interface of a component
216  /*! 
217    Gets the list of names of services of a definite interface belonging to the component.
218    \note <BR>If the specified interface doesn't exist, Notfound exception is thrown.
219    \param interfacename Name of the interface 
220    \return List of services of the required interface
221  */
222     ListOfServices GetServiceList(in string interfacename) raises(NotFound);
223
224     
225     // GetService : operation to get one service of an interface of a component
226   
227  /*! 
228    Gets a definite service of an interface of the component.
229    \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
230    \param interfacename Name of the interface
231    \param servicename Name of the service
232    \return Required service
233  */
234
235     Service GetService(in string interfacename, 
236                        in string servicename) raises(NotFound);
237
238     // GetDefaultService : operation to get the default service
239     //                     of an interface of a component
240 /*! 
241    Gets the default service of an interface of the component.
242    \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
243    \param interfacename Name of the interface
244    \return Required service
245  */
246
247     Service GetDefaultService(in string interfacename) raises(NotFound);
248
249     // GetPathPrefix : operation to get the PathPrefix of a computer
250  /*!  
251    Gets the prefix path of the computer containing the %component.
252    \note <BR>If the required computer doesn't exist, Notfound exception is thrown
253    \param machinename Name of the machine 
254    \return Prefix path
255  */
256
257     string GetPathPrefix(in string machinename) raises(NotFound);
258
259 /*! 
260     Get the constraint affected to the component 
261     (to be resolved by LifeCycle for the computer choice)
262 */
263     readonly attribute string constraint ;
264
265 /*! 
266 Get the name of the component
267 */
268     readonly attribute string componentname;
269
270 /*!
271 Get the user name of the component
272 */
273     readonly attribute string componentusername;
274
275 /*! 
276 Ask whether the component is multistudy or not
277 */
278     readonly attribute boolean multistudy;
279
280 /*! 
281 Ask the type of the component
282 */
283     readonly attribute ComponentType component_type ;
284
285 /*! 
286 Gets the icone of the component (for IAPP)
287 */
288     readonly attribute string component_icone;
289
290 /*! 
291 Gets the implementation type of the component : C++ or Python (for IAPP)
292 */
293     readonly attribute boolean implementation_type;
294   } ;
295
296 /*! \brief %Module catalog interface
297
298 This interface is used for creation of the module catalog in %SALOME application.
299 */
300   interface ModuleCatalog
301   {
302     void ping();
303
304 /*! 
305  Gets a list of names of computers of the catalog 
306 */   
307     ListOfComputers GetComputerList();
308
309 /*! 
310 Gets the %PathPrefix of a computer
311 */
312     string GetPathPrefix(in string machinename) raises(NotFound);
313 /*! 
314  Gets a list of names of components of the catalog 
315 */   
316     ListOfComponents GetComponentList();
317 /*! 
318 Gets a list of pair GUI elements (component name, component icone) 
319 used for representation of the module in %IAPP component.
320 */
321
322     ListOfIAPP_Affich GetComponentIconeList();
323 /*! 
324 Gets a list of names of components of a particular type, which belong to this catalog.
325 */  
326     // GetComponentList : operation to get a list of the components name of
327     //                    a particular type of the catalog   
328     ListOfComponents GetTypedComponentList(in ComponentType _component_type);
329
330 /*! 
331 Gets one component of the catalog.
332 */
333     Acomponent GetComponent(in string componentname) raises(NotFound);
334
335 /*! 
336 Gets the description of a component of the catalog.
337 */
338     Component GetComponentInfo(in string componentName) raises(NotFound);
339
340 /*!
341 Reads a xml file and imports new components from this file.
342 New components replace existing components with the same name.
343 */
344     void ImportXmlCatalogFile(in string filename) raises(NotFound);
345
346     void shutdown();
347   } ;
348 };