]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkComplexBlackBox.cxx
Compiles de nuevo with no global factory
[bbtk.git] / kernel / src / bbtkComplexBlackBox.cxx
index ec6f1c313ff1ab39642e347903fa14ec081b6f98..8c54bc9d7f4715928ffe92ccd141045ccf278f26 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkComplexBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/02/05 13:23:46 $
-Version:   $Revision: 1.2 $
+Date:      $Date: 2008/03/07 10:21:30 $
+Version:   $Revision: 1.7 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See Doc/License.txt or
@@ -79,7 +79,7 @@ namespace bbtk
 
        BlackBox* bbfrom = bbGetBlackBox( (*j)->GetBlackBoxFrom()->bbGetName() );
        BlackBox* bbto = bbGetBlackBox( (*j)->GetBlackBoxTo()->bbGetName() );
-       Connection* c = /*mDescriptor->GetFactory()->Create*/ 
+       Connection* c = mDescriptor->GetFactory()-> 
          NewConnection( bbfrom, 
                         (*j)->GetBlackBoxFromOutput(), 
                         bbto, 
@@ -231,7 +231,7 @@ namespace bbtk
                        "ComplexBlackBox::bbExecute() ["
                        <<bbGetFullName()<<"]"<<std::endl);
 
-    wx::BeginBusyCursor();
+    Wx::BeginBusyCursor();
     
     if (mExecutionList.size() != 0) 
       {
@@ -254,7 +254,7 @@ namespace bbtk
          }
       } 
 
-    wx::EndBusyCursor();
+    Wx::EndBusyCursor();
     
     bbtkDebugDecTab("Process",1);
     
@@ -616,20 +616,22 @@ namespace bbtk
     restname = blackboxname.substr(lastPos+pos - lastPos+1, 999);
 
     if (restname==subname)
-      {
-       restname="";
-      }
+    {
+          restname="";
+    }
 
     BlackBoxMapType::iterator i = mBlackBoxMap.find(subname);
     if ( i == mBlackBoxMap.end() ) 
-      {
-       blackbox = NULL;
-      } else {
-      blackbox = i->second;
-      if (restname!="")
-       {
-         blackbox = blackbox->bbFindBlackBox(restname);
-       }
+    {
+          blackbox = NULL;
+    } 
+    else 
+    {
+       blackbox = i->second;
+       if (restname!="")
+           {
+            blackbox = blackbox->bbFindBlackBox(restname);
+           }
     }
     return blackbox;
   }
@@ -647,11 +649,11 @@ namespace bbtk
     std::string directory(output_dir);
 
     if (output_dir.length() == 0) 
-      {
-       // Don't pollute the file store with  "doc_tmp" directories ... 
-       std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_doc_tmp();
-       directory =  default_doc_dir + "/" + "doc_tmp";
-      }
+    {
+          // Don't pollute the file store with  "temp_dir" directories ... 
+          std::string default_temp_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
+          directory =  default_temp_dir + "/" + "temp_dir";
+    }
     
     std::string simplefilename  (this->bbGetTypeName()+"_"+this->bbGetName());
     std::string simplefilename_png (simplefilename+".png");
@@ -701,13 +703,13 @@ namespace bbtk
     char c;
     ff2=fopen(filename_cmap.c_str(),"r");
     while (!feof(ff2))
-      {
-       c=fgetc(ff2);
-       if (c!=-1)
-         {
-           (s) << c;
-         }
-      }
+    {
+          c=fgetc(ff2);
+          if (c!=-1)
+          {
+             (s) << c;
+          }
+    }
     (s) << "</map>\n\n";
     
     // End
@@ -728,38 +730,40 @@ namespace bbtk
     Package *package = this->bbGetDescriptor()->GetPackage(); 
 
     if (package!=NULL)
-      {
-       if (relative_link)
-         tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocRelativeURL();
-       else 
-         tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocURL();
-      
+    {
+      if (relative_link)
+            tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocRelativeURL();
+          else 
+            tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocURL();
+    } 
     else 
-      {
-       tmp1 = "Caspitas";
-      }
+    {
+          tmp1 = "Caspitas";
+    }
 
     std::string tmp2=bbGetTypeName();
     std::string url(tmp1 + "#" + tmp2 );       
     fprintf( ff , "subgraph cluster_%s_%p {\n",bbGetName().c_str(),this);
 
     if (!(   (bbGetTypeName()=="workspace") && (bbGetName()=="workspacePrototype")) )
-      {
-       fprintf( ff , "  URL = \"%s\" %s",url.c_str(),";");
-      }
+    {
+          fprintf( ff , "  URL = \"%s\" %s",url.c_str(),";");
+    }
 
     std::string boxname="["+bbGetTypeName()+"]";
     if (this!=parentblackbox)
-      {
-       if (detail==0)
-         {
-           boxname=bbGetName();
-         } else {
-         boxname = bbGetName();
-         boxname = boxname + "   [" +this->bbGetDescriptor()->GetPackage()->GetName()+"::"+ bbGetTypeName() + "]";
-       }
+    {
+       if (detail==0)
+           {
+          boxname=bbGetName();
+       } 
+       else 
+       {
+          boxname = bbGetName();
+          boxname = boxname + "   [" +this->bbGetDescriptor()->GetPackage()->GetName()+"::"+ bbGetTypeName() + "]";
+           }
 
-      }
+    }
     fprintf( ff , "  label = \"%s\"%s\n",  boxname.c_str() ,";");
 
 
@@ -949,7 +953,6 @@ namespace bbtk
            } // if second
        } // for
     } // if parentblackbox
-
   }
   //=========================================================================