+bool cpPlugins::Interface::Workspace::
+Connect( TData* input_object, const std::string& input_name )
+{
+ auto port = this->m_ExposedInputPorts.find( input_name );
+ if( port != this->m_ExposedInputPorts.end( ) )
+ {
+ TFilter* filter = this->GetFilter( port->second.first );
+ if( filter != NULL )
+ {
+ filter->SetInput( port->second.second, input_object );
+ return( true );
+ }
+ else
+ return( false );
+ }
+ else
+ return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Workspace::
+Reduce( const std::string& name )
+{
+ return( false );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Workspace::
+ExposeInputPort(
+ const std::string& name,
+ const std::string& filter, const std::string& filter_input
+ )
+{
+ this->m_ExposedInputPorts[ name ] = TExposedPort( filter, filter_input );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Workspace::
+ExposeOutputPort(
+ const std::string& name,
+ const std::string& filter, const std::string& filter_output
+ )
+{
+ this->m_ExposedOutputPorts[ name ] = TExposedPort( filter, filter_output );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Workspace::
+HideInputPort( const std::string& name )
+{
+ auto i = this->m_ExposedInputPorts.find( name );
+ if( i != this->m_ExposedInputPorts.end( ) )
+ this->m_ExposedInputPorts.erase( i );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::Workspace::
+HideOutputPort( const std::string& name )
+{
+ auto i = this->m_ExposedOutputPorts.find( name );
+ if( i != this->m_ExposedOutputPorts.end( ) )
+ this->m_ExposedOutputPorts.erase( i );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Workspace::
+RenameExposedInputPort(
+ const std::string& old_name,
+ const std::string& new_name
+ )
+{
+ auto o = this->m_ExposedInputPorts.find( old_name );
+ auto n = this->m_ExposedInputPorts.find( new_name );
+ if(
+ o != this->m_ExposedInputPorts.end( ) &&
+ n == this->m_ExposedInputPorts.end( )
+ )
+ {
+ this->m_ExposedInputPorts[ new_name ] = o->second;
+ this->m_ExposedInputPorts.erase( o );
+ }
+ else
+ return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Workspace::
+RenameExposedOutputPort(
+ const std::string& old_name,
+ const std::string& new_name
+ )
+{
+ auto o = this->m_ExposedOutputPorts.find( old_name );
+ auto n = this->m_ExposedOutputPorts.find( new_name );
+ if(
+ o != this->m_ExposedOutputPorts.end( ) &&
+ n == this->m_ExposedOutputPorts.end( )
+ )
+ {
+ this->m_ExposedOutputPorts[ new_name ] = o->second;
+ this->m_ExposedOutputPorts.erase( o );
+ }
+ else
+ return( false );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::Interface::Workspace::
+TExposedPorts& cpPlugins::Interface::Workspace::
+GetExposedInputPorts( ) const
+{
+ return( this->m_ExposedInputPorts );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::Interface::Workspace::
+TExposedPorts& cpPlugins::Interface::Workspace::
+GetExposedOutputPorts( ) const
+{
+ return( this->m_ExposedOutputPorts );
+}
+
+// -------------------------------------------------------------------------
+/* TODO