From 603bd2accf3811a7c49caa53b795edde11cbc710 Mon Sep 17 00:00:00 2001 From: guigues Date: Fri, 25 Apr 2008 08:05:22 +0000 Subject: [PATCH] *** empty log message *** --- kernel/appli/bbi/bbi.cxx | 20 ++++++++++---------- kernel/src/bbtkInterpreter.cxx | 22 +++++++++++----------- kernel/src/bbtkInterpreter.h | 8 ++++---- kernel/src/bbtkObject.cxx | 7 ++++--- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/kernel/appli/bbi/bbi.cxx b/kernel/appli/bbi/bbi.cxx index 03380f0..48951bd 100644 --- a/kernel/appli/bbi/bbi.cxx +++ b/kernel/appli/bbi/bbi.cxx @@ -15,15 +15,15 @@ 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; } diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index d4c6f38..62f5233 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -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 "; - info.help = "Provides debug info on object "; + 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; } diff --git a/kernel/src/bbtkInterpreter.h b/kernel/src/bbtkInterpreter.h index 483068b..8440873 100644 --- a/kernel/src/bbtkInterpreter.h +++ b/kernel/src/bbtkInterpreter.h @@ -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: diff --git a/kernel/src/bbtkObject.cxx b/kernel/src/bbtkObject.cxx index 8066f7e..7ae64a2 100644 --- a/kernel/src/bbtkObject.cxx +++ b/kernel/src/bbtkObject.cxx @@ -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"<