]> Creatis software - bbtk.git/commitdiff
Some indentation
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 14 Feb 2008 20:26:54 +0000 (20:26 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 14 Feb 2008 20:26:54 +0000 (20:26 +0000)
kernel/src/bbtkExecuter.cxx
kernel/src/bbtkExecuter.h
kernel/src/bbtkInterpreter.cxx
packages/wx/bbs/appli/testSizerOrientation.bbs
packages/wx/src/bbwxRadioButton.cxx

index 7564baf85337198a81111d65f2c6478aef454ea2..144dfcf5e55514b53cf0fcaa93208605886f7fac 100644 (file)
@@ -3,13 +3,13 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/14 11:38:58 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/02/14 20:26:54 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
-                                                                                
+
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
      PURPOSE.  See the above copyright notices for more information.
@@ -35,7 +35,7 @@
 #include "bbtkConfigurationFile.h"
 
 namespace bbtk
-{  
+{
 /**
  *
  */
@@ -50,13 +50,14 @@ namespace bbtk
     bbtkDebugMessageInc("Kernel",9,"Executer::Executer()" <<std::endl);
     Reset();
     bbtkDebugDecTab("Kernel",9);
-  } 
+  }
 
 /**
  *
  */
   Executer::~Executer()
   {
+std::cout << "====================================================== delete Executer\n";  
      bbtkDebugMessageInc("Kernel",9,"Executer::~Executer()" <<std::endl);
      if (mRoot) 
      {
@@ -69,7 +70,7 @@ namespace bbtk
      }
      bbtkDebugDecTab("Kernel",9);
   }
-  
+
 
 /**
  *
@@ -89,7 +90,7 @@ namespace bbtk
        mPackage->UnRegisterBlackBox(mRoot->GetTypeName());
        delete mRoot;
     }
-    if (mPackage) 
+    if (mPackage)
     {
        GetGlobalFactory()->UnLoadPackage("user");
     }
@@ -125,16 +126,16 @@ namespace bbtk
      Package* p;
      try 
       {
-       p = GetGlobalFactory()->GetPackage(name);
+         p = GetGlobalFactory()->GetPackage(name);
       }
     catch (Exception e)
       {
-       p = new Package(name,
-                       "",
-                       "",
-                       "",
-                       BBTK_STRINGIFY_SYMBOL(BBTK_VERSION));
-       InsertPackage(p);
+         p = new Package(name,
+                         "",
+                         "",
+                         "",
+                         BBTK_STRINGIFY_SYMBOL(BBTK_VERSION));
+         InsertPackage(p);
       }
      mOpenPackage.push_back(p);
   }
@@ -145,11 +146,11 @@ namespace bbtk
   }
 
   void Executer::Define (const std::string &name,
-                        const std::string &pack,
-                        const std::string &scriptfilename)
+                         const std::string &pack,
+                         const std::string &scriptfilename)
   {
     bbtkDebugMessageInc("Kernel",9,"Executer::Define(\""<<name<<
-                       ","<<pack<<"\")" 
+                        ","<<pack<<"\")"
                         <<std::endl);
 
     ComplexBlackBoxDescriptor* b = new ComplexBlackBoxDescriptor(name);
@@ -178,7 +179,7 @@ namespace bbtk
     {
       try
       {
-           p = GetGlobalFactory()->GetPackage(pname);
+         p = GetGlobalFactory()->GetPackage(pname);
       }
       catch (Exception e)
       {
@@ -192,7 +193,7 @@ namespace bbtk
     }
     else
     {
-          p = mOpenPackage.back();
+       p = mOpenPackage.back();
     }
     p->RegisterBlackBox(Current());
 
@@ -216,7 +217,7 @@ namespace bbtk
 /**
  *
  */
-  void Executer::Connect (const std::string &nodeFrom, 
+  void Executer::Connect (const std::string &nodeFrom,
                           const std::string &outputLabel,
                           const std::string &nodeTo, 
                           const std::string &inputLabel)
@@ -276,7 +277,7 @@ namespace bbtk
            std::cin >> ans;
            Set(box,input,ans);
         }
-       #ifdef _USE_WXWIDGETS_
+#ifdef _USE_WXWIDGETS_
        // If the dialog mode is set to GraphicalDialog
        // A dialog box is pop up
        else if (mDialogMode == GraphicalDialog) 
@@ -321,7 +322,7 @@ namespace bbtk
 
     if ( b->bbGetInputType(input) !=  typeid(std::string) ) 
       {
-         BlackBox* a = /*mFactory->*/
+         BlackBox* a =
          NewAdaptor(typeid(std::string),
                     b->bbGetInputType(input),
                     "tmp");
@@ -354,7 +355,7 @@ namespace bbtk
     // Looks for the adaptor
     if (b->bbGetOutputType(output) != typeid(std::string)) 
       {
-      BlackBox* a = /*mFactory->*/
+      BlackBox* a =
           NewAdaptor(
              b->bbGetOutputType(output),
              typeid(std::string),
@@ -408,7 +409,7 @@ namespace bbtk
 
   /// prints the list of the boxes of the current descriptor
   void Executer::PrintBoxes()
-  {  
+  {
     bbtkMessageInc("Help",1,"The black box descriptor \""
                    <<Current()->GetTypeName()<<"\" contains : "<<std::endl);
     Current()->PrintBlackBoxes();
@@ -453,15 +454,14 @@ namespace bbtk
        relative_link = false;
       }
 
-
     Package* p;
     try
     {
-          p = GetGlobalFactory()->GetPackage(nameblackbox);
+       p = GetGlobalFactory()->GetPackage(nameblackbox);
     }
     catch (Exception e)
     {
-          p = mPackage;
+       p = mPackage;
     }
     // Generating documentation-help of workspace
     p->SetDocURL(filename_rootHtml);
@@ -473,12 +473,12 @@ namespace bbtk
     /*
     try 
     {
-         ShowGraphTypes(nameblackbox);
+       ShowGraphTypes(nameblackbox);
     }
     catch (bbtk::Exception a)
     {
-         std::cout <<"EXC"<<std::endl;
-         page = ShowGraphInstances(nameblackbox,detail,level,system_display);
+       std::cout <<"EXC"<<std::endl;
+       page = ShowGraphInstances(nameblackbox,detail,level,system_display);
     }
     */
     return page;
@@ -486,17 +486,17 @@ namespace bbtk
 
   /// Generate a png file with the actual pipeline (Graphviz-dot needed)
   std::string Executer::ShowGraphInstances(const std::string &nameblackbox, int detail, int level,
-                                   bool system_display)
+                                           bool system_display)
   {
 
     BlackBox* blackbox=NULL;
     if (nameblackbox==".")
     {
-         blackbox=Current()->GetPrototype();
+       blackbox=Current()->GetPrototype();
     }
     else
     {
-         blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox);
+       blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox);
     }
     
     std::string page;
index 0090fada1a4e141b9c1746b5e6954914ccc32064..ef109b365488bc5ad45441ad98d4384bfe64e184 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/06 10:53:02 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/02/14 20:26:54 $
+  Version:   $Revision: 1.9 $
                                                                                 
   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
     /// Sets the file name to use for the current definition
     /// (Used to set it after the Define command)
     void SetCurrentFileName (const std::string &name );
-    
+
     /// End the definition of a ComplexBlackBox
     void EndDefine ();
 
@@ -110,7 +110,7 @@ namespace bbtk
                       const std::string &box,
                       const std::string &output,
                       const std::string &help);     
-  
+
     /// sets the input of the box with the value
     void Set (const std::string &box, 
              const std::string &input, 
index 35572dfaf3f4f0be5a58c8e10ac55ba1b0f7b9c8..7a7e08b47b0c25fd9827e64d4a6c0b2995808f85 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/14 11:26:43 $
-  Version:   $Revision: 1.31 $
+  Date:      $Date: 2008/02/14 20:26:54 $
+  Version:   $Revision: 1.32 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -52,10 +52,12 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
  
     mGlobalInterpreter = this;
 
-    //    mFactory = new bbtk::Factory();
     mExecuter = new bbtk::Executer();
+    
+    // For the time being, comment out previous line, and
+    // uncomment next line to check Transcriptor
+
     //mExecuter = new bbtk::Transcriptor("GeneratedProgram.txt");
-    //mExecuter->SetFactory(mFactory);
 
     // Builds the commands dict
     CommandInfoType info;
@@ -536,7 +538,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
       case cMessage : 
         if (words.size()<3)
         {
-            bbtk::MessageManager::PrintInfo();
+           bbtk::MessageManager::PrintInfo();
         }
         else
         {
@@ -582,6 +584,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         break;
 
       case cQuit :
+        delete mExecuter;
         throw QuitException();
         break;
 
index 2eb0a1ea072d3d7738495076dd4c0b98c73491d0..ae19a00a76666704d9434dde68f6f65882a68e22 100644 (file)
@@ -5,7 +5,6 @@ category "test"
 load std
 load wx
 
-
 new Sizer main
  set main.Orientation H
 new Sizer Sizer2
index 19349f34cdec58c0968fcfc8bc2a461b68edbed4..f415c665bc522f22a75c161593b20f0e6637da60 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxRadioButton.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/12 09:21:23 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/02/14 20:26:54 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -95,7 +95,7 @@ namespace bbwx
     }
     sizer->AddGrowableCol(0);
     panel->SetSizer(sizer);
-    
+
 //    panel->SetAutoLayout(true);
 //    panel->Layout();