// -------------------------------------------------------------------------
bool cpPlugins::Interface::ProcessObject::
-SetInput( const std::string& id, cpPlugins::Interface::DataObject* dobj )
+SetInput(
+ const std::string& id, cpPlugins::Interface::DataObject::Pointer* dobj
+ )
{
_TDataContainer::iterator i = this->m_Inputs.find( id );
if( i != this->m_Inputs.end( ) )
_TDataContainer::iterator i = this->m_Inputs.begin( );
for( ; i != this->m_Inputs.end( ) && r == ""; ++i )
{
- if( i->second.IsNotNull( ) )
+ if( i->second->IsNotNull( ) )
{
- Self* src = dynamic_cast< Self* >( i->second->GetSource( ) );
+ Self* src = dynamic_cast< Self* >( ( *( i->second ) )->GetSource( ) );
if( src != NULL )
r = src->Update( );
}
{
_TDataContainer::iterator i = this->m_Outputs.begin( );
for( ; i != this->m_Outputs.end( ); ++i )
- if( i->second.IsNotNull( ) )
- i->second->DisconnectPipeline( );
+ if( i->second->IsNotNull( ) )
+ ( *( i->second ) )->DisconnectPipeline( );
}
// -------------------------------------------------------------------------
if( this->m_ParametersDialog != NULL )
delete this->m_ParametersDialog;
#endif // cpPlugins_Interface_QT4
+
+ /*
+ auto iIt = this->m_Inputs.begin( );
+ for( ; iIt != this->m_Inputs.end( ); ++iIt )
+ delete iIt->second;
+ this->m_Inputs.clear( );
+ */
+
+ auto oIt = this->m_Outputs.begin( );
+ for( ; oIt != this->m_Outputs.end( ); ++oIt )
+ delete oIt->second;
+ this->m_Outputs.clear( );
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::ProcessObject::
_AddInput( const std::string& name )
{
- this->m_Inputs[ name ] = NULL;
- this->Modified( );
+ auto i = this->m_Inputs.find( name );
+ if( i == this->m_Inputs.end( ) )
+ {
+ this->m_Inputs[ name ] = NULL;
+ this->Modified( );
+
+ } // fi
}
// eof - $RCSfile$