X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreter.cxx;h=a1a0fd10793034b4745c4196f39cf6050833be00;hb=7a86b21a88862240b2b56d165433cbcbb50ab316;hp=749d11a873a95ed489e14f851d4e618cb96b8ea6;hpb=4cb6c59ce12259b0f61bd465aac75fe8c822952f;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 749d11a..a1a0fd1 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -1,32 +1,39 @@ -/*========================================================================= +/* + # --------------------------------------------------------------------- + # + # 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++ - Date: $Date: 2010/09/18 22:31:40 $ - Version: $Revision: 1.91 $ + Date: $Date: 2012/11/16 08:49:01 $ + Version: $Revision: 1.95 $ =========================================================================*/ -/* --------------------------------------------------------------------- - -* 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 @@ -90,23 +97,16 @@ namespace bbtk //======================================================================= void Interpreter::Init(VirtualExec::Pointer e, const std::string& cpp_file) { - if (e) - { - mVirtualExecuter = e; - } - else if (cpp_file.size()!=0) - { - mVirtualExecuter = boost::static_pointer_cast(bbtk::Transcriptor::New(cpp_file)); - } - else - { - bbtk::Executer::Pointer exe = bbtk::Executer::New(); - mRealExecuter = exe; - mVirtualExecuter = boost::static_pointer_cast(exe); + if (e) { + mVirtualExecuter = e; + } else if (cpp_file.size()!=0){ + mVirtualExecuter = boost::static_pointer_cast(bbtk::Transcriptor::New(cpp_file)); + } else { + bbtk::Executer::Pointer exe = bbtk::Executer::New(); + mRealExecuter = exe; + mVirtualExecuter = boost::static_pointer_cast(exe); } - - // Lock this pointer or will auto-destruct !! if (!e) mVirtualExecuter->SetInterpreter(MakePointer(this,true)); @@ -1286,6 +1286,14 @@ namespace bbtk } //======================================================================= + + void Interpreter::SetTypeOfScript_Application() + { + GetExecuter()->SetTypeOfScript_Application(); + } + + + /*EED Borrame //======================================================================= void Interpreter::SwitchToStream( std::stringstream* stream ) @@ -1562,7 +1570,11 @@ void Interpreter::commandHelp(const std::vector& words) CommandDictType::iterator c; c = mCommandDict.find(s); if ( c == mCommandDict.end() ) { - bbtkError(s<<" : Unknown command"); + +//EED 2016-12-22 +// bbtkError(s<<" : Unknown command"); + std::string tmpSS=s+" : Unknown command"; + bbtkError(tmpSS); } // std::cout << " " << s << " : "<< std::endl; // CommandParamDictType::iterator i; @@ -2005,8 +2017,21 @@ void Interpreter::commandNewGUI(const std::string& boxname, ( d->GetCreatorTypeInfo() == typeid(WxBlackBoxDescriptor)) ) continue; #else +// JFGA 12/12/2014 Adding WT options for compile with it. + +/*#if USE_WT + + if ( ( d->GetCreatorTypeInfo() == typeid(AtomicBlackBoxDescriptor)) || + ( d->GetCreatorTypeInfo() == typeid(WtBlackBoxDescriptor)) ) + continue; + + +#else +*/ if ( ( d->GetCreatorTypeInfo() == typeid(AtomicBlackBoxDescriptor)) ) continue; +//#endif + #endif bool widok = true; std::string widget,adaptor;