Version: 9.16.0
SALOME_ParallelContainerProxy_i.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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, or (at your option) any later version.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22// File : SALOME_ParallelContainerProxy_i.hxx
23// Author : André RIBES, EDF
24
25#ifndef _SALOME_PARALLEL_CONTAINER_PROXY_I_HXX_
26#define _SALOME_PARALLEL_CONTAINER_PROXY_I_HXX_
27
28#include "utilities.h"
29#include "Basics_Utils.hxx"
30#include "SALOME_PACOExtensionPaCO_Engines_PACO_Container_server.hxx"
33#include "RegistryConnexion.hxx"
34#include <map>
35#include <dlfcn.h>
36#include <paco_omni.h>
37
38#include <Python.h>
40
42 virtual public Engines::PACO_Container_proxy_impl,
43 virtual public ParallelGlobalProcessVar_i
44{
45 public:
46 Container_proxy_impl_final(CORBA::ORB_ptr orb,
47 paco_fabrique_thread * fab_thread,
48 PortableServer::POA_ptr poa,
49 std::string containerName,
50 bool is_a_return_proxy = false);
51
53
54 virtual void Shutdown();
55
56 virtual ::CORBA::Boolean load_component_Library(const char* componentName,CORBA::String_out reason);
57 virtual Engines::EngineComponent_ptr create_component_instance (const char* componentName);
58 virtual Engines::EngineComponent_ptr create_component_instance_env (const char* componentName,
59 const Engines::FieldsDict& env,
60 CORBA::String_out reason);
61
62 private:
63 std::map<std::string, std::string> _libtype_map; // libname -> libtype (seq ou par)
64
66 {
67 Engines::EngineComponent_var proxy_corba_ref;
68 PortableServer::ObjectId * proxy_id;
70 };
71
72 // Cette liste contient les references vers les différentes
73 // instances d'objets parallèles.
74 std::list<Container_proxy_impl_final::proxy_object> _par_obj_inst_list;
75
76 // Fonction de test pour savoir si les objets de la bib sont
77 // parallèles ou sequentiels
78 typedef void (*PACO_TEST_FUNCTION) ();
79 typedef PortableServer::ObjectId * (*FACTORY_FUNCTION) (CORBA::ORB_ptr,
80 paco_fabrique_thread *,
81 PortableServer::POA_ptr,
82 PortableServer::ObjectId *,
84 const char *,
85 int);
87 std::string _hostname;
88 std::string _containerName;
89 PortableServer::POA_var _poa;
90 PortableServer::ObjectId * _id;
92
93 paco_fabrique_thread * _fab_thread;
94};
95
96#endif
Definition: SALOME_ParallelContainerProxy_i.hxx:44
virtual Engines::EngineComponent_ptr create_component_instance(const char *componentName)
Definition: SALOME_ParallelContainerProxy_i.cxx:280
std::string _hostname
Definition: SALOME_ParallelContainerProxy_i.hxx:87
std::list< Container_proxy_impl_final::proxy_object > _par_obj_inst_list
Definition: SALOME_ParallelContainerProxy_i.hxx:74
std::string _containerName
Definition: SALOME_ParallelContainerProxy_i.hxx:88
PortableServer::ObjectId * _id
Definition: SALOME_ParallelContainerProxy_i.hxx:90
virtual Engines::EngineComponent_ptr create_component_instance_env(const char *componentName, const Engines::FieldsDict &env, CORBA::String_out reason)
Definition: SALOME_ParallelContainerProxy_i.cxx:294
PortableServer::POA_var _poa
Definition: SALOME_ParallelContainerProxy_i.hxx:89
void(* PACO_TEST_FUNCTION)()
Definition: SALOME_ParallelContainerProxy_i.hxx:78
virtual ::CORBA::Boolean load_component_Library(const char *componentName, CORBA::String_out reason)
Definition: SALOME_ParallelContainerProxy_i.cxx:141
std::map< std::string, std::string > _libtype_map
Definition: SALOME_ParallelContainerProxy_i.hxx:63
Container_proxy_impl_final(CORBA::ORB_ptr orb, paco_fabrique_thread *fab_thread, PortableServer::POA_ptr poa, std::string containerName, bool is_a_return_proxy=false)
Definition: SALOME_ParallelContainerProxy_i.cxx:29
int _numInstance
Definition: SALOME_ParallelContainerProxy_i.hxx:86
virtual ~Container_proxy_impl_final()
Definition: SALOME_ParallelContainerProxy_i.cxx:67
SALOME_NamingService * _NS
Definition: SALOME_ParallelContainerProxy_i.hxx:91
paco_fabrique_thread * _fab_thread
Definition: SALOME_ParallelContainerProxy_i.hxx:93
virtual void Shutdown()
Definition: SALOME_ParallelContainerProxy_i.cxx:78
Definition: SALOME_ParallelGlobalProcessVar_i.hxx:46
Definition: RegistryConnexion.hxx:45
A class to manage the SALOME naming service.
Definition: SALOME_NamingService.hxx:48
sequence< KeyValuePair > FieldsDict
Definition: SALOME_Component.idl:65
poa
Definition: SALOME_ContainerPy.py:377
containerName
Definition: SALOME_ContainerPy.py:383
orb
Definition: salome.py:122
Definition: SALOME_ParallelContainerProxy_i.hxx:66
RegistryConnexion * proxy_regist
Definition: SALOME_ParallelContainerProxy_i.hxx:69
PortableServer::ObjectId * proxy_id
Definition: SALOME_ParallelContainerProxy_i.hxx:68
Engines::EngineComponent_var proxy_corba_ref
Definition: SALOME_ParallelContainerProxy_i.hxx:67