X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreter.cxx;h=f0617c087e76bd851916bbfabb8d9032e4264f32;hb=82709d667857071eb7211e7fe7d22237d3a9ddf3;hp=f46dfe020106364527d225da512e04e2ce0f2db5;hpb=aefd641287e852b80d22c3cddd8b2025f12cb1d6;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index f46dfe0..f0617c0 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/02/06 09:32:25 $ - Version: $Revision: 1.27 $ + Date: $Date: 2008/02/12 12:55:16 $ + 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 @@ -54,6 +54,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL; // mFactory = new bbtk::Factory(); mExecuter = new bbtk::Executer(); + //mExecuter = new bbtk::Transcriptor("GeneratedProgram.txt"); //mExecuter->SetFactory(mFactory); // Builds the commands dict @@ -297,7 +298,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL; * */ void Interpreter::InterpretFile( const std::string& filename, - bool use_configuration_file) + bool use_configuration_file) { bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretFile(\""<& // It's a user intended message. // Please don't remove it. bbtkMessage("Interpreter",1, - "look for : [" << name + "look for : [" << name << "] (use_configuration_file == TRUE)" << std::endl); script_paths = ConfigurationFile::GetInstance().Get_bbs_paths(); } @@ -1082,26 +1083,50 @@ void Interpreter::Help(const std::vector& words) try { HelpPackage(words[1]); +#ifdef _USE_WXWIDGETS_ + if ( WxConsole::GetInstance() != 0 ) + { + std::string url = ConfigurationFile::GetInstance().Get_url(); + url += "/bbdoc/" + words[1] + "/index.html"; + if (Utilities::FileExists(url)) + { + WxConsole::GetInstance()->ShowHtmlPage(url); + } + } +#endif } catch (bbtk::Exception f) { try { - HelpBlackBox(words[1]); - } - catch (bbtk::Exception g) - { - try - { - this->mExecuter->ShowRelations(words[1],"0","9999"); - } - catch (bbtk::Exception h){ - bbtkError("\""<ShowHtmlPage(url); + } + } +#endif + } + catch (bbtk::Exception g) + { + try + { + this->mExecuter->ShowRelations(words[1],"0","9999"); + } + catch (bbtk::Exception h){ + bbtkError("\""<& words) const std::string description = cf.Get_description(); const std::string url = cf.Get_url(); const std::string data_path = cf.Get_data_path(); - const std::string default_doc_tmp = cf.Get_default_doc_tmp(); + const std::string default_temp_dir = cf.Get_default_temp_dir(); const std::string file_separator = cf.Get_file_separator(); const std::vectorbbs_paths = cf.Get_bbs_paths(); const std::vectorpackage_paths = cf.Get_package_paths(); @@ -1156,7 +1181,7 @@ void Interpreter::Help(const std::vector& words) bbtkMessage("Help",1, "bbtk_config.xml : [" << config_xml_full_path << "]" << std::endl); bbtkMessage("Help",1, "Documentation Url : [" << url << "]" << std::endl); bbtkMessage("Help",1, "Data Path : [" << data_path << "]" << std::endl); - bbtkMessage("Help",1, "Default Doc_tmp : [" << default_doc_tmp << "]" << std::endl); + bbtkMessage("Help",1, "Default Temp-Dir : [" << default_temp_dir << "]" << std::endl); bbtkMessage("Help",1, "File Separator : [" << file_separator << "]" << std::endl); std::vector::const_iterator i;