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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SALOME_Component.idl
23 // Author : Paul RASCLE, EDF
24 // $Header: /dn05/salome/CVS/SALOME_ROOT/idl/SALOME_Component.idl
26 #ifndef _SALOME_COMPONENT_IDL_
27 #define _SALOME_COMPONENT_IDL_
30 This is a package of interfaces used for connecting new components to %SALOME application. It also contains a set of interfaces used
31 for management of %MED component in %SALOME application.
36 General Key Value Structure to set or get properties, for component
44 typedef sequence<KeyValuePair> FieldsDict;
48 /*! \brief Interface of the %Container
50 This interface defines the process of loading and registration
51 of new components in %SALOME application
56 Initializes the %container with a definite name.
57 \param ContainerName Name of the container
58 \return an initialized container
60 Container start_impl( in string ContainerName ) ;
63 Loads into the container a new component, registers it and starts it's CORBA servant.
64 \param nameToRegister Name of the component which will be registered in Registry (or Name Service)
65 \param componentName Name of the constructed library of the %component
66 \return a loaded component
68 Component load_impl(in string nameToRegister, in string componentName);
71 Stops the component servant, and deletes all related objects
72 \param component_i Component to be removed
74 void remove_impl(in Component component_i);
77 Discharges all components from the container.
79 void finalize_removal() ;
81 Determines whether the server has been loaded or not.
86 Name of the %container
88 readonly attribute string name ;
90 Name of the machine containing this container (location of the container).
92 readonly attribute string machineName ;
94 Returns True if the %container has been killed
98 Returns the hostname of the container
100 string getHostName();
102 Returns the PID of the container
106 /*! \brief Interface of the %component
108 This interface is used for interaction between the %container and the %component and between
109 the components inside the container.
114 The name of the instance of the %Component
116 readonly attribute string instanceName ;
118 The name of the interface of the %Component
120 readonly attribute string interfaceName ;
122 Determines whether the server has already been loaded or not.
126 Deactivates the %Component.
130 Returns the container that the %Component refers to.
132 Container GetContainerRef() ;
134 Gives a sequence of (key=string,value=any) to the component.
135 Base class component stores the sequence in a map.
136 The map is cleared before.
137 This map is for use by derived classes.
139 void setProperties(in FieldsDict dico);
141 returns a previously stored map (key=string,value=any) as a sequence.
142 See setProperties(in FieldsDict dico).
144 FieldsDict getProperties();
146 This method is used by the %SUPERVISOR component. It sets the names of the graph and of the node.
147 \param aGraphName Name of graph
148 \param aNodeName Name of node
150 void Names( in string aGraphName , in string aNodeName ) ;
152 Returns True if the %Component has been killed.
154 boolean Kill_impl() ;
156 Returns True if the activity of the %Component has been stopped. (It's action can't be resumed)
158 boolean Stop_impl() ;
160 Returns True if the activity of the %Component has been suspended. (It's action can be resumed)
162 boolean Suspend_impl() ;
164 Returns True if the activity of the %Component has been resumed.
166 boolean Resume_impl() ;
168 Returns the Cpu used (long does not run with python !...)
170 long CpuUsed_impl() ;