X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreter.cxx;h=f908f65155cf2c42396d08a64f2b98edd2a265b6;hb=5956da42deb9602e04042705155291bd124896eb;hp=d4c6f3857002c90cd7e2a0a4da589f125d1b88dc;hpb=caba246bb51787dac9357d9244052dba34c77840;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index d4c6f38..f908f65 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/05/15 08:02:36 $ + Version: $Revision: 1.66 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -42,25 +42,48 @@ namespace bbtk //======================================================================= Interpreter::Pointer Interpreter::New(const std::string& cpp_file) { - bbtkDebugMessage("Kernel",9,"Interpreter::New()"<0 : Prints the output of the 'print' commands of the user.\n\tLevel>1 : Prints the command being interpreted",1); bbtk::MessageManager::RegisterMessageType("Interpreter","Messages of the interpreter",0); bbtkDebugMessageInc("Interpreter",9,"Interpreter::Interpreter()" <(bbtk::Transcriptor::New(cpp_file)); } @@ -72,7 +95,7 @@ namespace bbtk } // Lock this pointer or will auto-destruct !! - mVirtualExecuter->SetInterpreter(MakePointer(this,true)); + if (!e) mVirtualExecuter->SetInterpreter(MakePointer(this,true)); // For the time being, comment out previous line, and // uncomment next line to check Transcriptor @@ -299,12 +322,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 +846,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 +2057,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; }