X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMagicBox.cxx;h=fe601be58f205e9d0c8e289d9af17f3e60265822;hb=a35973b128a2f7130b619a2a11a35cfd418b21b6;hp=0d3e476c3a1855a188eb6610f71f35584534af45;hpb=5ecfbf82eea9a965a11ae9f47377ad900b7253b7;p=bbtk.git diff --git a/packages/std/src/bbstdMagicBox.cxx b/packages/std/src/bbstdMagicBox.cxx index 0d3e476..fe601be 100644 --- a/packages/std/src/bbstdMagicBox.cxx +++ b/packages/std/src/bbstdMagicBox.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdMagicBox.cxx,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:26 $ - Version: $Revision: 1.5 $ + Date: $Date: 2009/03/30 14:42:23 $ + Version: $Revision: 1.6 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -31,9 +31,37 @@ #include "bbstdMagicBox.h" #include "bbstdPackage.h" +#include "bbtkBlackBoxOutputConnector.h" +using namespace bbtk; + namespace bbstd { + void MagicBox::bbSetStatusAndPropagate(bbtk::BlackBoxInputConnector* c, + bbtk::IOStatus s) + { + bbtkDebugMessageInc("change",5, + "=> MagicBox::bbSetStatusAndPropagate(input," + <IsConnected()) + { + std::string do_input = c->GetConnection()->GetBlackBoxToInput(); + c->GetConnection()->TransferData(); + bbSetOutputOut( bbGetInput(do_input) ); + } + mCanSet = false; + } + BlackBox::bbSetStatusAndPropagate(c,s); + } + + void MagicBox::DoProcess() + { + mCanSet = true; + } + BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MagicBox); BBTK_BLACK_BOX_IMPLEMENTATION(MagicBox,bbtk::AtomicBlackBox);