1 // Copyright (C) 2007-2023 CEA/DEN, EDF R&D
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, or (at your option) any later version.
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 #ifndef _CONNECTION_MANAGER_HXX_
21 #define _CONNECTION_MANAGER_HXX_
23 #include "YACSRuntimeSALOMEExport.hxx"
24 #include "DSC_Basic.hxx"
29 #include <SALOMEconfig.h>
30 #include CORBA_SERVER_HEADER(DSC_Engines)
32 /*! \class ConnectionManager
33 * \brief This class implements the interface Engines::ConnectionManager.
34 * It is used to make connections between CALCIUM ports.
36 class YACSRUNTIMESALOME_EXPORT ConnectionManager
42 typedef short connectionId;
45 * connect two CALCIUM ports of two components.
47 ConnectionManager::connectionId connect(Engines::DSC_ptr uses_component,
48 const char* uses_port_name,
49 Engines::DSC_ptr provides_component,
50 const char* provides_port_name);
53 * releases a connection performed with ConnectionManager::connect.
55 void disconnect(ConnectionManager::connectionId id,
56 Engines::DSC::Message message);
59 Shutdown the ConnectionManager process.
61 void ShutdownWithExit();
65 struct connection_infos {
66 Engines::DSC_var uses_component;
67 std::string uses_port_name;
68 Engines::DSC_var provides_component;
69 std::string provides_port_name;
70 Ports::Port_var provides_port;
73 typedef std::map<Engines::ConnectionManager::connectionId,
74 connection_infos *> ids_type;
75 typedef std::map<Engines::ConnectionManager::connectionId,
76 connection_infos *>::iterator ids_it_type;