1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : ParallelDSC_i.cxx
21 // Author : André RIBES (EDF)
24 #include "ParallelDSC_i.hxx"
26 Engines_ParallelDSC_i::Engines_ParallelDSC_i(CORBA::ORB_ptr orb,
29 PortableServer::POA_ptr poa,
30 PortableServer::ObjectId * contId,
31 const char *instanceName,
32 const char *interfaceName,
34 Engines_Parallel_Component_i(orb, ior, rank, poa, contId, instanceName, interfaceName, notif),
35 Engines::Parallel_DSC_serv(orb, ior, rank),
36 Engines::Parallel_DSC_base_serv(orb, ior, rank),
37 Engines::DSC_serv(orb, ior, rank),
38 Engines::DSC_base_serv(orb, ior, rank),
39 Engines::Superv_Component_serv(orb, ior, rank),
40 Engines::Superv_Component_base_serv(orb, ior, rank),
41 Engines::EngineComponent_serv(orb, ior, rank),
42 Engines::EngineComponent_base_serv(orb, ior, rank),
43 Engines::Parallel_Component_serv(orb, ior, rank),
44 Engines::Parallel_Component_base_serv(orb, ior, rank),
45 InterfaceParallel_impl(orb, ior, rank)
50 Engines_ParallelDSC_i::~Engines_ParallelDSC_i() {}
53 // CURRENTLY ERRORS ARE NOT SUPPORTED !!!!!!!
57 Engines_ParallelDSC_i::set_paco_proxy(const CORBA::Object_ptr ref,
58 const char* provides_port_name,
59 Ports::PortProperties_ptr port_prop) {
60 assert(provides_port_name);
61 Engines_DSC_interface::add_provides_port(Ports::Port::_narrow(ref),
64 // Waiting that all the nodes have the proxy
65 _my_com->paco_barrier();
66 cerr << "set_paco_proxy node fin" << endl;
70 Engines_ParallelDSC_i::get_proxy(const char* provides_port_name) {
71 char * rtn_char = NULL;
72 Ports::Port_ptr proxy = Engines_DSC_interface::get_provides_port(provides_port_name,
74 if (!CORBA::is_nil(proxy))
75 rtn_char = (char *) _orb->object_to_string(proxy);
80 Engines_ParallelDSC_i::add_parallel_provides_proxy_port(const CORBA::Object_ptr ref,
81 const char * provides_port_name,
82 Ports::PortProperties_ptr port_prop)
84 assert(provides_port_name);
85 CORBA::Boolean rtn_bool = false;
86 Engines::Parallel_DSC_var real_comp_proxy =
87 Engines::Parallel_DSC::_narrow(InterfaceParallel_impl::_proxy);
88 real_comp_proxy->set_paco_proxy(ref, provides_port_name, port_prop);
94 Engines_ParallelDSC_i::add_parallel_provides_proxy_wait(const char * provides_port_name)
96 assert(provides_port_name);
99 proxy = (char *) get_proxy(provides_port_name);
106 proxy = (char *) get_proxy(provides_port_name);
115 Engines_ParallelDSC_i::add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref,
116 const char* provides_port_name)
118 CORBA::Boolean rtn_bool = false;
119 PaCO::InterfaceParallel_var node = PaCO::InterfaceParallel::_narrow(ref);