Back to index

salome-kernel  6.5.0
ParallelDSC_i.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //  File   : ParallelDSC_i.hxx
00021 //  Author : André RIBES (EDF)
00022 //  Module : KERNEL
00023 //
00024 #ifndef _PARALLEL_DSC_COMPONENT_I_HXX_
00025 #define _PARALLEL_DSC_COMPONENT_I_HXX_
00026 
00027 #include <iostream>
00028 #include <map>
00029 
00030 #include "DSC_interface.hxx"
00031 #include "SALOME_ParallelComponent_i.hxx"
00032 
00033 #include "SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.hxx"
00034 #include "SALOME_PortsPaCO.hxx"
00035 
00036 class Engines_ParallelDSC_i: 
00037   public virtual Engines_Parallel_Component_i,
00038   public virtual Engines::Parallel_DSC_serv,
00039   public virtual Engines_DSC_interface 
00040 {
00041 public:
00042   Engines_ParallelDSC_i(CORBA::ORB_ptr orb, 
00043                         char * ior,
00044                         int rank,
00045                         PortableServer::POA_ptr poa,
00046                         PortableServer::ObjectId * contId,
00047                         const char *instanceName,
00048                         const char *interfaceName,
00049                         bool notif = false);
00050 
00051   virtual ~Engines_ParallelDSC_i();
00052 
00053   
00057   virtual void add_provides_port(Ports::Port_ptr ref, 
00058                                  const char* provides_port_name,
00059                                  Ports::PortProperties_ptr port_prop) 
00060     throw (Engines::DSC::PortAlreadyDefined,
00061            Engines::DSC::NilPort,
00062            Engines::DSC::BadProperty) {
00063       Engines_DSC_interface::add_provides_port(ref, 
00064                                                provides_port_name,
00065                                                port_prop);
00066     }
00067 
00071   virtual void add_uses_port(const char* repository_id, 
00072                              const char* uses_port_name,
00073                              Ports::PortProperties_ptr port_prop)
00074     throw (Engines::DSC::PortAlreadyDefined,
00075            Engines::DSC::BadProperty) {
00076       Engines_DSC_interface::add_uses_port(repository_id, 
00077                                            uses_port_name,
00078                                            port_prop);
00079     }
00080 
00084   virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
00085                                             const CORBA::Boolean connection_error) 
00086     throw (Engines::DSC::PortNotDefined,
00087            Engines::DSC::PortNotConnected) {
00088       return Engines_DSC_interface::get_provides_port(provides_port_name,
00089                                                       connection_error);
00090     }
00091 
00095   virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
00096     throw (Engines::DSC::PortNotDefined,
00097            Engines::DSC::PortNotConnected) {
00098       return Engines_DSC_interface::get_uses_port(uses_port_name);
00099     }
00100 
00104   virtual void connect_provides_port(const char* provides_port_name)
00105     throw (Engines::DSC::PortNotDefined) {
00106       Engines_DSC_interface::connect_provides_port(provides_port_name);
00107     }
00108 
00112   virtual void connect_uses_port(const char* uses_port_name,
00113                                  Ports::Port_ptr provides_port_ref) 
00114   throw (Engines::DSC::PortNotDefined,
00115          Engines::DSC::BadPortType,
00116          Engines::DSC::NilPort) {
00117     Engines_DSC_interface::connect_uses_port(uses_port_name,
00118                                              provides_port_ref);
00119   }
00120 
00124   virtual CORBA::Boolean is_connected(const char* port_name)
00125     throw (Engines::DSC::PortNotDefined) {
00126       return Engines_DSC_interface::is_connected(port_name);
00127     }
00128 
00132   virtual void disconnect_provides_port(const char* provides_port_name,
00133                                         const Engines::DSC::Message message)
00134     throw (Engines::DSC::PortNotDefined,
00135            Engines::DSC::PortNotConnected) {
00136       Engines_DSC_interface::disconnect_provides_port(provides_port_name,
00137                                                       message);
00138     }
00139 
00143   virtual void disconnect_uses_port(const char* uses_port_name,
00144                                     Ports::Port_ptr provides_port_ref,
00145                                     const Engines::DSC::Message message)
00146     throw (Engines::DSC::PortNotDefined,
00147            Engines::DSC::PortNotConnected,
00148            Engines::DSC::BadPortReference) {
00149       Engines_DSC_interface::disconnect_uses_port(uses_port_name,
00150                                                   provides_port_ref,
00151                                                   message);
00152     }
00153 
00154   virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
00155     throw (Engines::DSC::PortNotDefined) {
00156       return Engines_DSC_interface::get_port_properties(port_name);
00157     }
00158   
00167   virtual void set_paco_proxy(CORBA::Object_ptr ref, 
00168                               const char* provides_port_name,
00169                               Ports::PortProperties_ptr port_prop);
00170 
00179   virtual CORBA::Boolean add_parallel_provides_proxy_port(const CORBA::Object_ptr ref, 
00180                                                           const char * provides_port_name,
00181                                                           Ports::PortProperties_ptr port_prop);
00182 
00190   virtual CORBA::Boolean add_parallel_provides_proxy_wait(const char * provides_port_name);
00191 
00200   virtual CORBA::Boolean add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref, 
00201                                                          const char* provides_port_name);
00202 
00210   virtual const char * get_proxy(const char* provides_port_name);
00211 
00212 };
00213 
00214 #endif