auto i = this->m_Inputs.find( id );
if( i != this->m_Inputs.end( ) )
{
- i->second = port;
- this->Modified( );
+ if( i->second.GetPointer( ) != port.GetPointer( ) )
+ {
+ i->second = port;
+ this->Modified( );
+
+ } // fi
return( true );
}
else
{
auto params_time = this->m_Parameters->GetMTime( );
auto filter_time = this->Superclass::GetMTime( );
- auto ipobj = this->GetITK< itk::ProcessObject >( );
- if( ipobj == NULL )
- {
- auto vpobj = this->GetVTK< vtkAlgorithm >( );
- if( vpobj != NULL )
- filter_time = ( const_cast< vtkAlgorithm* >( vpobj ) )->GetMTime( );
- }
- else
- filter_time = ipobj->GetMTime( );
- return( ( params_time < filter_time )? filter_time: params_time );
+ return( ( params_time < filter_time )? params_time: filter_time );
}
// -------------------------------------------------------------------------
std::string cpPlugins::Interface::ProcessObject::
Update( )
{
- static
std::string r = "";
// Force upstream updates
- _TDataContainer::iterator i = this->m_Inputs.begin( );
+ auto i = this->m_Inputs.begin( );
bool need_to_update = false;
for( ; i != this->m_Inputs.end( ) && r == ""; ++i )
{
r = src->Update( );
} // fi
- }
- else
- r = "cpPlugins::Interface::ProcessObject: No input connected.";
+
+ } // fi
} // rof
typedef typename _TDataContainer::value_type _TValue;
auto i = this->m_Inputs.find( name );
if( i == this->m_Inputs.end( ) )
+ {
i = this->m_Inputs.insert( _TValue( name, NULL ) ).first;
+ this->Modified( );
+
+ } // fi
}
// eof - $RCSfile$