Go to the documentation of this file.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
00027 #ifndef _DSC_I_HXX_
00028 #define _DSC_I_HXX_
00029
00030 #include "DSC_Basic.hxx"
00031
00032 #include <iostream>
00033 #include <map>
00034 #include <string.h>
00035 #include <assert.h>
00036
00037 #include "SALOME_Component_i.hxx"
00038 #include "DSC_interface.hxx"
00039
00045 class DSC_BASIC_EXPORT Engines_DSC_i:
00046 public Engines_Component_i,
00047
00048
00049
00050 public virtual POA_Engines::DSC,
00051 public Engines_DSC_interface
00052 {
00053 public:
00054 Engines_DSC_i(CORBA::ORB_ptr orb,
00055 PortableServer::POA_ptr poa,
00056 PortableServer::ObjectId * contId,
00057 const char *instanceName,
00058 const char *interfaceName,
00059 bool notif = false);
00060 Engines_DSC_i(CORBA::ORB_ptr orb,
00061 PortableServer::POA_ptr poa,
00062 Engines::Container_ptr container,
00063 const char *instanceName,
00064 const char *interfaceName,
00065 bool notif = false,
00066 bool regist = true );
00067
00068 virtual ~Engines_DSC_i();
00069
00073 virtual void add_provides_port(Ports::Port_ptr ref,
00074 const char* provides_port_name,
00075 Ports::PortProperties_ptr port_prop)
00076 throw (Engines::DSC::PortAlreadyDefined,
00077 Engines::DSC::NilPort,
00078 Engines::DSC::BadProperty) {
00079 Engines_DSC_interface::add_provides_port(ref,
00080 provides_port_name,
00081 port_prop);
00082 }
00083
00087 virtual void add_uses_port(const char* repository_id,
00088 const char* uses_port_name,
00089 Ports::PortProperties_ptr port_prop)
00090 throw (Engines::DSC::PortAlreadyDefined,
00091 Engines::DSC::BadProperty) {
00092 Engines_DSC_interface::add_uses_port(repository_id,
00093 uses_port_name,
00094 port_prop);
00095 }
00096
00100 virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
00101 const CORBA::Boolean connection_error)
00102 throw (Engines::DSC::PortNotDefined,
00103 Engines::DSC::PortNotConnected) {
00104 return Engines_DSC_interface::get_provides_port(provides_port_name,
00105 connection_error);
00106 }
00107
00111 virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
00112 throw (Engines::DSC::PortNotDefined,
00113 Engines::DSC::PortNotConnected) {
00114 return Engines_DSC_interface::get_uses_port(uses_port_name);
00115 }
00116
00120 virtual void connect_provides_port(const char* provides_port_name)
00121 throw (Engines::DSC::PortNotDefined) {
00122 Engines_DSC_interface::connect_provides_port(provides_port_name);
00123 }
00124
00128 virtual void connect_uses_port(const char* uses_port_name,
00129 Ports::Port_ptr provides_port_ref)
00130 throw (Engines::DSC::PortNotDefined,
00131 Engines::DSC::BadPortType,
00132 Engines::DSC::NilPort) {
00133 Engines_DSC_interface::connect_uses_port(uses_port_name,
00134 provides_port_ref);
00135 }
00136
00140 virtual CORBA::Boolean is_connected(const char* port_name)
00141 throw (Engines::DSC::PortNotDefined) {
00142 return Engines_DSC_interface::is_connected(port_name);
00143 }
00144
00148 virtual void disconnect_provides_port(const char* provides_port_name,
00149 const Engines::DSC::Message message)
00150 throw (Engines::DSC::PortNotDefined,
00151 Engines::DSC::PortNotConnected) {
00152 Engines_DSC_interface::disconnect_provides_port(provides_port_name,
00153 message);
00154 }
00155
00159 virtual void disconnect_uses_port(const char* uses_port_name,
00160 Ports::Port_ptr provides_port_ref,
00161 const Engines::DSC::Message message)
00162 throw (Engines::DSC::PortNotDefined,
00163 Engines::DSC::PortNotConnected,
00164 Engines::DSC::BadPortReference) {
00165 Engines_DSC_interface::disconnect_uses_port(uses_port_name,
00166 provides_port_ref,
00167 message);
00168 }
00169
00173 virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
00174 throw (Engines::DSC::PortNotDefined) {
00175 return Engines_DSC_interface::get_port_properties(port_name);
00176 }
00177 };
00178
00179 #endif