30 #ifndef _GENERIC_USES_PORT_HXX_
31 #define _GENERIC_USES_PORT_HXX_
36 #include "SALOME_Ports.hh"
46 template <
typename DataManipulator,
typename CorbaPortType,
char * repositoryName,
52 typedef typename DataManipulator::Type
DataType;
59 template <
typename TimeType,
typename TagType>
70 template <
typename DataManipulator,
typename CorbaPortType,
char * repositoryName,
typename UsesPort >
75 template <
typename DataManipulator,
typename CorbaPortType,
char * repositoryName,
typename UsesPort >
81 template <
typename DataManipulator,
typename CorbaPortType,
char * repositoryName,
typename UsesPort >
84 return repositoryName;
88 template <
typename DataManipulator,
typename CorbaPortType,
char * repositoryName,
typename UsesPort >
89 template <
typename TimeType,
typename TagType>
94 typedef typename CorbaPortType::_var_type CorbaPortTypeVar;
96 throw DSC_Exception(
LOC(
"There is no connected provides port to communicate with."));
106 for(
int i = 0; i < (int)_my_ports->length(); i++) {
108 CorbaPortTypeVar
port = CorbaPortType::_narrow((*_my_ports)[i]);
112 std::cerr <<
"-------- GenericUsesPort::put -------- " << std::endl;
115 port->put(data,time,tag);
117 }
catch(
const CORBA::SystemException& ex) {
120 << i <<
"( i>= 0)"));
132 template <
typename DataManipulator,
typename CorbaPortType,
char * repositoryName,
typename UsesPort>
134 GenericUsesPort< DataManipulator, CorbaPortType, repositoryName, UsesPort
138 if (_my_ports)
delete _my_ports;
141 std::cerr <<
"GenericUsesPort::uses_port_changed" << std::endl;
143 _my_ports = new_uses_port;
#define LOC(message)
Definition: DSC_Exception.hxx:55
Definition: GenericUsesPort.hxx:49
virtual ~GenericUsesPort()
Definition: GenericUsesPort.hxx:76
GenericUsesPort()
Definition: GenericUsesPort.hxx:71
void put(CorbaInDataType data, TimeType time, TagType tag)
Definition: GenericUsesPort.hxx:91
virtual const char * get_repository_id()
This is used by the component to get the CORBA repository id of the uses port.
Definition: GenericUsesPort.hxx:83
DataManipulator::CorbaInType CorbaInDataType
Definition: GenericUsesPort.hxx:53
virtual void uses_port_changed(Engines::DSC::uses_port *new_uses_port, const Engines::DSC::Message message)
This method is the uses port's callback to be aware of connections states.
Definition: GenericUsesPort.hxx:135
Engines::DSC::uses_port * _my_ports
Definition: GenericUsesPort.hxx:66
DataManipulator::Type DataType
Definition: GenericUsesPort.hxx:52
Class OSS is useful when streaming data through a function that expect a string as parameter.
Definition: DSC_Exception.hxx:65
This class implements a DSC_User uses C++ port.
Definition: uses_port.hxx:44
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
bool VerbosityActivated()
Called by any log message macros to decide about log output in Release and Debug mode dynamically rel...
Definition: libSALOMELog.cxx:48
port
Definition: salome_instance.py:114
Definition: DSC_Exception.hxx:94
double TagType
Definition: testAdjacentPredicate.cxx:53
int TimeType
Definition: testAdjacentPredicate.cxx:52