From: Eduardo Davila Date: Wed, 15 Sep 2010 14:17:17 +0000 (+0000) Subject: no message X-Git-Tag: CREATOOLS.2-0-3~18 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=95c29273ff69d9dbb0317755e445676027d3cad8;p=bbtk.git no message --- diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 961b42e..6771d77 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ Language: C++ - Date: $Date: 2010/09/14 07:18:46 $ - Version: $Revision: 1.88 $ + Date: $Date: 2010/09/15 14:17:17 $ + Version: $Revision: 1.89 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -867,7 +867,38 @@ namespace bbtk GetExecuter()->UnLoadPackage(packageName); } - //ups2 EED Borrame + void Interpreter::commandBreak() + { + /* + std::cout << "BreakException(" + <HelpMessages(); + } + +//ups2 EED Borrame + void Interpreter::commandMessage(std::string kind, std::string levelstr) + { + int level=0; + sscanf(levelstr.c_str(),"%d",&level); + mVirtualExecuter->SetMessageLevel(kind,level); + + } + //======================================================================= @@ -929,21 +960,24 @@ namespace bbtk bbtkDebugMessage("interpreter",9, "Command='"<SetMessageLevel(words[1],level); + commandMessage(words[1],words[2]); +//EED Borrame sscanf(words[2].c_str(),"%d",&level); +//EED Borrame mVirtualExecuter->SetMessageLevel(words[1],level); } return; } @@ -974,12 +1008,14 @@ namespace bbtk <Set(left,right,words[2]); break; @@ -1098,7 +1134,7 @@ namespace bbtk break; case cNewGUI : - NewGUI(words[1],words[2]); + commandNewGUI(words[1],words[2]); break; case cCategory : @@ -1108,11 +1144,11 @@ namespace bbtk case cIndex : if (words.size()==1) - Index("tmp_index.html"); + commandIndex("tmp_index.html"); else if (words.size()==2) - Index(words[1]); + commandIndex(words[1]); else if (words.size()==3) - Index(words[1],words[2]); + commandIndex(words[1],words[2]); break; case cDescription : @@ -1121,20 +1157,20 @@ namespace bbtk break; case cHelp : - Help(words); + commandHelp(words); break; case cGraph : - Graph(words); + commandGraph(words); break; case cConfig : - Config(); + commandConfig(); break; case cReset : - Reset(); + commandReset(); break; case cClear : @@ -1164,10 +1200,9 @@ namespace bbtk //EED Borrame GetExecuter()->UnLoadPackage(words[1]); break; - //ups1 EED borrame case cDebug : - if (words.size()==2) Debug(words[1]); - else Debug(""); + if (words.size()==2) commandDebug(words[1]); + else commandDebug(""); break; /* obsolete @@ -1231,7 +1266,7 @@ namespace bbtk //======================================================================= - void Interpreter::Reset() + void Interpreter::commandReset() { // Cannot close all files if the reset command is read from a file ! CloseAllFiles(); @@ -1748,7 +1783,7 @@ void Interpreter::SwitchToStream( std::stringstream* stream ) //======================================================================= /// Displays help on all the commands -void Interpreter::Help(const std::vector& words) +void Interpreter::commandHelp(const std::vector& words) { unsigned int nbarg = words.size()-1; @@ -1848,7 +1883,7 @@ void Interpreter::Help(const std::vector& words) //=================================================================== /// Displays the Configuration - void Interpreter::Config() const + void Interpreter::commandConfig() const { ConfigurationFile::GetInstance().GetHelp(1); } @@ -2193,7 +2228,7 @@ void Interpreter::Help(const std::vector& words) } //======================================================================= -void Interpreter::Graph(const std::vector& words) +void Interpreter::commandGraph(const std::vector& words) { std::string page; bool system_display = true; @@ -2238,7 +2273,7 @@ void Interpreter::Graph(const std::vector& words) //======================================================================= -void Interpreter::Index(const std::string& filename, +void Interpreter::commandIndex(const std::string& filename, const std::string& type) { Factory::IndexEntryType t; @@ -2253,7 +2288,7 @@ void Interpreter::Index(const std::string& filename, //======================================================================= -void Interpreter::NewGUI(const std::string& boxname, +void Interpreter::commandNewGUI(const std::string& boxname, const std::string& instanceName) { if (mRealExecuter.expired()) @@ -2430,7 +2465,7 @@ void Interpreter::NewGUI(const std::string& boxname, //========================================================================== - void Interpreter::Debug(const std::string& name) + void Interpreter::commandDebug(const std::string& name) { if ((name.length()==2)&&(name[0]=='-')) { diff --git a/kernel/src/bbtkInterpreter.h b/kernel/src/bbtkInterpreter.h index e94da2a..355e0fe 100644 --- a/kernel/src/bbtkInterpreter.h +++ b/kernel/src/bbtkInterpreter.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.h,v $ Language: C++ - Date: $Date: 2010/09/14 07:18:47 $ - Version: $Revision: 1.41 $ + Date: $Date: 2010/09/15 14:17:17 $ + Version: $Revision: 1.42 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -291,10 +291,10 @@ namespace bbtk void CloseAllFiles(); /// Resets all - void Reset(); + void commandReset(); /// Displays help (entry point of any help) - void Help(const std::vector& words); + void commandHelp(const std::vector& words); /// Displays help on all the commands void HelpCommands(); @@ -303,14 +303,14 @@ namespace bbtk void HelpCommand( const std::string& command ); /// - void Graph(const std::vector& words); + void commandGraph(const std::vector& words); /// - void Config() const; + void commandConfig() const; /// // void Print(const std::string&); - void Index(const std::string& filename, + void commandIndex(const std::string& filename, const std::string& type = "Initials"); /// void FindCommandsWithPrefix( char* buf, @@ -322,11 +322,8 @@ namespace bbtk /// Define it as a complex box type with name instanceName+"Type" /// The instance is called instanceName /// and connected to the existing pipeline - void NewGUI(const std::string& box, - const std::string& instanceName); - - void Debug(const std::string& arg); - + void commandNewGUI(const std::string& box,const std::string& instanceName); + void commandDebug(const std::string& arg); void commandNew(std::string boxType, std::string boxName); void commandDelete(std::string boxName); void commandConnection(std::string nodeFrom, std::string outputLabel, std::string nodeTo, std::string inputLabel); @@ -347,7 +344,11 @@ namespace bbtk void commandInclude(std::string word, bool ok); void commandLoad(std::string packageName); void commandUnload(std::string packageName); - + void commandBreak(); + void commandQuit(); + void commandMessage(); + void commandMessage(std::string kind, std::string levelstr); + /// Constructor Interpreter(const std::string& cpp_file = "");