X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FbbtkInterpreter.cxx;h=fc5f3f18638104b9d3046cc162c02de60a6c5259;hb=cc134f89048428aca99fa855a7e1e87c815a3413;hp=d112f73bdb4f4c19c065bde7e511962c235c2caa;hpb=6575a389b71b1b85c79e4444885becb76ecf16e4;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index d112f73..fc5f3f1 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: 2008/10/17 08:18:13 $ - Version: $Revision: 1.77 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.79 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -134,6 +134,14 @@ namespace bbtk info.help = "Deletes the black box of name "; mCommandDict[info.keyword] = info; + info.keyword = "clear"; + info.argmin = 0; + info.argmax = 0; + info.code = cClear; + info.syntax = "clear"; + info.help = "Clears the currently defined complex box (deletes all its boxes and connections)"; + mCommandDict[info.keyword] = info; + info.keyword = "newgui"; info.argmin = 2; info.argmax = 2; @@ -396,6 +404,28 @@ namespace bbtk mScriptLine(script_line) { } + //======================================================================= + void Interpreter::CatchInterpreterException( const InterpreterError& e ) + { + if (mThrow) + { + CloseAllFiles(); + throw InterpreterError(e); + } + else + { + std::stringstream mess; + mess << "* ERROR : "<Clear(); + break; + case cInclude : // if 'source' was given (words.size()==3) then tell to set the // source file name of the current complex box with the full file name included