1 // Copyright (C) 2007-2021 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, or (at your option) any later version.
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
23 #ifndef _CONNECTION_MANAGER_HXX_
24 #define _CONNECTION_MANAGER_HXX_
26 #include "YACSRuntimeSALOMEExport.hxx"
27 #include "DSC_Basic.hxx"
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(DSC_Engines)
35 /*! \class ConnectionManager
36 * \brief This class implements the interface Engines::ConnectionManager.
37 * It is used to make connections between CALCIUM ports.
39 class YACSRUNTIMESALOME_EXPORT ConnectionManager
45 typedef short connectionId;
48 * connect two CALCIUM ports of two components.
50 ConnectionManager::connectionId connect(Engines::DSC_ptr uses_component,
51 const char* uses_port_name,
52 Engines::DSC_ptr provides_component,
53 const char* provides_port_name);
56 * releases a connection performed with ConnectionManager::connect.
58 void disconnect(ConnectionManager::connectionId id,
59 Engines::DSC::Message message);
62 Shutdown the ConnectionManager process.
64 void ShutdownWithExit();
68 struct connection_infos {
69 Engines::DSC_var uses_component;
70 std::string uses_port_name;
71 Engines::DSC_var provides_component;
72 std::string provides_port_name;
73 Ports::Port_var provides_port;
76 typedef std::map<Engines::ConnectionManager::connectionId,
77 connection_infos *> ids_type;
78 typedef std::map<Engines::ConnectionManager::connectionId,
79 connection_infos *>::iterator ids_it_type;