]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/ProcessObject.hxx
...
[cpPlugins.git] / lib / cpPlugins / ProcessObject.hxx
index 9be267531b9609ea78d08137dd516981f6cae717..99954d49560a4a74e7c8eeb15219dfdcb4355173 100644 (file)
@@ -85,6 +85,22 @@ GetOutputData( const std::string& name )
     return( NULL );
 }
 
+// -------------------------------------------------------------------------
+template< class _TType >
+bool cpPlugins::ProcessObject::
+SetInput( const std::string& id, _TType* obj )
+{
+  auto i = this->m_Inputs.find( id );
+  if( i != this->m_Inputs.end( ) )
+  {
+    i->second = obj;
+    this->Modified( );
+    return( true );
+  }
+  else
+    return( false );
+}
+
 // -------------------------------------------------------------------------
 template< class O >
 void cpPlugins::ProcessObject::