]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBox.cxx
MagicBox : support of data synchronization + various related fixes
[bbtk.git] / kernel / src / bbtkBlackBox.cxx
index a4dea22c8624d2e0959d574c573799a54122dd72..8be7d01d0e3a283d659957fcf63f6284a8dbb7ba 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/12/11 15:30:04 $
-  Version:   $Revision: 1.38 $
+  Date:      $Date: 2009/03/30 14:42:16 $
+  Version:   $Revision: 1.41 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -54,6 +54,7 @@ namespace bbtk
   static std::set<BlackBox::WeakPointer> bbmgExecutionList;
 
   //=========================================================================
+
   BlackBox::Deleter::Deleter()
   {
   }
@@ -78,7 +79,7 @@ namespace bbtk
     
     b->bbDelete();
 
-    bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : releasing descriptor ["<<desc.lock()<<"]"<<std::endl);
+    bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : releasing descriptor"<<std::endl);
     
     if (!desc.expired()) 
       {
@@ -382,11 +383,18 @@ namespace bbtk
     if ( (p == "2") ||
         (p == "R") || (p == "r") ||
         (p == "Reactive") || (p == "reactive") ) return Reactive;
+    /*
+    if ( (p == "3") ||
+        (p == "F") || (p == "f") ||
+        (p == "Flash") || (p == "flash") ) return Flash;
+    */
     bbtkError(bbGetFullName()<<" : BoxProcessMode value '"<<p
              <<"' unknown. Possible values : "
              <<"'0'/'P'/'p'/'Pipeline'/'pipeline' | "
              <<"'1'/'A'/'a'/'Always'/'always' | "
-             <<"'2'/'R'/'r'/'Reactive'/'reactive'"<<std::endl);
+             <<"'2'/'R'/'r'/'Reactive'/'reactive'"
+             //      <<"'3'/'F'/'f'/'Flash'/'flash'"
+             <<std::endl);
   }
   //=========================================================================
   
@@ -545,6 +553,15 @@ namespace bbtk
 
     if (s==UPTODATE) bbtkError("bbSetStatusAndPropagate with status UPTODATE!");
     c->SetStatus(s);
+
+    // Flash reaction
+    /*
+    if (bbGetBoxProcessModeValue() == Flash)
+      {
+       this->bbExecute();
+      }
+    */
+
     OutputConnectorMapType::const_iterator o;  
     for ( o = bbGetOutputConnectorMap().begin(); 
          o != bbGetOutputConnectorMap().end(); ++o )                   
@@ -754,21 +771,23 @@ namespace bbtk
     bool wasExecuting = bbGlobalGetSomeBoxExecuting();
     bbGlobalSetSomeBoxExecuting(true);
 
+       this->bbCreateWidget();
+
     // Updates its inputs
     IOStatus s = bbUpdateInputs();
     
     if ( (s != UPTODATE) ||
         bbBoxProcessModeIsAlways() )
       {
-       // Displays the window (WxBlackbox)
-       //      bbShowWindow(caller);
+         // Displays the window (WxBlackbox)
+         //    bbShowWindow(caller);
 
-       // Actual processing (virtual)
-       this->bbProcess();
+         // Actual processing (virtual)
+         this->bbProcess();
        
        
-       // Update the I/O statuses
-       bbComputePostProcessStatus();
+         // Update the I/O statuses
+         bbComputePostProcessStatus();
       }
     else 
       {
@@ -790,6 +809,9 @@ namespace bbtk
                         <<std::endl);
       }
 
+         this->bbShowWidget(); 
+
+         
     bbtkDebugMessage("process",3,
             "<= BlackBox::bbRecursiveExecute() ["
             <<bbGetFullName()<<"]"<<std::endl);