cpPlugins::Workspace::
Workspace( )
: m_Interface( NULL ),
+ m_PrintExecution( false ),
m_MPRViewer( NULL )
{
this->m_Graph = TGraph::New( );
return( f );
}
+// -------------------------------------------------------------------------
+cpPlugins::DataObject* cpPlugins::Workspace::
+GetOutput( const std::string& filter, const std::string& output )
+{
+ auto f = this->GetFilter( filter );
+ if( f != NULL )
+ return( f->GetOutput( output ) );
+ else
+ return( NULL );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::DataObject* cpPlugins::Workspace::
+GetOutput( const std::string& filter, const std::string& output ) const
+{
+ auto f = this->GetFilter( filter );
+ if( f != NULL )
+ return( f->GetOutput( output ) );
+ else
+ return( NULL );
+}
+
// -------------------------------------------------------------------------
bool cpPlugins::Workspace::
HasFilter( const std::string& name ) const
// Get or create new filter from name
if( !( this->m_Graph->HasVertexIndex( name ) ) )
{
- ProcessObject::Pointer f =
- this->m_Interface->Create( category, filter );
+ ProcessObject::Pointer f = this->m_Interface->Create( category, filter );
if( f.IsNotNull( ) )
{
if( f->IsInteractive( ) )
f->SetInteractionObjects( interactive_objects );
} // fi
+ f->SetPrintExecution( this->m_PrintExecution );
Object::Pointer o = f.GetPointer( );
this->m_Graph->SetVertex( name, o );
void cpPlugins::Workspace::
SetPrintExecution( bool b )
{
+ this->m_PrintExecution = b;
auto vIt = this->m_Graph->BeginVertices( );
for( ; vIt != this->m_Graph->EndVertices( ); ++vIt )
{
return( false );
// Real connection
- if( dest->SetInput( input_name, orig->GetOutput( output_name ) ) )
+ if( dest->SetInputPort( input_name, orig->GetOutputPort( output_name ) ) )
{
this->m_Graph->AddEdge(
orig_filter, dest_filter,
{
ProcessObject* filter = this->GetFilter( i->second.first );
if( filter != NULL )
- return( filter->SetInput( i->second.second, port ) );
+ return( filter->SetInputPort( i->second.second, port ) );
else
return( false );
}
{
ProcessObject* filter = this->GetFilter( i->second.first );
if( filter != NULL )
- return( filter->GetOutput( i->second.second ) );
+ return( filter->GetOutputPort( i->second.second ) );
} // fi
return( null_port );
{
const ProcessObject* filter = this->GetFilter( i->second.first );
if( filter != NULL )
- return( filter->GetOutput( i->second.second ) );
+ return( filter->GetOutputPort( i->second.second ) );
} // fi
return( null_port );