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::DSC_serv(orb, ior, rank),
39 Engines::Superv_Component_serv(orb, ior, rank),
40 Engines::Component_serv(orb, ior, rank),
41 Engines::Parallel_Component_serv(orb, ior, rank),
42 InterfaceParallel_impl(orb, ior, rank)
47 Engines_ParallelDSC_i::~Engines_ParallelDSC_i() {}
50 // CURRENTLY ERRORS ARE NOT SUPPORTED !!!!!!!
54 Engines_ParallelDSC_i::set_paco_proxy(const CORBA::Object_ptr ref,
55 const char* provides_port_name,
56 Ports::PortProperties_ptr port_prop) {
57 assert(provides_port_name);
58 Engines_DSC_interface::add_provides_port(Ports::Port::_narrow(ref),
61 // Waiting that all the nodes have the proxy
62 _my_com->paco_barrier();
63 cerr << "set_paco_proxy node fin" << endl;
67 Engines_ParallelDSC_i::get_proxy(const char* provides_port_name) {
68 char * rtn_char = NULL;
69 Ports::Port_ptr proxy = Engines_DSC_interface::get_provides_port(provides_port_name,
71 if (!CORBA::is_nil(proxy))
72 rtn_char = (char *) _orb->object_to_string(proxy);
77 Engines_ParallelDSC_i::add_parallel_provides_proxy_port(const CORBA::Object_ptr ref,
78 const char * provides_port_name,
79 Ports::PortProperties_ptr port_prop)
81 assert(provides_port_name);
82 CORBA::Boolean rtn_bool = false;
83 Engines::Parallel_DSC_var real_comp_proxy =
84 Engines::Parallel_DSC::_narrow(InterfaceParallel_impl::_proxy);
85 real_comp_proxy->set_paco_proxy(ref, provides_port_name, port_prop);
91 Engines_ParallelDSC_i::add_parallel_provides_proxy_wait(const char * provides_port_name)
93 assert(provides_port_name);
96 proxy = (char *) get_proxy(provides_port_name);
103 proxy = (char *) get_proxy(provides_port_name);
112 Engines_ParallelDSC_i::add_parallel_provides_node_port(Ports::Port_PaCO_ptr ref,
113 const char* provides_port_name)
115 CORBA::Boolean rtn_bool = false;
116 PaCO::InterfaceParallel_var node = PaCO::InterfaceParallel::_narrow(ref);