1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SALOME_ModuleCatalog.idl
23 // Author : Estelle Deville
26 /*! \file SALOME_ModuleCatalog.idl This file conatins a set of interfaces used for
27 creation of the catalog of components in %SALOME application
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.
35 module SALOME_ModuleCatalog
39 This enumeration contains a current set of definitions of the components integrated
40 into %SALOME application.
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 */
52 This struct contains fields defining the parameter of the service.
55 struct ServicesParameter
57 string Parametertype; /*!<Type of the parameter.*/
58 string Parametername; /*!<Name of the parameter.*/
61 enum DataStreamDependency {
67 struct ServicesDataStreamParameter
69 string Parametertype; /*!<Type of the parameter.*/
70 string Parametername; /*!<Name of the parameter.*/
71 DataStreamDependency Parameterdependency; /*!<Temporal or iterative dependency.*/
75 The list of the parameters of service.
78 typedef sequence<ServicesParameter> ListOfServicesParameter;
79 typedef sequence<ServicesDataStreamParameter> ListOfServicesDataStreamParameter;
81 typedef sequence<string> ListOfString;
94 struct MemberDefinition
96 string name; /*! Name of the member */
97 string type; /*! Type of the member */
99 typedef sequence<MemberDefinition> ListOfMemberDefinition;
101 * Struct to get the definition of types used in Salome catalogs
103 struct TypeDefinition
105 string name; /*! Name of the type */
106 TypeKind kind; /*! Kind of the type.*/
107 string id; /*! id (if needed) */
108 string content; /*! Content type (if needed) */
109 ListOfString bases; /*! Content type (if needed) */
110 ListOfMemberDefinition members; /*! Members types (if needed) */
113 typedef sequence<TypeDefinition> ListOfTypeDefinition;
116 This struct contains fields completely defining each service.
121 string ServiceName; /*!<Name of the service.*/
122 ListOfServicesParameter ServiceinParameter; /*!< List of input parameters of the services.*/
123 ListOfServicesParameter ServiceoutParameter; /*!< List of output parameters of the services.*/
124 ListOfServicesDataStreamParameter ServiceinDataStreamParameter; /*!< List of input parameters of the services.*/
125 ListOfServicesDataStreamParameter ServiceoutDataStreamParameter; /*!< List of output parameters of the services.*/
126 boolean Servicebydefault; /*!<True if the service is taken with its default fields.*/
127 boolean TypeOfNode; /*!<True is the service is a factory node. Otherwise, it's a compute node.*/
130 List of services of the interface.
132 typedef sequence<Service> ListOfInterfaceService;
136 typedef sequence<string> ListOfServices ;
138 This struct contains fields defining each interface.
140 struct DefinitionInterface
142 string interfacename ; /*!<Name of the interface.*/
143 ListOfInterfaceService interfaceservicelist ; /*!<List of services of the interface.*/
146 List of interface definitions.
148 typedef sequence<DefinitionInterface> ListOfDefInterface ;
150 List of names of interfaces.
152 typedef sequence<string> ListOfInterfaces ;
155 PathPrefix : association of a machine name and
156 a path to a component
164 List of path prefixes
166 typedef sequence<PathPrefix> PathPrefixes;
172 SO, /* component implemented as a dynamic library loadable with dlopen */
173 PY, /* component implemented as a python module loadable with import */
174 EXE /* component implemented as an executable */
178 Description of a component
186 ImplType implementationType;
190 ListOfDefInterface interfaces;
195 List of names of components.
197 typedef sequence<string> ListOfComponents ;
199 List of names of computers.
201 typedef sequence<string> ListOfComputers ;
203 This struct contains GUI elements used for representation of the module in %IAPP component.
207 string modulename; /*!<Name of the module.*/
208 string moduleusername; /*!<UserName of the module.*/
209 string moduleicone; /*!<Icone representing the module.*/
210 string moduleversion; /*!<Version of the module.*/
211 string modulecomment; /*!<Comment to the module.*/
214 List of pair GUI elements (component name, component icone)
215 used for representation of the module in %IAPP component.
217 typedef sequence<IAPP_Affich> ListOfIAPP_Affich ;
220 This exception is raised when a %component, a %service or a % pathPrefix is not found.
224 string what ; /*!<Indicates if it's a %component, a %service or a % pathPrefix.*/
228 This interface provides the common funcionality information of corresponding component.
229 Information is loaded from specific xml files.
233 // GetInterfaceList : operation to get a list of the interfaces name of
236 Gets the list of names of interfaces of the component
237 \return a list of interfaces of the component
239 ListOfInterfaces GetInterfaceList() ;
241 // GetInterface : operation to get one interface of a component
244 Gets a definite interface of the component
245 \note <BR>If the specified interface doesn't exist, Notfound exception is thrown
246 \param interfacename Name of the interface
247 \return Required interface
249 DefinitionInterface GetInterface(in string interfacename) raises(NotFound);
251 // GetServiceList : operation to get a list of the services name of
252 // an interface of a component
254 Gets the list of names of services of a definite interface belonging to the component.
255 \note <BR>If the specified interface doesn't exist, Notfound exception is thrown.
256 \param interfacename Name of the interface
257 \return List of services of the required interface
259 ListOfServices GetServiceList(in string interfacename) raises(NotFound);
262 // GetService : operation to get one service of an interface of a component
265 Gets a definite service of an interface of the component.
266 \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
267 \param interfacename Name of the interface
268 \param servicename Name of the service
269 \return Required service
272 Service GetService(in string interfacename,
273 in string servicename) raises(NotFound);
275 // GetDefaultService : operation to get the default service
276 // of an interface of a component
278 Gets the default service of an interface of the component.
279 \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
280 \param interfacename Name of the interface
281 \return Required service
284 Service GetDefaultService(in string interfacename) raises(NotFound);
286 // GetPathPrefix : operation to get the PathPrefix of a computer
288 Gets the prefix path of the computer containing the %component.
289 \note <BR>If the required computer doesn't exist, Notfound exception is thrown
290 \param machinename Name of the machine
294 string GetPathPrefix(in string machinename) raises(NotFound);
297 Get the constraint affected to the component
298 (to be resolved by LifeCycle for the computer choice)
300 readonly attribute string constraint ;
303 Get the name of the component
305 readonly attribute string componentname;
308 Get the user name of the component
310 readonly attribute string componentusername;
313 Ask whether the component is multistudy or not
315 readonly attribute boolean multistudy;
318 Ask the type of the component
320 readonly attribute ComponentType component_type ;
323 Gets the icone of the component (for IAPP)
325 readonly attribute string component_icone;
328 Gets the implementation type of the component : C++ (dyn lib), Python (module) or executable
330 readonly attribute ImplType implementation_type;
332 Gets the implementation name of the component : name of the dyn lib or the python module or the executable
333 if the default naming scheme is not convenient.
335 readonly attribute string implementation_name;
338 /*! \brief %Module catalog interface
340 This interface is used for creation of the module catalog in %SALOME application.
342 interface ModuleCatalog
347 Returns the PID of the server
352 Shutdown the ModuleCatalog process.
354 oneway void ShutdownWithExit();
357 * Get the types of the catalog
359 ListOfTypeDefinition GetTypes();
362 Gets a list of names of computers of the catalog
364 ListOfComputers GetComputerList();
367 Gets the %PathPrefix of a computer
369 string GetPathPrefix(in string machinename) raises(NotFound);
371 Gets a list of names of components of the catalog
373 ListOfComponents GetComponentList();
375 Gets a list of pair GUI elements (component name, component icone)
376 used for representation of the module in %IAPP component.
379 ListOfIAPP_Affich GetComponentIconeList();
381 Gets a list of names of components of a particular type, which belong to this catalog.
383 // GetComponentList : operation to get a list of the components name of
384 // a particular type of the catalog
385 ListOfComponents GetTypedComponentList(in ComponentType _component_type);
388 Gets one component of the catalog.
390 Acomponent GetComponent(in string componentname) raises(NotFound);
393 Gets the description of a component of the catalog.
395 ComponentDef GetComponentInfo(in string componentName) raises(NotFound);
398 Reads a xml file and imports new components from this file.
399 New components replace existing components with the same name.
401 void ImportXmlCatalogFile(in string filename) raises(NotFound);