X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMagicBox.cxx;h=1a66b5cab35cd605d5813b498bd14fd6b0136083;hb=6b2916fb6359ead51e50b3ee9b473dc1c3c057d4;hp=0bf4ed69ab845bd41912a1b535d2a1e60b8b473a;hpb=968f7be1de6def3bb3422cf96fd530da670cff35;p=bbtk.git diff --git a/packages/std/src/bbstdMagicBox.cxx b/packages/std/src/bbstdMagicBox.cxx index 0bf4ed6..1a66b5c 100644 --- a/packages/std/src/bbstdMagicBox.cxx +++ b/packages/std/src/bbstdMagicBox.cxx @@ -41,21 +41,43 @@ using namespace bbtk; namespace bbstd { + void MagicBox::bbComputePostProcessStatus() + { + AtomicBlackBox::bbComputePostProcessStatus(); + + if (bbGetInputActive()==false) + { + // Update the output statuses + IOStatus new_output_status = UPTODATE; + OutputConnectorMapType::iterator o; + for ( o = bbGetOutputConnectorMap().begin(); o!= bbGetOutputConnectorMap().end(); ++o) + { + o->second->SetStatus(new_output_status); + } // for o + } // if + + } + void MagicBox::bbUserSetDefaultValues() { + bbSetInputActive(true); } + void MagicBox::bbUserInitializeProcessing() { } + void MagicBox::bbUserFinalizeProcessing() { } + void MagicBox::DoProcess() { -printf("EED MagicBox::DoProcess Start\n"); - bbSetOutputOut( bbGetInputIn() ); -printf("EED MagicBox::DoProcess End\n"); + if (bbGetInputActive()==true) + { + bbSetOutputOut( bbGetInputIn() ); + } // Active } BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MagicBox);