From 8cb6ba5066ddbbc11326de8d871e0f216c9330b4 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Thu, 16 Jan 2025 08:55:41 +0100 Subject: [PATCH] Test code --- kernel/src/bbtkBlackBox.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index 4eccbb1..8d81422 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -76,7 +76,8 @@ void print_trace() namespace bbtk { - static bool bbmgInConstruction = false; +// static bool bbmgInConstruction = false; + static int bbmgInConstruction = 0; static bool bbmgSomeBoxExecuting = false; static bool bbmgFreezeExecution = false; static std::set bbmgExecutionList; @@ -1543,14 +1544,21 @@ namespace bbtk //EED2025-01-15 bool BlackBox::bbGlobalGetInConstruction() { -// printf("EED BlackBox::bbGlobalGetInConstruction \n"); - return bbmgInConstruction; + // return bbmgInConstruction; + printf("BlackBox::bbGlobalGetInConstruction bbmgInConstruction=%d \n", bbmgInConstruction ); + if (bbmgInConstruction>0) return true; + return false; } void BlackBox::bbGlobalSetInConstruction(bool b) { - printf("EED BlackBox::bbGlobalSetInConstruction --)-)--)---)-)-)-)--)--)-\n"); - bbmgInConstruction = b; + if (b==true) { + bbmgInConstruction++; + } else { + bbmgInConstruction--; + } + printf("BlackBox::bbGlobalSetInConstruction ----- bbmgInConstruction=%d\n", bbmgInConstruction ); +// bbmgInConstruction = b; } -- 2.49.0