Version: 6.5.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
ConnectionManager_i.hxx
1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, 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.
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 
23 // File : ConnectionManager_i.hxx
24 // Author : André RIBES (EDF)
25 // Module : KERNEL
26 //
27 #ifndef _CONNECTION_MANAGER_I_HXX_
28 #define _CONNECTION_MANAGER_I_HXX_
29 
30 #include "DSC_Basic.hxx"
31 
32 #include <iostream>
33 #include <map>
34 #include <pthread.h>
35 
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(DSC_Engines)
38 
43  public virtual POA_Engines::ConnectionManager
44 {
45  public :
46  ConnectionManager_i(CORBA::ORB_ptr orb);
47  virtual ~ConnectionManager_i();
48 
53  Engines::ConnectionManager::connectionId connect(Engines::DSC_ptr uses_component,
54  const char* uses_port_name,
55  Engines::DSC_ptr provides_component,
56  const char* provides_port_name);
57 
65  Engines::DSC::Message message);
66 
70  void ShutdownWithExit();
71 
75  CORBA::Long getPID();
76 
77  private :
78 
79  struct connection_infos {
80  Engines::DSC_var uses_component;
81  std::string uses_port_name;
82  Engines::DSC_var provides_component;
83  std::string provides_port_name;
84  Ports::Port_var provides_port;
85  };
86 
88  connection_infos *> ids_type;
90  connection_infos *>::iterator ids_it_type;
91 
92  ids_type ids;
93  ids_it_type ids_it;
94 
95  int current_id;
96  pthread_mutex_t mutex;
97  protected:
98  CORBA::ORB_var _orb;
99 };
100 
101 #endif
CORBA::Long getPID()
Definition: ConnectionManager_i.cxx:138
This class implements the interface Engines::ConnectionManager.
Definition: ConnectionManager_i.hxx:42
void ShutdownWithExit()
Definition: ConnectionManager_i.cxx:123
Engines::ConnectionManager::connectionId connect(Engines::DSC_ptr uses_component, const char *uses_port_name, Engines::DSC_ptr provides_component, const char *provides_port_name)
Definition: ConnectionManager_i.cxx:52
void disconnect(Engines::ConnectionManager::connectionId id, Engines::DSC::Message message)
Definition: ConnectionManager_i.cxx:84
short connectionId
A connection Id. It's unique.
Definition: DSC_Engines.idl:293
This class implements a DSC_User provides C++ port.
Definition: provides_port.hxx:40
Message
This enumeration is used when the connection of a port (uses or provides) is changed.
Definition: DSC_Engines.idl:79
Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS