]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/ProcessObject.hxx
...
[cpPlugins.git] / lib / cpPlugins / ProcessObject.hxx
index 93d62bb483e0faf92ff5b3961dc51a6ab09ead4b..9be267531b9609ea78d08137dd516981f6cae717 100644 (file)
@@ -1,6 +1,30 @@
 #ifndef __CPPLUGINS__PROCESSOBJECT__HXX__
 #define __CPPLUGINS__PROCESSOBJECT__HXX__
 
+// -------------------------------------------------------------------------
+template< class _TType >
+_TType* cpPlugins::ProcessObject::
+GetInput( const std::string& id )
+{
+  auto i = this->m_Inputs.find( id );
+  if( i != this->m_Inputs.end( ) )
+    return( dynamic_cast< _TType* >( i->second.GetPointer( ) ) );
+  else
+    return( NULL );
+}
+
+// -------------------------------------------------------------------------
+template< class _TType >
+const _TType* cpPlugins::ProcessObject::
+GetInput( const std::string& id ) const
+{
+  auto i = this->m_Inputs.find( id );
+  if( i != this->m_Inputs.end( ) )
+    return( dynamic_cast< const _TType* >( i->second.GetPointer( ) ) );
+  else
+    return( NULL );
+}
+
 // -------------------------------------------------------------------------
 template< class _TType >
 _TType* cpPlugins::ProcessObject::