Version: 9.12.0
ParallelDSC_i.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 // File : ParallelDSC_i.hxx
21 // Author : André RIBES (EDF)
22 // Module : KERNEL
23 //
24 #ifndef _PARALLEL_DSC_COMPONENT_I_HXX_
25 #define _PARALLEL_DSC_COMPONENT_I_HXX_
26 
27 #include <iostream>
28 #include <map>
29 
30 #include "DSC_interface.hxx"
32 
33 #include "SALOME_PACOExtensionPaCO_Engines_Parallel_DSC_server.hxx"
34 #include "SALOME_PortsPaCO.hxx"
35 
37  public virtual Engines_Parallel_Component_i,
38  public virtual Engines::Parallel_DSC_serv,
39  public virtual Engines_DSC_interface
40 {
41 public:
42  Engines_ParallelDSC_i(CORBA::ORB_ptr orb,
43  char * ior,
44  int rank,
45  PortableServer::POA_ptr poa,
46  PortableServer::ObjectId * contId,
47  const char *instanceName,
48  const char *interfaceName,
49  bool notif = false);
50 
51  virtual ~Engines_ParallelDSC_i();
52 
53 
57  virtual void add_provides_port(Ports::Port_ptr ref,
58  const char* provides_port_name,
59  Ports::PortProperties_ptr port_prop)
60  {
62  provides_port_name,
63  port_prop);
64  }
65 
69  virtual void add_uses_port(const char* repository_id,
70  const char* uses_port_name,
71  Ports::PortProperties_ptr port_prop)
72  {
74  uses_port_name,
75  port_prop);
76  }
77 
81  virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
82  const CORBA::Boolean connection_error)
83  {
84  return Engines_DSC_interface::get_provides_port(provides_port_name,
85  connection_error);
86  }
87 
91  virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
92  {
93  return Engines_DSC_interface::get_uses_port(uses_port_name);
94  }
95 
99  virtual void connect_provides_port(const char* provides_port_name)
100  {
102  }
103 
107  virtual void connect_uses_port(const char* uses_port_name,
108  Ports::Port_ptr provides_port_ref)
109  {
111  provides_port_ref);
112  }
113 
117  virtual CORBA::Boolean is_connected(const char* port_name)
118  {
119  return Engines_DSC_interface::is_connected(port_name);
120  }
121 
125  virtual void disconnect_provides_port(const char* provides_port_name,
126  const Engines::DSC::Message message)
127  {
129  message);
130  }
131 
135  virtual void disconnect_uses_port(const char* uses_port_name,
136  Ports::Port_ptr provides_port_ref,
137  const Engines::DSC::Message message)
138  {
140  provides_port_ref,
141  message);
142  }
143 
144  virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
145  {
147  }
148 
157  virtual void set_paco_proxy(CORBA::Object_ptr ref,
158  const char* provides_port_name,
159  Ports::PortProperties_ptr port_prop);
160 
169  virtual CORBA::Boolean add_parallel_provides_proxy_port(const CORBA::Object_ptr ref,
170  const char * provides_port_name,
171  Ports::PortProperties_ptr port_prop);
172 
180  virtual CORBA::Boolean add_parallel_provides_proxy_wait(const char * provides_port_name);
181 
190  virtual CORBA::Boolean add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref,
191  const char* provides_port_name);
192 
200  virtual const char * get_proxy(const char* provides_port_name);
201 
202 };
203 
204 #endif
This class implements the interface Engines::DSC.
Definition: DSC_interface.hxx:45
virtual Ports::PortProperties_ptr get_port_properties(const char *port_name)
Definition: DSC_interface.cxx:362
virtual CORBA::Boolean is_connected(const char *port_name)
Definition: DSC_interface.cxx:252
virtual void add_uses_port(const char *repository_id, const char *uses_port_name, Ports::PortProperties_ptr port_prop)
Definition: DSC_interface.cxx:79
virtual void connect_provides_port(const char *provides_port_name)
Definition: DSC_interface.cxx:180
virtual void connect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref)
Definition: DSC_interface.cxx:203
virtual Engines::DSC::uses_port * get_uses_port(const char *uses_port_name)
Definition: DSC_interface.cxx:142
virtual Ports::Port_ptr get_provides_port(const char *provides_port_name, const CORBA::Boolean connection_error)
Definition: DSC_interface.cxx:109
virtual void add_provides_port(Ports::Port_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop)
Definition: DSC_interface.cxx:51
virtual void disconnect_provides_port(const char *provides_port_name, const Engines::DSC::Message message)
Definition: DSC_interface.cxx:271
virtual void disconnect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message)
Definition: DSC_interface.cxx:296
Definition: ParallelDSC_i.hxx:40
virtual CORBA::Boolean add_parallel_provides_proxy_wait(const char *provides_port_name)
This method by the nodes that do not add the proxy to wait is reference.
Definition: ParallelDSC_i.cxx:94
virtual void connect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref)
Definition: ParallelDSC_i.hxx:107
virtual Ports::PortProperties_ptr get_port_properties(const char *port_name)
Definition: ParallelDSC_i.hxx:144
virtual void disconnect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message)
Definition: ParallelDSC_i.hxx:135
virtual Ports::Port_ptr get_provides_port(const char *provides_port_name, const CORBA::Boolean connection_error)
Definition: ParallelDSC_i.hxx:81
virtual const char * get_proxy(const char *provides_port_name)
Used to get the proxy of the parallel port.
Definition: ParallelDSC_i.cxx:70
virtual void add_provides_port(Ports::Port_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop)
Definition: ParallelDSC_i.hxx:57
virtual void connect_provides_port(const char *provides_port_name)
Definition: ParallelDSC_i.hxx:99
virtual ~Engines_ParallelDSC_i()
Definition: ParallelDSC_i.cxx:50
virtual void disconnect_provides_port(const char *provides_port_name, const Engines::DSC::Message message)
Definition: ParallelDSC_i.hxx:125
virtual void add_uses_port(const char *repository_id, const char *uses_port_name, Ports::PortProperties_ptr port_prop)
Definition: ParallelDSC_i.hxx:69
virtual void set_paco_proxy(CORBA::Object_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop)
This method is used to register the proxy of the parallel port into all the nodes of the parallel com...
Definition: ParallelDSC_i.cxx:57
virtual CORBA::Boolean is_connected(const char *port_name)
Definition: ParallelDSC_i.hxx:117
virtual CORBA::Boolean add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref, const char *provides_port_name)
Permits to add a parallel node of a parallel provides port.
Definition: ParallelDSC_i.cxx:115
Engines_ParallelDSC_i(CORBA::ORB_ptr orb, char *ior, int rank, PortableServer::POA_ptr poa, PortableServer::ObjectId *contId, const char *instanceName, const char *interfaceName, bool notif=false)
Definition: ParallelDSC_i.cxx:26
virtual Engines::DSC::uses_port * get_uses_port(const char *uses_port_name)
Definition: ParallelDSC_i.hxx:91
virtual CORBA::Boolean add_parallel_provides_proxy_port(const CORBA::Object_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop)
This method is used by the node that want to add the parallel proxy port.
Definition: ParallelDSC_i.cxx:80
Definition: SALOME_ParallelComponent_i.hxx:63
char * instanceName()
CORBA method: return name of the instance, unique in this Container.
Definition: SALOME_ParallelComponent_i.cxx:145
char * interfaceName()
CORBA method: return name of the component class.
Definition: SALOME_ParallelComponent_i.cxx:156
Message
This enumeration is used when the connection of a port (uses or provides) is changed.
Definition: DSC_Engines.idl:79
sequence< Ports::Port > uses_port
a uses port
Definition: DSC_Engines.idl:73
poa
Definition: SALOME_ContainerPy.py:377
orb
Definition: salome.py:122