X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMagicBox.cxx;h=6ed1ba6d9db690c0f1ee00fd3ba80b7c9ff9ca2c;hb=0864b46768b25800120d16758b65abbf6f1412ff;hp=0bf4ed69ab845bd41912a1b535d2a1e60b8b473a;hpb=968f7be1de6def3bb3422cf96fd530da670cff35;p=bbtk.git diff --git a/packages/std/src/bbstdMagicBox.cxx b/packages/std/src/bbstdMagicBox.cxx index 0bf4ed6..6ed1ba6 100644 --- a/packages/std/src/bbstdMagicBox.cxx +++ b/packages/std/src/bbstdMagicBox.cxx @@ -41,25 +41,43 @@ using namespace bbtk; namespace bbstd { +void MagicBox::bbComputePostProcessStatus() // Virtual +{ + 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() - { - } - void MagicBox::bbUserInitializeProcessing() - { - } - void MagicBox::bbUserFinalizeProcessing() - { - } - void MagicBox::DoProcess() - { -printf("EED MagicBox::DoProcess Start\n"); - bbSetOutputOut( bbGetInputIn() ); -printf("EED MagicBox::DoProcess End\n"); - } +void MagicBox::bbUserSetDefaultValues() +{ + bbSetInputActive(true); +} - BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MagicBox); - BBTK_BLACK_BOX_IMPLEMENTATION(MagicBox,bbtk::AtomicBlackBox); - +void MagicBox::bbUserInitializeProcessing() +{ +} + +void MagicBox::bbUserFinalizeProcessing() +{ } -// EO namespace bbstd + +void MagicBox::DoProcess() +{ + if (bbGetInputActive()==true) + { + bbSetOutputOut( bbGetInputIn() ); + } // if Active +} + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MagicBox); +BBTK_BLACK_BOX_IMPLEMENTATION(MagicBox,bbtk::AtomicBlackBox); + +} // EO namespace bbstd