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 );
}
return( false );
}
else
- {
- std::cout << "wno" << std::endl;
return( true );
- }
}
// -------------------------------------------------------------------------
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 )