X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FWorkspace.cxx;h=b37c2caa8b5c92d2418c6450515389847350f3a3;hb=1b600247da314fe62d007ca8a0ce24d0006931f4;hp=ab1891a1cd073859e0467c11e431e61677c50704;hpb=7caa01f9eacc4861ba7d5d9ed16872d60328088f;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Workspace.cxx b/lib/cpPlugins/Interface/Workspace.cxx index ab1891a..b37c2ca 100644 --- a/lib/cpPlugins/Interface/Workspace.cxx +++ b/lib/cpPlugins/Interface/Workspace.cxx @@ -106,11 +106,12 @@ HasFilter( const std::string& name ) const } // ------------------------------------------------------------------------- -bool cpPlugins::Interface::Workspace:: +cpPlugins::Interface::Workspace:: +TFilter* cpPlugins::Interface::Workspace:: CreateFilter( const std::string& filter, const std::string& name ) { if( this->m_Plugins == NULL ) - return( false ); + return( NULL ); // Get or create new filter from name if( !( this->m_Graph->HasVertexIndex( name ) ) ) @@ -124,13 +125,12 @@ CreateFilter( const std::string& filter, const std::string& name ) TObject::Pointer o = f.GetPointer( ); this->m_Graph->SetVertex( name, o ); - return( true ); - } - else - return( false ); + + } // fi + return( f.GetPointer( ) ); } else - return( true ); + return( this->GetFilter( name ) ); } // ------------------------------------------------------------------------- @@ -211,7 +211,7 @@ Connect( return( false ); // Real connection - dest->SetInput( input_name, orig->GetOutput< TData >( output_name ) ); + dest->SetInput( input_name, orig->GetOutputPort( output_name ) ); this->m_Graph->AddEdge( orig_filter, dest_filter, TConnection( output_name, input_name ) @@ -221,7 +221,7 @@ Connect( // ------------------------------------------------------------------------- bool cpPlugins::Interface::Workspace:: -Connect( TData* input_object, const std::string& input_name ) +Connect( TData::Pointer* input_object, const std::string& input_name ) { auto port = this->m_ExposedInputPorts.find( input_name ); if( port != this->m_ExposedInputPorts.end( ) )