X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMagicBox.cxx;h=1a66b5cab35cd605d5813b498bd14fd6b0136083;hb=ddc1c107ea96a276a16d47be309d81ca516e132c;hp=d8205fb39ea9b79881ee8fe34b31fc0e493dc46e;hpb=cfad95b6e08e6e53846ffcda7fbc5932065f2c47;p=bbtk.git diff --git a/packages/std/src/bbstdMagicBox.cxx b/packages/std/src/bbstdMagicBox.cxx index d8205fb..1a66b5c 100644 --- a/packages/std/src/bbstdMagicBox.cxx +++ b/packages/std/src/bbstdMagicBox.cxx @@ -41,19 +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() { - bbSetOutputOut( bbGetInputIn() ); + if (bbGetInputActive()==true) + { + bbSetOutputOut( bbGetInputIn() ); + } // Active } BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MagicBox);