]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkUserBlackBox.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkUserBlackBox.h
index a716cc6681a8a8a7ff7b66e40658e47f8b13561b..900fc082574bee1ad654dbdd27464c8a95affcd9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkUserBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/01/22 15:02:00 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/01/22 15:41:34 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -83,31 +83,26 @@ namespace bbtk
     /// First checks that re-processing is needed (either Status==MODIFIED or InputProcessMode==Always)
     /// then : 
     /// - updates its inputs by calling bbUpdateInputs (which recursively calls bbBackwardUpdate on amont boxes)
-    /// - calls bbCreateWidget
-    /// - calls bbProcess which is the user callback which does the actual processing
-    /// - calls bbUpdateChildren
-    /// - calls bbShowWidget which shows the widget associated to the box (if any)
+    /// - calls bbProcess which here simply calls the user callback bbUserProcess which does the actual processing. 
+    ///    bbProcess is overloaded in WxBlackBox to handle widget creation and show
     IOStatus bbBackwardUpdate(Connection* caller);
     //==================================================================
 
     //==================================================================
-    /// Recursive pipeline processing in forward direction along "Child"-"Parent" connections
-    /// 
-    /// First checks that re-processing is needed (either Status==MODIFIED or InputProcessMode==Always)
-    /// then : 
-    /// - calls bbCreateWidget
-    /// - calls bbProcess which is the user callback which does the actual processing
-    /// - calls bbUpdateChildren which recursively calls bbForwardUpdate on connections attached the "Child" output
-    // void bbForwardUpdate(Connection* caller);
-    //==================================================================
   protected:
+    //==================================================================
+    /// Calls the user defined processing method.
+    /// Overloaded in WxBlackBox to handle widget creation and show
+    virtual void bbProcess() { this->bbUserProcess(); }
+    //==================================================================
+
     //==================================================================
     /// User callback which computes the outputs as a function of the inputs. 
     /// It is assumed to be deterministic and thus is only called is the inputs have changed 
     /// (i.e. if the black box is marked as modified)
-    virtual void bbProcess() 
+    virtual void bbUserProcess() 
     {
-      bbtkWarning("UserBlackBox::bbProcess() not overloaded for box '"
+      bbtkWarning("UserBlackBox::bbUserProcess() not overloaded for box '"
                  <<bbGetFullName()
                  <<"' : the box does nothing. Is it a bug or a feature ?"
                  <<std::endl);