From 0d9c3f691b5889816aea4d7e813f58e1950f81ed Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Thu, 14 Feb 2008 20:26:54 +0000 Subject: [PATCH] Some indentation --- kernel/src/bbtkExecuter.cxx | 66 +++++++++---------- kernel/src/bbtkExecuter.h | 8 +-- kernel/src/bbtkInterpreter.cxx | 13 ++-- .../wx/bbs/appli/testSizerOrientation.bbs | 1 - packages/wx/src/bbwxRadioButton.cxx | 6 +- 5 files changed, 48 insertions(+), 46 deletions(-) diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index 7564baf..144dfcf 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -3,13 +3,13 @@ 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:26:54 $ + Version: $Revision: 1.11 $ 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. @@ -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; diff --git a/kernel/src/bbtkExecuter.h b/kernel/src/bbtkExecuter.h index 0090fad..ef109b3 100644 --- a/kernel/src/bbtkExecuter.h +++ b/kernel/src/bbtkExecuter.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkExecuter.h,v $ $ Language: C++ - Date: $Date: 2008/02/06 10:53:02 $ - Version: $Revision: 1.8 $ + Date: $Date: 2008/02/14 20:26:54 $ + Version: $Revision: 1.9 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -79,7 +79,7 @@ namespace bbtk /// Sets the file name to use for the current definition /// (Used to set it after the Define command) void SetCurrentFileName (const std::string &name ); - + /// End the definition of a ComplexBlackBox void EndDefine (); @@ -110,7 +110,7 @@ namespace bbtk const std::string &box, const std::string &output, const std::string &help); - + /// sets the input of the box with the value void Set (const std::string &box, const std::string &input, diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 35572df..7a7e08b 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/14 11:26:43 $ - Version: $Revision: 1.31 $ + Date: $Date: 2008/02/14 20:26:54 $ + Version: $Revision: 1.32 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -52,10 +52,12 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL; mGlobalInterpreter = this; - // mFactory = new bbtk::Factory(); mExecuter = new bbtk::Executer(); + + // For the time being, comment out previous line, and + // uncomment next line to check Transcriptor + //mExecuter = new bbtk::Transcriptor("GeneratedProgram.txt"); - //mExecuter->SetFactory(mFactory); // Builds the commands dict CommandInfoType info; @@ -536,7 +538,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment ) case cMessage : if (words.size()<3) { - bbtk::MessageManager::PrintInfo(); + bbtk::MessageManager::PrintInfo(); } else { @@ -582,6 +584,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment ) break; case cQuit : + delete mExecuter; throw QuitException(); break; diff --git a/packages/wx/bbs/appli/testSizerOrientation.bbs b/packages/wx/bbs/appli/testSizerOrientation.bbs index 2eb0a1e..ae19a00 100644 --- a/packages/wx/bbs/appli/testSizerOrientation.bbs +++ b/packages/wx/bbs/appli/testSizerOrientation.bbs @@ -5,7 +5,6 @@ category "test" load std load wx - new Sizer main set main.Orientation H new Sizer Sizer2 diff --git a/packages/wx/src/bbwxRadioButton.cxx b/packages/wx/src/bbwxRadioButton.cxx index 19349f3..f415c66 100644 --- a/packages/wx/src/bbwxRadioButton.cxx +++ b/packages/wx/src/bbwxRadioButton.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxRadioButton.cxx,v $ Language: C++ - Date: $Date: 2008/02/12 09:21:23 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/02/14 20:26:54 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -95,7 +95,7 @@ namespace bbwx } sizer->AddGrowableCol(0); panel->SetSizer(sizer); - + // panel->SetAutoLayout(true); // panel->Layout(); -- 2.45.1