]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Workspace.cxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / Workspace.cxx
index 97c385485e475fc707ea0400969be55590e532aa..fb8f91e5f55361a8a33e23e1804eaf3d7bed2dff 100644 (file)
@@ -133,27 +133,14 @@ GetGraph( ) const
 bool cpPlugins::Interface::Workspace::
 CreateFilter( const std::string& filter, const std::string& name )
 {
-  std::cout << "wNAME: " << filter << " " << name << std::endl;
-
-  for(
-    auto i = this->m_Graph->BeginVertices( );
-    i != this->m_Graph->EndVertices( );
-    ++i
-    )
-    std::cout << "wOBJ: " << i->first << std::endl;
-  
-
   // Get or create new filter from name
   if( !( this->m_Graph->HasVertexIndex( name ) ) )
   {
-    std::cout << "wok" << std::endl;
-
     TFilter::Pointer f = this->m_Interface.CreateObject( filter );
     if( f.IsNotNull( ) )
     {
       f->SetName( name );
       TObject::Pointer o = f.GetPointer( );
-      o->Print( std::cout );
       this->m_Graph->InsertVertex( name, o );
       return( true );
     }
@@ -161,10 +148,7 @@ CreateFilter( const std::string& filter, const std::string& name )
       return( false );
   }
   else
-  {
-    std::cout << "wno" << std::endl;
     return( true );
-  }
 }
 
 // -------------------------------------------------------------------------
@@ -249,6 +233,16 @@ GetFilter( const std::string& name ) const
   return( f );
 }
 
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Workspace::
+HasFilter( const std::string& name ) const
+{
+  if( this->m_Graph->HasVertexIndex( name ) )
+    return( this->GetFilter( name ) != NULL );
+  else
+    return( false );
+}
+
 // -------------------------------------------------------------------------
 bool cpPlugins::Interface::Workspace::
 Reduce( const std::string& name )