]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Fri, 25 Apr 2008 08:05:22 +0000 (08:05 +0000)
committerguigues <guigues>
Fri, 25 Apr 2008 08:05:22 +0000 (08:05 +0000)
kernel/appli/bbi/bbi.cxx
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkInterpreter.h
kernel/src/bbtkObject.cxx

index 03380f0a33bd12dce14a15e6321b56be0fdeb5ed..48951bd0d4ebf2d52096a72d60708769ab9ad50a 100644 (file)
 
 static const wxCmdLineEntryDesc cmdLineDesc[] =
 {
-  { wxCMD_LINE_SWITCH, _T("M"), _T("Memory debug"), _T("Display memory debug message on exit ('object -S')") },
-  { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("all messages on ('message all 9')") },
-  { wxCMD_LINE_SWITCH, _T("c"), _T("console"), _T("open a console") },
-  { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"),   _T("be quiet ('message max 0')") },
-  { wxCMD_LINE_SWITCH, _T("h"), _T("help"),   _T("print help on bbi or on workspace defined if any") },
-  { wxCMD_LINE_SWITCH, _T("g"), _T("graphical-dialog"),   _T("prompts the user for the parameter values using graphical dialog") },
-  { wxCMD_LINE_SWITCH, _T("t"), _T("text-dialog"),   _T("prompts the user for the parameter values in text mode") },
-  { wxCMD_LINE_SWITCH, _T("N"), _T("no-console"),   _T("do not show console (even on error)") },
-  { wxCMD_LINE_PARAM,  NULL, NULL, _T("input_file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
+  { wxCMD_LINE_SWITCH, _T("h"), _T("help"),   _T("print this help or help on the application defined in input bbs file if any") },
+  { wxCMD_LINE_SWITCH, _T("g"), _T("graphical-dialog"),   _T("prompt the input parameter values using graphical dialog") },
+  { wxCMD_LINE_SWITCH, _T("t"), _T("text-dialog"),   _T("prompt the input parameter values in text mode") },
+  { wxCMD_LINE_SWITCH, _T("c"), _T("console"), _T("open bbi console") },
+  { wxCMD_LINE_SWITCH, _T("N"), _T("no-console"),   _T("never open bbi console even on error") },
+  { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"),   _T("be quiet (='message max 0')") },
+  { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("turn all messages on (='message all 9')") },
+  { wxCMD_LINE_SWITCH, _T("D"), _T("Debug"), _T("memory debug on exit (='debug -D')") },
+  { wxCMD_LINE_PARAM,  NULL, NULL, _T("file [file [...]]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
   { wxCMD_LINE_NONE }
 };
 
@@ -68,7 +68,7 @@ void wxBBIApp::OnInitCmdLine(wxCmdLineParser& parser)
 bool wxBBIApp::OnCmdLineParsed(wxCmdLineParser& parser)
 {
 
-  if (parser.Found(_T("M"))) 
+  if (parser.Found(_T("D"))) 
     {
       bbtk::StaticInitTime::PrintObjectListInfo = true;
     }
index d4c6f3857002c90cd7e2a0a4da589f125d1b88dc..62f523319641ce16d9e5e447d22207fcbd2ebc81 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/04/25 07:33:17 $
-  Version:   $Revision: 1.64 $
+  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;
 
     /*
@@ -823,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 :
@@ -2034,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;
          }
index 483068bf8935c230eb008e9b08a5c6ef09941029..8440873b352781f93eb0a1a6dcd7346a9ab1f705 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/04/22 09:40:11 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2008/04/25 08:05:23 $
+  Version:   $Revision: 1.29 $
 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -182,7 +182,7 @@ namespace bbtk
       cKind, // LG
       cNewGUI, // LG
       cWorkspace, // LG
-      cObject
+      cDebug // LG
     } CommandCodeType;
 
     /// The structure storing the informations on a command 
@@ -260,7 +260,7 @@ namespace bbtk
     void NewGUI(const std::string& box, 
                const std::string& instanceName);
 
-    void ObjectInfo(const std::string& name);
+    void Debug(const std::string& arg);
 
   private:
 
index 8066f7e610665d5f552e717020d16c950f14b45d..7ae64a27c1c9e637027b72d2a53f5162411d11a5 100644 (file)
@@ -183,7 +183,7 @@ namespace bbtk
     if (PrintObjectListInfo) 
       {
        std::cout << std::endl
-                 << "***************** main ended *******************"
+                 << "************************** main ended *******************"
                  << std::endl << std::endl;
        Object::PrintObjectListInfo("");
       }
@@ -195,12 +195,13 @@ namespace bbtk
        std::cout << "**** "<< Object::GetObjectsCount()
                  <<" bbtk objects still alive after main ended"<<std::endl;
        std::cout << "**** "
-                 <<"Rerun bbi with -M option or put 'object -S' in bbs file"
+                 <<"Rerun bbi with -D option or put 'debug -D' in bbs file"
                  <<std::endl;
        std::cout << "**** "
-                 <<"to view the object list "
+                 <<"to view the objects list "
                  <<std::endl;
        std::cout << "*********************************************************"
+                 <<std::endl
                  <<std::endl;
 
      }