Back to index

salome-kernel  6.5.0
DSC_Engines.idl
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 
00023 //  File   : DSC_Engines.idl
00024 //  Author : Andre RIBES, EDF
00025 //  $Header:
00026 //
00027 #ifndef _DSC_ENGINES_IDL_
00028 #define _DSC_ENGINES_IDL_
00029 
00030 #include "SALOME_Component.idl"
00031 #include "SALOME_Ports.idl"
00032 
00036 module Engines {
00037 
00061   interface DSC : Engines::EngineComponent {
00062 
00063 /*--------------------------------------------------------------------------------------------*/
00064 /*-------------------------------------- Types Part ------------------------------------------*/
00065 
00067 
00073     typedef sequence<Ports::Port> uses_port;
00074 
00076 
00079     enum Message {AddingConnection,
00080                   RemovingConnection, 
00081                   ApplicationError};
00082     
00084     exception PortNotDefined {};
00085     
00087     exception PortAlreadyDefined {};
00088     
00090     exception PortNotConnected {};
00091 
00093 
00097     exception BadPortType {
00098       string expected;
00099       string received;
00100     };
00101 
00103     exception NilPort {};
00104 
00106     exception BadPortReference {};
00107 
00109     exception BadProperty {};
00110 
00111 
00112 /*--------------------------------------------------------------------------------------------*/
00113 /*-------------------------------------- Operation Part --------------------------------------*/
00114 
00116 
00130     void add_provides_port(in Ports::Port ref, 
00131                         in string provides_port_name,
00132                         in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
00133                                                               NilPort,
00134                                                               BadProperty);
00135 
00137 
00151     void add_uses_port(in string repository_id, 
00152                      in string uses_port_name,
00153                      in Ports::PortProperties port_prop) raises(PortAlreadyDefined,
00154                                                           BadProperty);
00155 
00157 
00176     Ports::Port get_provides_port(in string provides_port_name,
00177                               in boolean connection_error) raises(PortNotDefined,
00178                                                               PortNotConnected,
00179                                                               BadPortType);
00180 
00182 
00200     uses_port get_uses_port(in string uses_port_name) raises(PortNotDefined, 
00201                                                       PortNotConnected,
00202                                                       BadPortType);
00203 
00204 
00206 
00214     void connect_provides_port(in string provides_port_name) raises(PortNotDefined); 
00215     
00217 
00226     void connect_uses_port(in string uses_port_name, 
00227                         in Ports::Port provides_port_ref) raises(PortNotDefined, 
00228                                                             BadPortType, 
00229                                                             NilPort);
00230 
00232 
00240     boolean is_connected(in string port_name) raises(PortNotDefined);
00241 
00243 
00251     void disconnect_provides_port(in string provides_port_name, 
00252                               in Engines::DSC::Message message) raises(PortNotDefined,
00253                                                                   PortNotConnected);
00254 
00256 
00266     void disconnect_uses_port(in string uses_port_name, 
00267                            in Ports::Port provides_port_ref, 
00268                            in Engines::DSC::Message message) raises(PortNotDefined,
00269                                                                PortNotConnected,
00270                                                                BadPortReference);
00272 
00279     Ports::PortProperties get_port_properties(in string port_name) raises(PortNotDefined);
00280 
00281   };
00282 
00287   interface ConnectionManager {
00288    
00290     exception BadId {};
00291 
00293     typedef short connectionId;
00294 
00296 
00311     connectionId connect(in Engines::DSC uses_component, 
00312                       in string uses_port_name, 
00313                       in Engines::DSC provides_component, 
00314                       in string provides_port_name) raises(Engines::DSC::PortNotDefined, 
00315                                                        Engines::DSC::BadPortType, 
00316                                                        Engines::DSC::NilPort);
00317 
00319 
00327     void disconnect(in connectionId id,
00328                   in Engines::DSC::Message message) raises(Engines::ConnectionManager::BadId,
00329                                                       Engines::DSC::PortNotDefined,
00330                                                       Engines::DSC::PortNotConnected,
00331                                                       Engines::DSC::BadPortReference);
00332 
00334     oneway void ShutdownWithExit();
00335 
00337     long getPID();
00338   };
00339 
00340 /*--------------------------------------------------------------------------------------------*/
00341   
00348   interface Superv_Component : Engines::DSC {
00349     
00351 
00358     boolean init_service(in string service_name);
00359   };
00360 };
00361 
00362 #endif