]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/ProcessObject.hxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / ProcessObject.hxx
index 6dcbb7de08ddfe6f7024b859096032ebe449e7bb..7b4e080c5245aec6ab6aafc80c9d6ee43e4ab807 100644 (file)
@@ -12,6 +12,50 @@ _MakeOutput( unsigned int idx )
   this->m_Outputs[ idx ]->SetSource( this );
 }
 
+// -------------------------------------------------------------------------
+template< class T >
+T* cpPlugins::Interface::ProcessObject::
+_Input( unsigned int idx )
+{
+  if( idx < this->m_Inputs.size( ) )
+    return( dynamic_cast< T* >( this->m_Inputs[ idx ].GetPointer( ) ) );
+  else
+    return( NULL );
+}
+
+// -------------------------------------------------------------------------
+template< class T >
+const T* cpPlugins::Interface::ProcessObject::
+_Input( unsigned int idx ) const
+{
+  if( idx < this->m_Inputs.size( ) )
+    return( dynamic_cast< const T* >( this->m_Inputs[ idx ].GetPointer( ) ) );
+  else
+    return( NULL );
+}
+
+// -------------------------------------------------------------------------
+template< class T >
+T* cpPlugins::Interface::ProcessObject::
+_Output( unsigned int idx )
+{
+  if( idx < this->m_Outputs.size( ) )
+    return( dynamic_cast< T* >( this->m_Outputs[ idx ].GetPointer( ) ) );
+  else
+    return( NULL );
+}
+
+// -------------------------------------------------------------------------
+template< class T >
+const T* cpPlugins::Interface::ProcessObject::
+_Output( unsigned int idx ) const
+{
+  if( idx < this->m_Outputs.size( ) )
+    return( dynamic_cast< const T* >( this->m_Outputs[ idx ].GetPointer( ) ) );
+  else
+    return( NULL );
+}
+
 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__
 
 // eof - $RCSfile$