1 // Copyright (C) 2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // Author : André RIBES (EDF)
29 #include <DSC_Basic.hxx>
36 #include "SALOME_Component_i.hxx"
37 #include "DSC_interface.hxx"
39 /*! \class Engines_DSC_i
40 * \brief This class implements the interface Engines::DSC
42 * The implementation of methods are performed by the class Engines_DSC_interface.
44 class DSC_BASIC_EXPORT Engines_DSC_i:
45 public Engines_Component_i, // keyword virtual is not use to be able to
46 // call the right Engines_Component_i constructor.
47 // If virtual is used, a derived class of Engines_DSC_i
48 // will have to call the right Engines_Component_i constructor.
49 public virtual POA_Engines::DSC,
50 public Engines_DSC_interface
53 Engines_DSC_i(CORBA::ORB_ptr orb,
54 PortableServer::POA_ptr poa,
55 PortableServer::ObjectId * contId,
56 const char *instanceName,
57 const char *interfaceName,
60 virtual ~Engines_DSC_i();
63 * \see Engines::DSC::add_provides_port
65 virtual void add_provides_port(Ports::Port_ptr ref,
66 const char* provides_port_name,
67 Ports::PortProperties_ptr port_prop)
68 throw (Engines::DSC::PortAlreadyDefined,
69 Engines::DSC::NilPort,
70 Engines::DSC::BadProperty) {
71 Engines_DSC_interface::add_provides_port(ref,
77 * \see Engines::DSC::add_uses_port
79 virtual void add_uses_port(const char* repository_id,
80 const char* uses_port_name,
81 Ports::PortProperties_ptr port_prop)
82 throw (Engines::DSC::PortAlreadyDefined,
83 Engines::DSC::BadProperty) {
84 Engines_DSC_interface::add_uses_port(repository_id,
90 * \see Engines::DSC::get_provides_port
92 virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
93 const CORBA::Boolean connection_error)
94 throw (Engines::DSC::PortNotDefined,
95 Engines::DSC::PortNotConnected) {
96 return Engines_DSC_interface::get_provides_port(provides_port_name,
101 * \see Engines::DSC::get_uses_port
103 virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
104 throw (Engines::DSC::PortNotDefined,
105 Engines::DSC::PortNotConnected) {
106 return Engines_DSC_interface::get_uses_port(uses_port_name);
110 * \see Engines::DSC::connect_provides_port
112 virtual void connect_provides_port(const char* provides_port_name)
113 throw (Engines::DSC::PortNotDefined) {
114 Engines_DSC_interface::connect_provides_port(provides_port_name);
118 * \see Engines::DSC::connect_uses_port
120 virtual void connect_uses_port(const char* uses_port_name,
121 Ports::Port_ptr provides_port_ref)
122 throw (Engines::DSC::PortNotDefined,
123 Engines::DSC::BadPortType,
124 Engines::DSC::NilPort) {
125 Engines_DSC_interface::connect_uses_port(uses_port_name,
130 * \see Engines::DSC::is_connected
132 virtual CORBA::Boolean is_connected(const char* port_name)
133 throw (Engines::DSC::PortNotDefined) {
134 return Engines_DSC_interface::is_connected(port_name);
138 * \see Engines::DSC::disconnect_provides_port
140 virtual void disconnect_provides_port(const char* provides_port_name,
141 const Engines::DSC::Message message)
142 throw (Engines::DSC::PortNotDefined,
143 Engines::DSC::PortNotConnected) {
144 Engines_DSC_interface::disconnect_provides_port(provides_port_name,
149 * \see Engines::DSC::disconnect_uses_port
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 throw (Engines::DSC::PortNotDefined,
155 Engines::DSC::PortNotConnected,
156 Engines::DSC::BadPortReference) {
157 Engines_DSC_interface::disconnect_uses_port(uses_port_name,
163 * \see Engines::DSC::get_port_properties
165 virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
166 throw (Engines::DSC::PortNotDefined) {
167 return Engines_DSC_interface::get_port_properties(port_name);