예제 #1
0
void
ConnectionInterface::PushConsumer ( InputPort& consumer )
{
        if ( _consumers.find ( consumer.GetID() ) == _consumers.end() ) {
                consumer.Plug ( *this );
                _consumers[ consumer.GetID() ] = &consumer;
        } else {
                //TODO _THROW_ exception
        }
}
예제 #2
0
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
        }
}