connect method
Resolves a port map by connecting the port to the interfacePort in the appropriate direction.
Returns true
if the port map was successfully connected, or false
if
it was already connected.
Implementation
bool connect() {
if (_isConnected) {
return false;
}
switch (port.direction) {
case PortDirection.input || PortDirection.inOut:
port.getsInternal(interfacePort);
case PortDirection.output:
interfacePort.getsInternal(port);
}
// in case there has been an internal interface created
connectInternalIfPresent();
_isConnected = true;
return true;
}