1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : ParallelDSC_i.cxx
23 // Author : André RIBES (EDF)
26 #include "ParallelDSC_i.hxx"
28 Engines_ParallelDSC_i::Engines_ParallelDSC_i(CORBA::ORB_ptr orb,
31 PortableServer::POA_ptr poa,
32 PortableServer::ObjectId * contId,
33 const char *instanceName,
34 const char *interfaceName,
36 Engines_Parallel_Component_i(orb, ior, rank, poa, contId, instanceName, interfaceName, notif),
37 Engines::Parallel_DSC_serv(orb, ior, rank),
38 Engines::Parallel_DSC_base_serv(orb, ior, rank),
39 Engines::DSC_serv(orb, ior, rank),
40 Engines::DSC_base_serv(orb, ior, rank),
41 Engines::Superv_Component_serv(orb, ior, rank),
42 Engines::Superv_Component_base_serv(orb, ior, rank),
43 Engines::Component_serv(orb, ior, rank),
44 Engines::Component_base_serv(orb, ior, rank),
45 Engines::Parallel_Component_serv(orb, ior, rank),
46 Engines::Parallel_Component_base_serv(orb, ior, rank),
47 InterfaceParallel_impl(orb, ior, rank)
52 Engines_ParallelDSC_i::~Engines_ParallelDSC_i() {}
55 // CURRENTLY ERRORS ARE NOT SUPPORTED !!!!!!!
59 Engines_ParallelDSC_i::set_paco_proxy(const CORBA::Object_ptr ref,
60 const char* provides_port_name,
61 Ports::PortProperties_ptr port_prop) {
62 assert(provides_port_name);
63 Engines_DSC_interface::add_provides_port(Ports::Port::_narrow(ref),
66 // Waiting that all the nodes have the proxy
67 _my_com->paco_barrier();
68 cerr << "set_paco_proxy node fin" << endl;
72 Engines_ParallelDSC_i::get_proxy(const char* provides_port_name) {
73 char * rtn_char = NULL;
74 Ports::Port_ptr proxy = Engines_DSC_interface::get_provides_port(provides_port_name,
76 if (!CORBA::is_nil(proxy))
77 rtn_char = (char *) _orb->object_to_string(proxy);
82 Engines_ParallelDSC_i::add_parallel_provides_proxy_port(const CORBA::Object_ptr ref,
83 const char * provides_port_name,
84 Ports::PortProperties_ptr port_prop)
86 assert(provides_port_name);
87 CORBA::Boolean rtn_bool = false;
88 Engines::Parallel_DSC_var real_comp_proxy =
89 Engines::Parallel_DSC::_narrow(InterfaceParallel_impl::_proxy);
90 real_comp_proxy->set_paco_proxy(ref, provides_port_name, port_prop);
96 Engines_ParallelDSC_i::add_parallel_provides_proxy_wait(const char * provides_port_name)
98 assert(provides_port_name);
101 proxy = (char *) get_proxy(provides_port_name);
108 proxy = (char *) get_proxy(provides_port_name);
117 Engines_ParallelDSC_i::add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref,
118 const char* provides_port_name)
120 CORBA::Boolean rtn_bool = false;
121 PaCO::InterfaceParallel_var node = PaCO::InterfaceParallel::_narrow(ref);