X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FWorkspace.cxx;h=a65aec6dcce66bf027a0a7ec0aadbc8968142e35;hb=b6c7e73ebcce23619daced67f85d9e1364b33f30;hp=437b03793ed9addc12481385c8bbeca5c8e5305d;hpb=8ad95abe02b030bef4c1da5e827a5309c560aea2;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Workspace.cxx b/lib/cpPlugins/Interface/Workspace.cxx index 437b037..a65aec6 100644 --- a/lib/cpPlugins/Interface/Workspace.cxx +++ b/lib/cpPlugins/Interface/Workspace.cxx @@ -339,6 +339,42 @@ GetExposedOutputPorts( ) const return( this->m_ExposedOutputPorts ); } +// ------------------------------------------------------------------------- +cpPlugins::Interface:: +OutputProcessObjectPort& cpPlugins::Interface::Workspace:: +GetExposedOutput( const std::string& name ) +{ + static OutputProcessObjectPort null_port; + + auto i = this->m_ExposedOutputPorts.find( name ); + if( i != this->m_ExposedOutputPorts.end( ) ) + { + TFilter* filter = this->GetFilter( i->second.first ); + if( filter != NULL ) + return( filter->GetOutput( i->second.second ) ); + + } // fi + return( null_port ); +} + +// ------------------------------------------------------------------------- +const cpPlugins::Interface:: +OutputProcessObjectPort& cpPlugins::Interface::Workspace:: +GetExposedOutput( const std::string& name ) const +{ + static const OutputProcessObjectPort null_port; + + auto i = this->m_ExposedOutputPorts.find( name ); + if( i != this->m_ExposedOutputPorts.end( ) ) + { + const TFilter* filter = this->GetFilter( i->second.first ); + if( filter != NULL ) + return( filter->GetOutput( i->second.second ) ); + + } // fi + return( null_port ); +} + // ------------------------------------------------------------------------- std::string cpPlugins::Interface::Workspace:: Execute( )