]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/ProcessObject.h
...
[cpPlugins.git] / lib / cpPlugins / ProcessObject.h
index b0a6a71162901fd8f29f6408b9baf1cbeb7475ba..908fd92f6a979f592dec46612f02e61d52f55ff4 100644 (file)
@@ -24,6 +24,12 @@ namespace cpPlugins
     itkTypeMacro( ProcessObject, Object );
     cpPlugins_Id_Macro( ProcessObject, Object );
 
+    itkBooleanMacro( PrintExecution );
+    itkGetConstMacro( LastExecutionSpan, long );
+    itkGetConstMacro( PrintExecution, bool );
+    itkSetMacro( PrintExecution, bool );
+    itkSetObjectMacro( PrintExecutionStream, std::ofstream );
+
   public:
     Parameters* GetParameters( );
     const Parameters* GetParameters( ) const;
@@ -52,8 +58,9 @@ namespace cpPlugins
     void Disconnect( );
 
     // Pipeline execution
+    virtual void Modified( ) const ITK_OVERRIDE;
     virtual itk::ModifiedTimeType GetMTime( ) const ITK_OVERRIDE;
-    virtual std::string Update( );
+    virtual void Update( );
 
     // Qt dialog creation
     virtual ParametersQtDialog* CreateQtDialog( );
@@ -65,6 +72,7 @@ namespace cpPlugins
     virtual ~ProcessObject( );
 
     void _AddInput( const std::string& name, bool required = true );
+    void _Error( const std::string& error );
 
     template< class O >
       inline void _AddOutput( const std::string& name );
@@ -74,7 +82,7 @@ namespace cpPlugins
     template< class F >
       inline F* _CreateVTK( );
 
-    virtual std::string _GenerateData( ) = 0;
+    virtual void _GenerateData( ) = 0;
 
   private:
     // Purposely not implemented
@@ -90,7 +98,10 @@ namespace cpPlugins
     _TOutputs m_Outputs;
 
     itk::ModifiedTimeType m_LastExecutionTime;
-    long m_LastExecutionSpan;
+    mutable long m_LastExecutionSpan;
+
+    bool m_PrintExecution;
+    std::ostream* m_PrintExecutionStream;
   };
 
 } // ecapseman