X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkBlackBox.cxx;h=fbf94a0f6e694b477c591038a85eeb197ac8b6d3;hb=8dd53a72bc1dd1ca2c6e2763c0aeb51c77ee352e;hp=8be7d01d0e3a283d659957fcf63f6284a8dbb7ba;hpb=a35973b128a2f7130b619a2a11a35cfd418b21b6;p=bbtk.git diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index 8be7d01..fbf94a0 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBox.cxx,v $ Language: C++ - Date: $Date: 2009/03/30 14:42:16 $ - Version: $Revision: 1.41 $ + Date: $Date: 2009/05/18 10:45:40 $ + Version: $Revision: 1.45 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -40,6 +40,7 @@ #include "bbtkConfigurationFile.h" #include "bbtkWxBlackBox.h" +#include "bbtkWx.h" #include //#include @@ -61,7 +62,7 @@ namespace bbtk //========================================================================= //========================================================================= - void BlackBox::Deleter::Delete(Object* p) + int BlackBox::Deleter::Delete(Object* p) { BlackBox* b = dynamic_cast(p); if (!b) @@ -77,7 +78,7 @@ namespace bbtk BlackBoxDescriptor::WeakPointer desc = b->bbGetDescriptor(); bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<bbDelete(); + int refs = b->bbDelete(); bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""< BlackBox::Deleter(\""< BlackBox::BlackBox(" <bbRecursiveInitializeProcessing(); + bbmInitialized = true; + } + } + //========================================================================= + //========================================================================= + void BlackBox::bbFinalizeProcessing() + { + if (bbmInitialized) + { + std::cout << "FINI "<bbRecursiveFinalizeProcessing(); + bbmInitialized = false; + } + } + //========================================================================= + + //========================================================================= /// Main recursive processing method of the box. void BlackBox::bbRecursiveExecute( Connection::Pointer caller ) @@ -766,13 +795,17 @@ namespace bbtk " -> already executing : abort"<bbCreateWidget(); - + + // Creates the window if the black box has one + this->bbCreateWindow(); + // Updates its inputs IOStatus s = bbUpdateInputs(); @@ -809,7 +842,8 @@ namespace bbtk <bbShowWidget(); + // Shows the window if the black box has one + this->bbShowWindow(); bbtkDebugMessage("process",3,