void ConnectionInterface::PushConsumer ( InputPort& consumer ) { if ( _consumers.find ( consumer.GetID() ) == _consumers.end() ) { consumer.Plug ( *this ); _consumers[ consumer.GetID() ] = &consumer; } else { //TODO _THROW_ exception } }
void ConnectionInterface::DisconnectConsumer ( InputPort& inputPort ) { ConsumersMap::iterator it = _consumers.find ( inputPort.GetID() ); if ( it != _consumers.end() ) { inputPort.UnPlug ( true ); _consumers.erase ( it ); } else { //TODO _THROW_ exception } }