return( false );
// Real connection
- dest->SetInput( input_name, orig->GetOutputPort( output_name ) );
- this->m_Graph->AddEdge(
- orig_filter, dest_filter,
- TConnection( output_name, input_name )
- );
- return( false );
+ if( dest->SetInput( input_name, orig->GetOutput( output_name ) ) )
+ {
+ this->m_Graph->AddEdge(
+ orig_filter, dest_filter,
+ TConnection( output_name, input_name )
+ );
+ return( true );
+ }
+ else
+ return( false );
}
// -------------------------------------------------------------------------
bool cpPlugins::Interface::Workspace::
-Connect( TData::Pointer* input_object, const std::string& input_name )
+Connect(
+ const ProcessObjectPort& input_port, const std::string& exposed_port
+ )
{
- auto port = this->m_ExposedInputPorts.find( input_name );
+ auto port = this->m_ExposedInputPorts.find( exposed_port );
if( port != this->m_ExposedInputPorts.end( ) )
{
TFilter* filter = this->GetFilter( port->second.first );
if( filter != NULL )
- {
- filter->SetInput( port->second.second, input_object );
- return( true );
- }
+ return( filter->SetInput( port->second.second, input_port ) );
else
return( false );
}