- // Sync outputs with this source
- for( unsigned int odx = 0; odx < this->m_Outputs.size( ); ++odx )
- this->m_Outputs[ odx ].SetSource( this );
+ } // fi
+}
+
+// -------------------------------------------------------------------------
+std::string cpPlugins::Interface::ProcessObject::
+Update( )
+{
+ std::string r = "";
+
+ // Force upstream updates
+ _TDataContainer::iterator i = this->m_Inputs.begin( );
+ for( ; i != this->m_Inputs.end( ) && r == ""; ++i )
+ {
+ if( i->second.IsNotNull( ) )
+ {
+ Self* src = dynamic_cast< Self* >( i->second->GetSource( ) );
+ if( src != NULL )
+ r = src->Update( );
+ }
+ else
+ r = "cpPlugins::Interface::ProcessObject: No input connected.";
+
+ } // rof
+
+ // Current update
+ if( r == "" )
+ r = this->_GenerateData( );
+
+ // Configure output names
+ auto oIt = this->m_Outputs.begin( );
+ for( ; oIt != this->m_Outputs.end( ); ++oIt )
+ {
+ auto nIt = this->m_OutputObjectsNames.find( oIt->first );
+ if( nIt != this->m_OutputObjectsNames.end( ) )
+ oIt->second->SetName( nIt->second );
+
+ } // rof
+
+ // Return error description, if any
+ return( r );