00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _DSC_I_HXX_
00027 #define _DSC_I_HXX_
00028
00029 #include "DSC_Basic.hxx"
00030
00031 #include <iostream>
00032 #include <map>
00033 #include <string.h>
00034 #include <assert.h>
00035
00036 #include "SALOME_Component_i.hxx"
00037 #include "DSC_interface.hxx"
00038
00044 class DSC_BASIC_EXPORT Engines_DSC_i:
00045 public Engines_Component_i,
00046
00047
00048
00049 public virtual POA_Engines::DSC,
00050 public Engines_DSC_interface
00051 {
00052 public:
00053 Engines_DSC_i(CORBA::ORB_ptr orb,
00054 PortableServer::POA_ptr poa,
00055 PortableServer::ObjectId * contId,
00056 const char *instanceName,
00057 const char *interfaceName,
00058 bool notif = false);
00059 Engines_DSC_i(CORBA::ORB_ptr orb,
00060 PortableServer::POA_ptr poa,
00061 Engines::Container_ptr container,
00062 const char *instanceName,
00063 const char *interfaceName,
00064 bool notif = false,
00065 bool regist = true );
00066
00067 virtual ~Engines_DSC_i();
00068
00072 virtual void add_provides_port(Ports::Port_ptr ref,
00073 const char* provides_port_name,
00074 Ports::PortProperties_ptr port_prop)
00075 throw (Engines::DSC::PortAlreadyDefined,
00076 Engines::DSC::NilPort,
00077 Engines::DSC::BadProperty) {
00078 Engines_DSC_interface::add_provides_port(ref,
00079 provides_port_name,
00080 port_prop);
00081 }
00082
00086 virtual void add_uses_port(const char* repository_id,
00087 const char* uses_port_name,
00088 Ports::PortProperties_ptr port_prop)
00089 throw (Engines::DSC::PortAlreadyDefined,
00090 Engines::DSC::BadProperty) {
00091 Engines_DSC_interface::add_uses_port(repository_id,
00092 uses_port_name,
00093 port_prop);
00094 }
00095
00099 virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
00100 const CORBA::Boolean connection_error)
00101 throw (Engines::DSC::PortNotDefined,
00102 Engines::DSC::PortNotConnected) {
00103 return Engines_DSC_interface::get_provides_port(provides_port_name,
00104 connection_error);
00105 }
00106
00110 virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
00111 throw (Engines::DSC::PortNotDefined,
00112 Engines::DSC::PortNotConnected) {
00113 return Engines_DSC_interface::get_uses_port(uses_port_name);
00114 }
00115
00119 virtual void connect_provides_port(const char* provides_port_name)
00120 throw (Engines::DSC::PortNotDefined) {
00121 Engines_DSC_interface::connect_provides_port(provides_port_name);
00122 }
00123
00127 virtual void connect_uses_port(const char* uses_port_name,
00128 Ports::Port_ptr provides_port_ref)
00129 throw (Engines::DSC::PortNotDefined,
00130 Engines::DSC::BadPortType,
00131 Engines::DSC::NilPort) {
00132 Engines_DSC_interface::connect_uses_port(uses_port_name,
00133 provides_port_ref);
00134 }
00135
00139 virtual CORBA::Boolean is_connected(const char* port_name)
00140 throw (Engines::DSC::PortNotDefined) {
00141 return Engines_DSC_interface::is_connected(port_name);
00142 }
00143
00147 virtual void disconnect_provides_port(const char* provides_port_name,
00148 const Engines::DSC::Message message)
00149 throw (Engines::DSC::PortNotDefined,
00150 Engines::DSC::PortNotConnected) {
00151 Engines_DSC_interface::disconnect_provides_port(provides_port_name,
00152 message);
00153 }
00154
00158 virtual void disconnect_uses_port(const char* uses_port_name,
00159 Ports::Port_ptr provides_port_ref,
00160 const Engines::DSC::Message message)
00161 throw (Engines::DSC::PortNotDefined,
00162 Engines::DSC::PortNotConnected,
00163 Engines::DSC::BadPortReference) {
00164 Engines_DSC_interface::disconnect_uses_port(uses_port_name,
00165 provides_port_ref,
00166 message);
00167 }
00168
00172 virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
00173 throw (Engines::DSC::PortNotDefined) {
00174 return Engines_DSC_interface::get_port_properties(port_name);
00175 }
00176 };
00177
00178 #endif