X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FProcessObject.hxx;h=f84d4a6301e202cf44bfbb95fb8b0e4b9b7a4bb2;hb=a3f2018cdd92e865082fed86673f10207c21ec51;hp=7b4e080c5245aec6ab6aafc80c9d6ee43e4ab807;hpb=a3cae0375976d524c957493a3cc565b9f5b20bce;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/ProcessObject.hxx b/lib/cpPlugins/Interface/ProcessObject.hxx index 7b4e080..f84d4a6 100644 --- a/lib/cpPlugins/Interface/ProcessObject.hxx +++ b/lib/cpPlugins/Interface/ProcessObject.hxx @@ -1,21 +1,10 @@ #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__ #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__ -// ------------------------------------------------------------------------- -template< class O > -void cpPlugins::Interface::ProcessObject:: -_MakeOutput( unsigned int idx ) -{ - if( idx >= this->m_Outputs.size( ) ) - return; - this->m_Outputs[ idx ] = O::New( ); - this->m_Outputs[ idx ]->SetSource( this ); -} - // ------------------------------------------------------------------------- template< class T > T* cpPlugins::Interface::ProcessObject:: -_Input( unsigned int idx ) +GetInput( unsigned int idx ) { if( idx < this->m_Inputs.size( ) ) return( dynamic_cast< T* >( this->m_Inputs[ idx ].GetPointer( ) ) ); @@ -26,10 +15,12 @@ _Input( unsigned int idx ) // ------------------------------------------------------------------------- template< class T > const T* cpPlugins::Interface::ProcessObject:: -_Input( unsigned int idx ) const +GetInput( unsigned int idx ) const { if( idx < this->m_Inputs.size( ) ) - return( dynamic_cast< const T* >( this->m_Inputs[ idx ].GetPointer( ) ) ); + return( + dynamic_cast< const T* >( this->m_Inputs[ idx ].GetPointer( ) ) + ); else return( NULL ); } @@ -37,7 +28,7 @@ _Input( unsigned int idx ) const // ------------------------------------------------------------------------- template< class T > T* cpPlugins::Interface::ProcessObject:: -_Output( unsigned int idx ) +GetOutput( unsigned int idx ) { if( idx < this->m_Outputs.size( ) ) return( dynamic_cast< T* >( this->m_Outputs[ idx ].GetPointer( ) ) ); @@ -48,14 +39,27 @@ _Output( unsigned int idx ) // ------------------------------------------------------------------------- template< class T > const T* cpPlugins::Interface::ProcessObject:: -_Output( unsigned int idx ) const +GetOutput( unsigned int idx ) const { if( idx < this->m_Outputs.size( ) ) - return( dynamic_cast< const T* >( this->m_Outputs[ idx ].GetPointer( ) ) ); + return( + dynamic_cast< const T* >( this->m_Outputs[ idx ].GetPointer( ) ) + ); else return( NULL ); } +// ------------------------------------------------------------------------- +template< class O > +void cpPlugins::Interface::ProcessObject:: +_MakeOutput( unsigned int idx ) +{ + if( idx >= this->m_Outputs.size( ) ) + return; + this->m_Outputs[ idx ] = O::New( ); + this->m_Outputs[ idx ]->SetSource( this ); +} + #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__ // eof - $RCSfile$