]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreter.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkInterpreter.cxx
index ef99c10124102b0eff4ff7487f1687dbadd26b44..62f523319641ce16d9e5e447d22207fcbd2ebc81 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/04/22 09:40:10 $
-  Version:   $Revision: 1.63 $
+  Date:      $Date: 2008/04/25 08:05:23 $
+  Version:   $Revision: 1.65 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -299,12 +299,12 @@ namespace bbtk
     info.help = "Shows a graphical view of a bbtk pipeline.\n- BlackBoxName : name of the box to view. Default '.' : current box.\n- BlackBoxNameType : name of the type of box to view, ex : 'workspace')";
     mCommandDict[info.keyword] = info;
 
-    info.keyword = "object";
+    info.keyword = "debug";
     info.argmin = 0;
     info.argmax = 1;
-    info.code = cObject;
-    info.syntax = "object <object name>";
-    info.help = "Provides debug info on object <object name>";
+    info.code = cDebug;
+    info.syntax = "debug [expr|-C|-D]";
+    info.help = "Prints debug info on living bbtk objects containing the string 'expr' (default expr=''). -C checks the factory integrity. -D turns on objects debug info after main ends";
     mCommandDict[info.keyword] = info;
 
     /*
@@ -591,28 +591,7 @@ namespace bbtk
       InterpretLine(line, insideComment);
     }
     CATCH_MACRO;
-    /*
-   catch (QuitException e) 
-      { 
-      status = Interpreter_QUIT;
-      }
-    catch (bbtk::Exception e) 
-      {
-       std::cerr << "* ERROR : "<<e.GetMessage()<<std::endl;
-       status = Interpreter_ERROR;
-      }
-    catch (std::exception& e) 
-      {
-       std::cerr << "* ERROR : "<<e.what()<<" (not in bbtk)"<<std::endl;
-       status = Interpreter_ERROR;
-    }  
-    catch (...)
-      {
-       std::cerr 
-         << "* UNDEFINED ERROR (not a bbtk nor a std exception)"<<std::endl;
-       status = Interpreter_ERROR;
-      }
-    */
+  
 
     bbtkDebugMessage("Interpreter",9,"EO Interpreter::InterpretLine()"
                     <<std::endl);
@@ -844,9 +823,9 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         throw QuitException();
         break;
 
-      case cObject :
-       if (words.size()==2) ObjectInfo(words[1]);
-       else ObjectInfo("");
+      case cDebug :
+       if (words.size()==2) Debug(words[1]);
+       else Debug("");
         break;
        /* obsolete
       case cWorkspace :
@@ -2055,11 +2034,11 @@ void  Interpreter::NewGUI(const std::string& boxname,
 
 
  //==========================================================================
-  void Interpreter::ObjectInfo(const std::string& name)
+  void Interpreter::Debug(const std::string& name)
   {
     if ((name.length()==2)&&(name[0]=='-'))
       {
-       if (name[1]=='S')
+       if (name[1]=='D')
          {
            bbtk::StaticInitTime::PrintObjectListInfo = true;
          }