1 #include <cpPlugins/Interface/ProcessObject.h>
3 // -------------------------------------------------------------------------
4 const cpPlugins::Interface::Parameters&
5 cpPlugins::Interface::ProcessObject::
6 GetDefaultParameters( ) const
8 return( this->m_DefaultParameters );
11 // -------------------------------------------------------------------------
12 void cpPlugins::Interface::ProcessObject::
13 SetParameters( const cpPlugins::Interface::Parameters& params )
15 this->m_Parameters = params;
19 // -------------------------------------------------------------------------
20 unsigned int cpPlugins::Interface::ProcessObject::
21 GetNumberOfInputs( ) const
23 return( this->m_Inputs.size( ) );
26 // -------------------------------------------------------------------------
27 unsigned int cpPlugins::Interface::ProcessObject::
28 GetNumberOfOutputs( ) const
30 return( this->m_Outputs.size( ) );
33 // -------------------------------------------------------------------------
34 void cpPlugins::Interface::ProcessObject::
35 SetNumberOfInputs( unsigned int n )
37 this->m_Inputs.clear( );
38 this->m_Inputs.resize( n );
42 // -------------------------------------------------------------------------
43 void cpPlugins::Interface::ProcessObject::
44 SetNumberOfOutputs( unsigned int n )
46 this->m_Outputs.clear( );
47 this->m_Outputs.resize( n );
51 // -------------------------------------------------------------------------
52 void cpPlugins::Interface::ProcessObject::
53 SetInput( unsigned int idx, cpPlugins::Interface::DataObject* dobj )
55 if( idx < this->m_Inputs.size( ) )
57 this->m_Inputs[ idx ] = dobj;
63 // -------------------------------------------------------------------------
64 std::string cpPlugins::Interface::ProcessObject::
69 // Force upstream updates
70 for( unsigned int i = 0; i < this->m_Inputs.size( ) && r == ""; ++i )
72 Self* src = dynamic_cast< Self* >( this->m_Inputs[ i ]->GetSource( ) );
80 r = this->_GenerateData( );
82 // Return error description, if any
86 // -------------------------------------------------------------------------
87 void cpPlugins::Interface::ProcessObject::
90 for( unsigned int idx = 0; idx < this->m_Outputs.size( ); ++idx )
91 if( this->m_Outputs[ idx ].IsNotNull( ) )
92 this->m_Outputs[ idx ]->DisconnectPipeline( );
95 // -------------------------------------------------------------------------
96 cpPlugins::Interface::ProcessObject::
100 this->m_ClassName = "cpPlugins::Interface::ProcessObject";
101 this->m_ClassCategory = "BasicObject";
104 // -------------------------------------------------------------------------
105 cpPlugins::Interface::ProcessObject::