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