SALOME documentation central

idl/DSC_Engines.idl

Go to the documentation of this file.
00001 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 //  This library is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU Lesser General Public
00008 //  License as published by the Free Software Foundation; either
00009 //  version 2.1 of the License.
00010 //
00011 //  This library is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 //  Lesser General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU Lesser General Public
00017 //  License along with this library; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File   : DSC_Engines.idl
00023 //  Author : Andre RIBES, EDF
00024 //  $Header:
00025 //
00026 #ifndef _DSC_ENGINES_IDL_
00027 #define _DSC_ENGINES_IDL_
00028 
00029 #include "SALOME_Component.idl"
00030 #include "SALOME_Ports.idl"
00031 
00035 module Engines {
00036 
00060   interface DSC : Engines::Component {
00061 
00062 /*--------------------------------------------------------------------------------------------*/
00063 /*-------------------------------------- Types Part ------------------------------------------*/
00064 
00066 
00072     typedef sequence<Ports::Port> uses_port;
00073 
00075 
00078     enum Message {AddingConnection,
00079                   RemovingConnection, 
00080                   ApplicationError};
00081     
00083     exception PortNotDefined {};
00084     
00086     exception PortAlreadyDefined {};
00087     
00089     exception PortNotConnected {};
00090 
00092 
00096     exception BadPortType {
00097       string expected;
00098       string received;
00099     };
00100 
00102     exception NilPort {};
00103 
00105     exception BadPortReference {};
00106 
00108     exception BadProperty {};
00109 
00110 
00111 /*--------------------------------------------------------------------------------------------*/
00112 /*-------------------------------------- Operation Part --------------------------------------*/
00113 
00115 
00129     void add_provides_port(in Ports::Port ref, 
00130                   in string provides_port_name,
00131                   in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
00132                                               NilPort,
00133                                               BadProperty);
00134 
00136 
00150     void add_uses_port(in string repository_id, 
00151                  in string uses_port_name,
00152                  in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
00153                                           BadProperty);
00154 
00156 
00175     Ports::Port get_provides_port(in string provides_port_name,
00176                       in boolean connection_error) raises(PortNotDefined,
00177                                               PortNotConnected,
00178                                               BadPortType);
00179 
00181 
00199     uses_port get_uses_port(in string uses_port_name) raises(PortNotDefined, 
00200                                         PortNotConnected,
00201                                         BadPortType);
00202 
00203 
00205 
00213     void connect_provides_port(in string provides_port_name) raises(PortNotDefined); 
00214     
00216 
00225     void connect_uses_port(in string uses_port_name, 
00226                   in Ports::Port provides_port_ref) raises(PortNotDefined, 
00227                                             BadPortType, 
00228                                             NilPort);
00229 
00231 
00239     boolean is_connected(in string port_name) raises(PortNotDefined);
00240 
00242 
00250     void disconnect_provides_port(in string provides_port_name, 
00251                       in Engines::DSC::Message message) raises(PortNotDefined,
00252                                                 PortNotConnected);
00253 
00255 
00265     void disconnect_uses_port(in string uses_port_name, 
00266                      in Ports::Port provides_port_ref, 
00267                      in Engines::DSC::Message message) raises(PortNotDefined,
00268                                                PortNotConnected,
00269                                                BadPortReference);
00271 
00278     Ports::PortProperties get_port_properties(in string port_name) raises(PortNotDefined);
00279 
00280   };
00281 
00286   interface ConnectionManager {
00287    
00289     exception BadId {};
00290 
00292     typedef short connectionId;
00293 
00295 
00310     connectionId connect(in Engines::DSC uses_component, 
00311                 in string uses_port_name, 
00312                 in Engines::DSC provides_component, 
00313                 in string provides_port_name) raises(Engines::DSC::PortNotDefined, 
00314                                          Engines::DSC::BadPortType, 
00315                                          Engines::DSC::NilPort);
00316 
00318 
00326     void disconnect(in connectionId id,
00327               in Engines::DSC::Message message) raises(Engines::ConnectionManager::BadId,
00328                                         Engines::DSC::PortNotDefined,
00329                                         Engines::DSC::PortNotConnected,
00330                                         Engines::DSC::BadPortReference);
00331 
00333     oneway void ShutdownWithExit();
00334 
00336     long getPID();
00337   };
00338 
00339 /*--------------------------------------------------------------------------------------------*/
00340   
00347   interface Superv_Component : Engines::DSC {
00348     
00350 
00357     boolean init_service(in string service_name);
00358   };
00359 };
00360 
00361 #endif