Version: 9.15.0
DSC_i.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2025 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 
23 // File : DSC_i.hxx
24 // Author : André RIBES (EDF)
25 // Module : KERNEL
26 //
27 #ifndef _DSC_I_HXX_
28 #define _DSC_I_HXX_
29 
30 #include "DSC_Basic.hxx"
31 
32 #include <iostream>
33 #include <map>
34 #include <string.h>
35 #include <assert.h>
36 
37 #include "SALOME_Component_i.hxx"
38 #include "DSC_interface.hxx"
39 
46  public Engines_Component_i, // keyword virtual is not use to be able to
47  // call the right Engines_Component_i constructor.
48  // If virtual is used, a derived class of Engines_DSC_i
49  // will have to call the right Engines_Component_i constructor.
50  public virtual POA_Engines::DSC,
52 {
53 public:
54  Engines_DSC_i(CORBA::ORB_ptr orb,
55  PortableServer::POA_ptr poa,
56  PortableServer::ObjectId * contId,
57  const char *instanceName,
58  const char *interfaceName,
59  bool notif = false);
60  Engines_DSC_i(CORBA::ORB_ptr orb,
61  PortableServer::POA_ptr poa,
62  Engines::Container_ptr container,
63  const char *instanceName,
64  const char *interfaceName,
65  bool notif = false,
66  bool regist = false );
67 
68  virtual ~Engines_DSC_i();
69 
73  virtual void add_provides_port(Ports::Port_ptr ref,
74  const char* provides_port_name,
75  Ports::PortProperties_ptr port_prop)
76  {
78  provides_port_name,
79  port_prop);
80  }
81 
85  virtual void add_uses_port(const char* repository_id,
86  const char* uses_port_name,
87  Ports::PortProperties_ptr port_prop)
88  {
90  uses_port_name,
91  port_prop);
92  }
93 
97  virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
98  const CORBA::Boolean connection_error)
99  {
100  return Engines_DSC_interface::get_provides_port(provides_port_name,
101  connection_error);
102  }
103 
107  virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
108  {
109  return Engines_DSC_interface::get_uses_port(uses_port_name);
110  }
111 
115  virtual void connect_provides_port(const char* provides_port_name)
116  {
118  }
119 
123  virtual void connect_uses_port(const char* uses_port_name,
124  Ports::Port_ptr provides_port_ref)
125  {
127  provides_port_ref);
128  }
129 
133  virtual CORBA::Boolean is_connected(const char* port_name)
134  {
135  return Engines_DSC_interface::is_connected(port_name);
136  }
137 
141  virtual void disconnect_provides_port(const char* provides_port_name,
142  const Engines::DSC::Message message)
143  {
145  message);
146  }
147 
151  virtual void disconnect_uses_port(const char* uses_port_name,
152  Ports::Port_ptr provides_port_ref,
153  const Engines::DSC::Message message)
154  {
156  provides_port_ref,
157  message);
158  }
159 
163  virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
164  {
166  }
167 };
168 
169 #endif
#define DSC_BASIC_EXPORT
Definition: DSC_Basic.hxx:34
C++ implementation of Engines::Component interface.
Definition: SALOME_Component_i.hxx:56
This class implements the interface Engines::DSC.
Definition: DSC_i.hxx:52
virtual void connect_provides_port(const char *provides_port_name)
Definition: DSC_i.hxx:115
virtual Ports::PortProperties_ptr get_port_properties(const char *port_name)
Definition: DSC_i.hxx:163
virtual void connect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref)
Definition: DSC_i.hxx:123
virtual void disconnect_provides_port(const char *provides_port_name, const Engines::DSC::Message message)
Definition: DSC_i.hxx:141
virtual CORBA::Boolean is_connected(const char *port_name)
Definition: DSC_i.hxx:133
virtual Ports::Port_ptr get_provides_port(const char *provides_port_name, const CORBA::Boolean connection_error)
Definition: DSC_i.hxx:97
virtual void disconnect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message)
Definition: DSC_i.hxx:151
virtual void add_uses_port(const char *repository_id, const char *uses_port_name, Ports::PortProperties_ptr port_prop)
Definition: DSC_i.hxx:85
virtual void add_provides_port(Ports::Port_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop)
Definition: DSC_i.hxx:73
virtual Engines::DSC::uses_port * get_uses_port(const char *uses_port_name)
Definition: DSC_i.hxx:107
This class implements the interface Engines::DSC.
Definition: DSC_interface.hxx:45
virtual Ports::PortProperties_ptr get_port_properties(const char *port_name)
Definition: DSC_interface.cxx:362
virtual CORBA::Boolean is_connected(const char *port_name)
Definition: DSC_interface.cxx:252
virtual void add_uses_port(const char *repository_id, const char *uses_port_name, Ports::PortProperties_ptr port_prop)
Definition: DSC_interface.cxx:79
virtual void connect_provides_port(const char *provides_port_name)
Definition: DSC_interface.cxx:180
virtual void connect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref)
Definition: DSC_interface.cxx:203
virtual Engines::DSC::uses_port * get_uses_port(const char *uses_port_name)
Definition: DSC_interface.cxx:142
virtual Ports::Port_ptr get_provides_port(const char *provides_port_name, const CORBA::Boolean connection_error)
Definition: DSC_interface.cxx:109
virtual void add_provides_port(Ports::Port_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop)
Definition: DSC_interface.cxx:51
virtual void disconnect_provides_port(const char *provides_port_name, const Engines::DSC::Message message)
Definition: DSC_interface.cxx:271
virtual void disconnect_uses_port(const char *uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message)
Definition: DSC_interface.cxx:296
Message
This enumeration is used when the connection of a port (uses or provides) is changed.
Definition: DSC_Engines.idl:79
sequence< Ports::Port > uses_port
a uses port
Definition: DSC_Engines.idl:73
poa
Definition: SALOME_ContainerPy.py:377
container
Definition: TestComponentPy.py:63
orb
Definition: salome.py:122