]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBox.cxx
Always vs BlackBox::Always
[bbtk.git] / kernel / src / bbtkBlackBox.cxx
index c35e82c78a5bb50c0eb4df6267a87b5cdd9eb518..5e12c265b120b89a7d918e9d81d17d8d0f4e7568 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/01/21 16:03:17 $
-  Version:   $Revision: 1.49 $
+  Date:      $Date: 2011/03/01 14:50:28 $
+  Version:   $Revision: 1.50 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -48,8 +48,6 @@
 
 namespace bbtk
 {
-
-
   static bool bbmgSomeBoxExecuting = false;
   static bool bbmgFreezeExecution = false;
   static std::set<BlackBox::WeakPointer> bbmgExecutionList;
@@ -281,7 +279,6 @@ namespace bbtk
        bbGetOutputConnectorMap()[o->second->GetName()] 
          = new BlackBoxOutputConnector(GetThisPointer<BlackBox>());
       }
-
   }
   //=========================================================================
 
@@ -308,8 +305,7 @@ namespace bbtk
        delete (o->second);
       }                                                                        
    
-    bbtkDebugDecTab("kernel",8);  
-
+    bbtkDebugDecTab("kernel",8);
   }
   //=========================================================================
 
@@ -345,7 +341,6 @@ namespace bbtk
       }
 
     bbtkDebugDecTab("kernel",9);
-
   }
   //=========================================================================
 
@@ -358,7 +353,7 @@ namespace bbtk
 #ifdef USE_WXWIDGETS
             || Wx::IsSomeWindowAlive() 
 #endif
-            ); 
+            );
   }
   //=========================================================================
 
@@ -370,14 +365,14 @@ namespace bbtk
     const std::string& p = bbmBoxProcessMode;
     if ( (p == "0") ||
         (p == "P") || (p == "p") ||
-        (p == "Pipeline") || (p == "pipeline") ) return Pipeline;
+        (p == "Pipeline") || (p == "pipeline") ) return BlackBox::Pipeline;
     if ( (p == "1") ||
         (p == "A") || (p == "a") ||
-        (p == "Always") || (p == "always") ) return Always;
+        (p == "Always") || (p == "always") ) return BlackBox::Always;
     if ( (p == "2") ||
         (p == "R") || (p == "r") ||
         (p == "Reactive") || (p == "reactive") ) 
-               return Reactive;
+               return BlackBox::Reactive;
     /*
     if ( (p == "3") ||
         (p == "F") || (p == "f") ||
@@ -396,14 +391,14 @@ namespace bbtk
   //=========================================================================
   bool  BlackBox::bbBoxProcessModeIsReactive() const
   {
-    return (bbGetBoxProcessModeValue() == Reactive);
+    return (bbGetBoxProcessModeValue() == BlackBox::Reactive);
   }
   //=========================================================================
 
   //=========================================================================
   bool  BlackBox::bbBoxProcessModeIsAlways() const
   {
-    return (bbGetBoxProcessModeValue() == Always);
+    return (bbGetBoxProcessModeValue() == BlackBox::Always);
   }
   //=========================================================================
 
@@ -480,7 +475,7 @@ namespace bbtk
                             "=> BlackBox::bbSignalOutputModification("
                             <<reaction<<")"
                             <<"]"<<std::endl);
-    
+
     OutputConnectorMapType::iterator i;
     for ( i  = bbGetOutputConnectorMap().begin(); 
          i != bbGetOutputConnectorMap().end(); ++i) 
@@ -501,7 +496,6 @@ namespace bbtk
     bbtkBlackBoxDebugMessage("change",5,
                             "<= BlackBox::bbSignalOutputModification()"
                             <<std::endl);
-    
   }  
   //=========================================================================   
   //=========================================================================  
@@ -541,7 +535,6 @@ namespace bbtk
                             "<= BlackBox::bbSignalOutputModification("
                             <<output<<")"
                             <<std::endl);
-    
   }  
   //=========================================================================   
   //=========================================================================  
@@ -585,7 +578,6 @@ namespace bbtk
     bbtkBlackBoxDebugMessage("change",5,
                             "<= BlackBox::bbSignalOutputModification(vector of outputs)"
                             <<std::endl);
-
   }  
   //=========================================================================   
 
@@ -733,8 +725,7 @@ namespace bbtk
     bbSetExecuting(false);
     bbGlobalSetSomeBoxExecuting(wasExecuting);
 
-    return; 
-
+    return;
   }
   //=========================================================================
   
@@ -777,9 +768,7 @@ namespace bbtk
     
     bbtkBlackBoxDebugMessage("process",4,
                        "<= BlackBox::bbUpdateInputs()"
-                       <<std::endl);   
-    
-    
+                       <<std::endl);
     return s;
   }
   //=========================================================================
@@ -823,8 +812,7 @@ namespace bbtk
 
     bbtkBlackBoxDebugMessage("process",4,
                        "<= BlackBox::bbComputePostProcessStatus()"
-                       <<std::endl);   
-
+                       <<std::endl);
   }
   //==================================================================
 
@@ -836,7 +824,6 @@ namespace bbtk
                        <<name<<"\","<<c->GetFullName()<<")"
                        <<std::endl);       
 
-
     InputConnectorMapType::iterator i = bbGetInputConnectorMap().find(name);
     if (i==bbGetInputConnectorMap().end())
       {
@@ -845,12 +832,11 @@ namespace bbtk
     i->second->SetConnection(c);
     // The input *MUST* be set OUTOFDATE to update its input on next execution
     bbSetStatusAndPropagate(i->second,OUTOFDATE);
-    
+
     bbtkBlackBoxDebugMessage("connection",2,
                        "<== BlackBox::bbConnectInput(\""
                        <<name<<"\","<<c->GetFullName()<<")"
-                       <<std::endl);       
-
+                       <<std::endl);
   }
   //=========================================================================
 
@@ -862,7 +848,7 @@ namespace bbtk
                             "==> BlackBox::bbConnectOutput(\""<<name<<"\","
                             <<c->GetFullName()<<")"
                             <<std::endl);       
-    
+
     OutputConnectorMapType::iterator i = bbGetOutputConnectorMap().find(name);
     if (i==bbGetOutputConnectorMap().end())
       {
@@ -873,8 +859,7 @@ namespace bbtk
     bbtkBlackBoxDebugMessage("connection",2,
                             "<== BlackBox::bbConnectOutput(\""<<name<<"\","
                             <<c->GetFullName()<<")"
-                            <<std::endl);       
-
+                            <<std::endl);
   }
   //=========================================================================
 
@@ -886,8 +871,7 @@ namespace bbtk
     bbtkBlackBoxDebugMessage("connection",2,
                     "==> BlackBox::bbDisconnectInput(\""<<name
                     <<"\","<<c->GetFullName()<<")"
-                    <<std::endl);      
-
+                    <<std::endl);
     if (!c) 
       {