X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreterVirtual.cxx;h=93d05ed5cf88ef1d335734a949476b26cb088134;hb=4d3619bf05342807aec39f571d94e4aea2efa38b;hp=01d37a8ab48163c553d491c39f14836a755ea8d3;hpb=2d564c78c449d67b1d85511ba9601d3afb57c924;p=bbtk.git diff --git a/kernel/src/bbtkInterpreterVirtual.cxx b/kernel/src/bbtkInterpreterVirtual.cxx index 01d37a8..93d05ed 100644 --- a/kernel/src/bbtkInterpreterVirtual.cxx +++ b/kernel/src/bbtkInterpreterVirtual.cxx @@ -1,4 +1,31 @@ -/*========================================================================= +/* + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its terms. + # ------------------------------------------------------------------------ */ + + +/*========================================================================= Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ Language: C++ @@ -6,27 +33,7 @@ Version: $Revision: 1.88 $ =========================================================================*/ -/* --------------------------------------------------------------------- - -* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale) -* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux -* -* This software is governed by the CeCILL-B license under French law and -* abiding by the rules of distribution of free software. You can use, -* modify and/ or redistribute the software under the terms of the CeCILL-B -* license as circulated by CEA, CNRS and INRIA at the following URL -* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -* or in the file LICENSE.txt. -* -* As a counterpart to the access to the source code and rights to copy, -* modify and redistribute granted by the license, users are provided only -* with a limited warranty and the software's author, the holder of the -* economic rights, and the successive licensors have only limited -* liability. -* -* The fact that you are presently reading this means that you have had -* knowledge of the CeCILL-B license and that you accept its terms. -* ------------------------------------------------------------------------ */ + /** * \file @@ -339,7 +346,6 @@ namespace bbtk */ - } //======================================================================= @@ -797,8 +803,7 @@ namespace bbtk //======================================================================= void InterpreterVirtual::DoInterpretLine( const std::string& line ) - { - + { bbtkDebugMessage("interpreter",6,"==> InterpreterVirtual::DoInterpretLine(\"" < words; @@ -885,19 +890,19 @@ namespace bbtk // break and quit commands if ((command.code==cBreak) || (command.code==cQuit)) - { - bool in_script = false; - std::string file(""); - int line = 0; - - if (mFileName.size()) - { - std::ifstream* fs = dynamic_cast(mFile.back()); - if (fs!=0) in_script = true; - file = mFileName.back(); - line = mLine.back(); - } - if (command.code==cBreak) + { +//EED-Borrame bool in_script = false; +//EED-Borrame std::string file(""); +//EED-Borrame int line = 0; + +//EED-Borrame if (mFileName.size()) +//EED-Borrame { +//EED-Borrame std::ifstream* fs = dynamic_cast(mFile.back()); +//EED-Borrame if (fs!=0) in_script = true; +//EED-Borrame file = mFileName.back(); +//EED-Borrame line = mLine.back(); +//EED-Borrame } + if (command.code==cBreak) { /* std::cout << "BreakException(" @@ -908,15 +913,13 @@ namespace bbtk commandBreak(); //EED Borrame bbtkError("break");//,in_script,file,line); // throw BreakException(in_script,file,line); - } - else - { + } else { commandQuit(); //EED Borrame bbtkError("quit");//,in_script,file,line); //throw QuitException(in_script,file,line); - } - return; - } + } // cBreak + return; + } // cBreak cQuit //std::cout<<" mVirtualExecuter->Create(words[1],words[2]); "<>%s\n", full_path.c_str() ); // we *really* want '.' to be the current working directory if (full_path == ".") { @@ -1364,8 +1366,6 @@ printf("EED InterpreterVirtual::SwitchToFile 1. >>%s\n", full_path.c_str() ); std::vector::iterator i; for (i=script_paths.begin();i!=script_paths.end();i++) { - -printf("EED InterpreterVirtual::SwitchToFile jaja >> %s\n", (*i).c_str() ); bbtkMessage("interpreter",1, "--> Looking in '" << *i << "'" << std::endl); @@ -1398,9 +1398,6 @@ printf("EED InterpreterVirtual::SwitchToFile jaja >> %s\n", (*i).c_str() ); for (std::vector::iterator j = Filenames.begin(); j!= Filenames.end(); ++j) { - -printf("EED InterpreterVirtual::SwitchToFile kkkkk >> %s\n", (*j).c_str() ); - int lgr = (*j).size(); if (lgr < 5) continue; // ignore non .bbp file @@ -1556,9 +1553,7 @@ printf("EED InterpreterVirtual::SwitchToFile kkkkk >> %s\n", (*j).c_str() ) bbtkError("No ["<SetCurrentFileName(fullPathScriptName); if (source) { // Over writing the fullpath of the bbp file.