]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBox.cxx
#3301 BBTK Bug New Normal - SurfaceTexture
[bbtk.git] / kernel / src / bbtkBlackBox.cxx
index 6fb1fb83a9c749dfce3cc545269c3f0773ad71bf..dbab39b7cb736c860741938d46adec180e771bb6 100644 (file)
@@ -55,8 +55,8 @@
 
 namespace bbtk
 {
-  static bool bbmgSomeBoxExecuting = false;
-  static bool bbmgFreezeExecution = false;
+  static bool bbmgSomeBoxExecuting     = false;
+  static bool bbmgFreezeExecution      = false;
   static std::set<BlackBox::WeakPointer> bbmgExecutionList;
 
   //=========================================================================
@@ -93,14 +93,10 @@ namespace bbtk
        if (!pack.expired()) 
          {
            Package::ReleaseBlackBoxDescriptor(pack,desc);
-         }
-       else 
-         {
+         }     else {
            bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : descriptor package expired (was not held by a package and the box was the last instance)"<<std::endl);
          }
-      }
-    else
-      {
+      } else {
        bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : descriptor expired : nothing to do (was not held by a package or the box is a complex black box prototype)"<<std::endl);
       }
     bbtkDebugMessage("object",2,"<## BlackBox::Deleter(\""<<name<<"\")"<<std::endl);
@@ -707,19 +703,18 @@ namespace bbtk
   //=========================================================================
   void BlackBox::bbRecursiveExecute( Connection::Pointer caller )
   {
-
     bbtkBlackBoxDebugMessage("process",3,
                        "=> BlackBox::bbRecursiveExecute("
                        <<(caller?caller->GetFullName():"0")<<")"
                        <<std::endl);
 
     // If already executing : return
-    if (bbGetExecuting()) 
-      {
-       bbtkBlackBoxDebugMessage("process",3,
+       if (bbGetExecuting()) 
+       {
+               bbtkBlackBoxDebugMessage("process",3,
                         " -> already executing : abort"<<std::endl);
-       return; 
-      }
+               return; 
+       }
     
     // If not initialized do it
     bbInitializeProcessing();
@@ -755,7 +750,9 @@ namespace bbtk
                           ( (bbBoxProcessModeIsManual()==true)&&(bbLetRecursiveExecuteManualMode==true) ) 
                         )
                        {
+//printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() );
                                this->bbProcess();              
+//printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() );
                    } // Manual analysis
                  
 //EED ups                      if ((bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false))
@@ -766,9 +763,7 @@ namespace bbtk
                  
                  // Update the I/O statuses
                  bbComputePostProcessStatus();
-      }
-    else 
-      {
+      }  else  {
        // Test output status...
        OutputConnectorMapType::iterator o;
        for ( o = bbGetOutputConnectorMap().begin(); 
@@ -780,11 +775,11 @@ namespace bbtk
                            <<"all inputs are Up-to-date but output '"
                            <<o->first<<"' is Out-of-date ???");
              }
-         }
+         } // for
        
         bbtkBlackBoxDebugMessage("process",3," -> Up-to-date : nothing to do"
                         <<std::endl);
-      }
+      } // if
 
     // Shows the window if the black box has one
     this->bbShowWindow(); 
@@ -797,7 +792,6 @@ namespace bbtk
     bbSetExecuting(false);
     bbGlobalSetSomeBoxExecuting(wasExecuting);
 
-
     return;
   }
   //=========================================================================