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 // 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 */
175 CEXE /* component to be loaded by a container which executable is given in the catalog */
179 Description of a component
187 ImplType implementationType;
191 ListOfDefInterface interfaces;
196 List of names of components.
198 typedef sequence<string> ListOfComponents ;
200 List of names of computers.
202 typedef sequence<string> ListOfComputers ;
204 This struct contains GUI elements used for representation of the module in %IAPP component.
208 string modulename; /*!<Name of the module.*/
209 string moduleusername; /*!<UserName of the module.*/
210 string moduleicone; /*!<Icone representing the module.*/
211 string moduleversion; /*!<Version of the module.*/
212 string modulecomment; /*!<Comment to the module.*/
215 List of pair GUI elements (component name, component icone)
216 used for representation of the module in %IAPP component.
218 typedef sequence<IAPP_Affich> ListOfIAPP_Affich ;
221 This exception is raised when a %component, a %service or a % pathPrefix is not found.
225 string what ; /*!<Indicates if it's a %component, a %service or a % pathPrefix.*/
229 This interface provides the common funcionality information of corresponding component.
230 Information is loaded from specific xml files.
234 // GetInterfaceList : operation to get a list of the interfaces name of
237 Gets the list of names of interfaces of the component
238 \return a list of interfaces of the component
240 ListOfInterfaces GetInterfaceList() ;
242 // GetInterface : operation to get one interface of a component
245 Gets a definite interface of the component
246 \note <BR>If the specified interface doesn't exist, Notfound exception is thrown
247 \param interfacename Name of the interface
248 \return Required interface
250 DefinitionInterface GetInterface(in string interfacename) raises(NotFound);
252 // GetServiceList : operation to get a list of the services name of
253 // an interface of a component
255 Gets the list of names of services of a definite interface belonging to the component.
256 \note <BR>If the specified interface doesn't exist, Notfound exception is thrown.
257 \param interfacename Name of the interface
258 \return List of services of the required interface
260 ListOfServices GetServiceList(in string interfacename) raises(NotFound);
263 // GetService : operation to get one service of an interface of a component
266 Gets a definite service of an interface of the component.
267 \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
268 \param interfacename Name of the interface
269 \param servicename Name of the service
270 \return Required service
273 Service GetService(in string interfacename,
274 in string servicename) raises(NotFound);
276 // GetDefaultService : operation to get the default service
277 // of an interface of a component
279 Gets the default service of an interface of the component.
280 \note <BR>If the required service or the specified interface don't exist, Notfound exception is thrown.
281 \param interfacename Name of the interface
282 \return Required service
285 Service GetDefaultService(in string interfacename) raises(NotFound);
287 // GetPathPrefix : operation to get the PathPrefix of a computer
289 Gets the prefix path of the computer containing the %component.
290 \note <BR>If the required computer doesn't exist, Notfound exception is thrown
291 \param machinename Name of the machine
295 string GetPathPrefix(in string machinename) raises(NotFound);
298 Get the constraint affected to the component
299 (to be resolved by LifeCycle for the computer choice)
301 readonly attribute string constraint ;
304 Get the name of the component
306 readonly attribute string componentname;
309 Get the user name of the component
311 readonly attribute string componentusername;
314 Ask whether the component is multistudy or not
316 readonly attribute boolean multistudy;
319 Ask the type of the component
321 readonly attribute ComponentType component_type ;
324 Gets the icone of the component (for IAPP)
326 readonly attribute string component_icone;
329 Gets the implementation type of the component : C++ (dyn lib), Python (module) or executable
331 readonly attribute ImplType implementation_type;
333 Gets the implementation name of the component : name of the dyn lib or the python module or the executable
334 if the default naming scheme is not convenient.
336 readonly attribute string implementation_name;
339 /*! \brief %Module catalog interface
341 This interface is used for creation of the module catalog in %SALOME application.
343 interface ModuleCatalog
348 Returns the PID of the server
353 Shutdown the ModuleCatalog process.
355 oneway void ShutdownWithExit();
358 * Get the types of the catalog
360 ListOfTypeDefinition GetTypes();
363 Gets a list of names of computers of the catalog
365 ListOfComputers GetComputerList();
368 Gets the %PathPrefix of a computer
370 string GetPathPrefix(in string machinename) raises(NotFound);
372 Gets a list of names of components of the catalog
374 ListOfComponents GetComponentList();
376 Gets a list of pair GUI elements (component name, component icone)
377 used for representation of the module in %IAPP component.
380 ListOfIAPP_Affich GetComponentIconeList();
382 Gets a list of names of components of a particular type, which belong to this catalog.
384 // GetComponentList : operation to get a list of the components name of
385 // a particular type of the catalog
386 ListOfComponents GetTypedComponentList(in ComponentType _component_type);
389 Gets one component of the catalog.
391 Acomponent GetComponent(in string componentname) raises(NotFound);
394 Gets the description of a component of the catalog.
396 ComponentDef GetComponentInfo(in string componentName) raises(NotFound);
399 Reads a xml file and imports new components from this file.
400 New components replace existing components with the same name.
402 void ImportXmlCatalogFile(in string filename) raises(NotFound);