]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Workspace.cxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / Workspace.cxx
index ab1891a1cd073859e0467c11e431e61677c50704..b37c2caa8b5c92d2418c6450515389847350f3a3 100644 (file)
@@ -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( ) )