X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkExecuter.cxx;h=7d24b70fa357ac6f29a5847e0ef11ebef1bd38c9;hb=75cc88fbe565b4ee1a627bab47e6703d8d3399f1;hp=7564baf85337198a81111d65f2c6478aef454ea2;hpb=76f2826fd6b67d3a15fe72c1b50d5ee1af1960a1;p=bbtk.git diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index 7564baf..7d24b70 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -1,19 +1,19 @@ /*========================================================================= - + Program: bbtk Module: $RCSfile: bbtkExecuter.cxx,v $ $ Language: C++ - Date: $Date: 2008/02/14 11:38:58 $ - Version: $Revision: 1.10 $ - + Date: $Date: 2008/02/14 20:57:27 $ + Version: $Revision: 1.12 $ + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. - + This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. - + =========================================================================*/ /** * \file @@ -35,7 +35,7 @@ #include "bbtkConfigurationFile.h" namespace bbtk -{ +{ /** * */ @@ -50,13 +50,14 @@ namespace bbtk bbtkDebugMessageInc("Kernel",9,"Executer::Executer()" <UnRegisterBlackBox(mRoot->GetTypeName()); delete mRoot; } - if (mPackage) + if (mPackage) { GetGlobalFactory()->UnLoadPackage("user"); } @@ -125,16 +126,16 @@ namespace bbtk Package* p; try { - p = GetGlobalFactory()->GetPackage(name); + p = GetGlobalFactory()->GetPackage(name); } catch (Exception e) { - p = new Package(name, - "", - "", - "", - BBTK_STRINGIFY_SYMBOL(BBTK_VERSION)); - InsertPackage(p); + p = new Package(name, + "", + "", + "", + BBTK_STRINGIFY_SYMBOL(BBTK_VERSION)); + InsertPackage(p); } mOpenPackage.push_back(p); } @@ -145,11 +146,11 @@ namespace bbtk } void Executer::Define (const std::string &name, - const std::string &pack, - const std::string &scriptfilename) + const std::string &pack, + const std::string &scriptfilename) { bbtkDebugMessageInc("Kernel",9,"Executer::Define(\""<GetPackage(pname); + p = GetGlobalFactory()->GetPackage(pname); } catch (Exception e) { @@ -192,7 +193,7 @@ namespace bbtk } else { - p = mOpenPackage.back(); + p = mOpenPackage.back(); } p->RegisterBlackBox(Current()); @@ -216,7 +217,7 @@ namespace bbtk /** * */ - void Executer::Connect (const std::string &nodeFrom, + void Executer::Connect (const std::string &nodeFrom, const std::string &outputLabel, const std::string &nodeTo, const std::string &inputLabel) @@ -276,7 +277,7 @@ namespace bbtk std::cin >> ans; Set(box,input,ans); } - #ifdef _USE_WXWIDGETS_ +#ifdef _USE_WXWIDGETS_ // If the dialog mode is set to GraphicalDialog // A dialog box is pop up else if (mDialogMode == GraphicalDialog) @@ -321,7 +322,7 @@ namespace bbtk if ( b->bbGetInputType(input) != typeid(std::string) ) { - BlackBox* a = /*mFactory->*/ + BlackBox* a = NewAdaptor(typeid(std::string), b->bbGetInputType(input), "tmp"); @@ -354,7 +355,7 @@ namespace bbtk // Looks for the adaptor if (b->bbGetOutputType(output) != typeid(std::string)) { - BlackBox* a = /*mFactory->*/ + BlackBox* a = NewAdaptor( b->bbGetOutputType(output), typeid(std::string), @@ -408,7 +409,7 @@ namespace bbtk /// prints the list of the boxes of the current descriptor void Executer::PrintBoxes() - { + { bbtkMessageInc("Help",1,"The black box descriptor \"" <GetTypeName()<<"\" contains : "<PrintBlackBoxes(); @@ -453,15 +454,14 @@ namespace bbtk relative_link = false; } - Package* p; try { - p = GetGlobalFactory()->GetPackage(nameblackbox); + p = GetGlobalFactory()->GetPackage(nameblackbox); } catch (Exception e) { - p = mPackage; + p = mPackage; } // Generating documentation-help of workspace p->SetDocURL(filename_rootHtml); @@ -473,12 +473,12 @@ namespace bbtk /* try { - ShowGraphTypes(nameblackbox); + ShowGraphTypes(nameblackbox); } catch (bbtk::Exception a) { - std::cout <<"EXC"<GetPrototype(); + blackbox=Current()->GetPrototype(); } else { - blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox); + blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox); } std::string page;