From 379d31e873a1c118bd0fc1a00c746eb7fe94be69 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" <eduardo.davila@creatis.insa-lyon.fr> Date: Thu, 16 Jan 2025 08:32:54 +0100 Subject: [PATCH] Test code --- kernel/src/bbtkBlackBox.cxx | 16 +++++++++++++--- kernel/src/bbtkComplexBlackBox.cxx | 11 ----------- kernel/src/bbtkExecuter.cxx | 4 +--- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index 0b76e37..4eccbb1 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -656,10 +656,14 @@ namespace bbtk /// Main processing method of the box. void BlackBox::bbExecute(bool force) { + bbtkBlackBoxDebugMessage("process",2, "=> BlackBox::bbExecute("<<(int)force<<")" <<std::endl); - + + printf("-- EED BlackBox::bbExecute Start \n"); + bbGlobalSetInConstruction(true); + // If already executing : return /* if (bbGetExecuting()) @@ -694,11 +698,15 @@ namespace bbtk { bbLetRecursiveExecuteManualMode = false; } - + + printf("-- EED BlackBox::bbExecute End \n"); + bbGlobalSetInConstruction(false); bbtkBlackBoxDebugMessage("process",2, "<= BlackBox::bbExecute()" <<std::endl); + + } //========================================================================= @@ -1532,14 +1540,16 @@ namespace bbtk } //========================================================================= - +//EED2025-01-15 bool BlackBox::bbGlobalGetInConstruction() { +// printf("EED BlackBox::bbGlobalGetInConstruction \n"); return bbmgInConstruction; } void BlackBox::bbGlobalSetInConstruction(bool b) { + printf("EED BlackBox::bbGlobalSetInConstruction --)-)--)---)-)-)-)--)--)-\n"); bbmgInConstruction = b; } diff --git a/kernel/src/bbtkComplexBlackBox.cxx b/kernel/src/bbtkComplexBlackBox.cxx index b13f5aa..4d01121 100644 --- a/kernel/src/bbtkComplexBlackBox.cxx +++ b/kernel/src/bbtkComplexBlackBox.cxx @@ -274,14 +274,9 @@ namespace bbtk bbtkBlackBoxDebugMessage("process",2, "**> ComplexBlackBox::bbExecute()" <<std::endl); - - bbGlobalSetInConstruction(true); - Wx::BusyCursor wait; - if (mExecutionList.size() != 0) { - std::vector<std::string>::const_iterator i; for (i=mExecutionList.begin(); i!=mExecutionList.end(); @@ -297,13 +292,9 @@ namespace bbtk i->second->bbExecute(force); } // for i } - - bbGlobalSetInConstruction(false); - bbtkBlackBoxDebugMessage("process",2, "<** ComplexBlackBox::bbExecute()" <<std::endl); - } //================================================================== @@ -316,8 +307,6 @@ namespace bbtk <<std::endl); mExecutionList.push_back( name ); - - } //================================================================== diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index 79380c4..52c553f 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -349,9 +349,7 @@ namespace bbtk { GetCurrentDescriptor()->GetPrototype()->bbGetBlackBox(nodeName)->bbExecute(true); } - } - else - { + } else { GetCurrentDescriptor()->AddToExecutionList(nodeName) ; } } -- 2.49.0