X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkExecuter.cxx;h=79380c4271072db6ca5671156e5cecdfae5ca706;hb=b19674b7569940466cda380e63350157866dd76b;hp=d20ed655310e3b8dece8b01ec28ca197c055d5c1;hpb=cfad95b6e08e6e53846ffcda7fbc5932065f2c47;p=bbtk.git diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index d20ed65..79380c4 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -82,7 +82,9 @@ namespace bbtk // We have to "lock" the smart pointer because the factory // only keeps a weak pointer on the executer // -> this would auto-destroy !! + mFactory->SetExecuter(MakePointer(this,true)); + Reset(); bbtkDebugMessage("object",2,"<== Executer()" <GetPrototype()->bbGetBlackBox(box); + BlackBox::Pointer b = GetCurrentDescriptor()->GetPrototype()->bbGetBlackBox(box); // Looks for the adaptor if ( ( b->bbGetInputType(input) != typeid(bbtk::any) )&& @@ -444,9 +447,7 @@ namespace bbtk a->bbExecute(); b->bbSetInput(input,a->bbGetOutput("Out")); // a->Delete(); - } - else - { + } else { std::string v(value); b->bbSetInput(input,v); } @@ -484,9 +485,7 @@ namespace bbtk //b->bbSetInput(input,a->bbGetOutput("Out")); // a->bbDelete(); return r; - } - else - { + } else { b->bbExecute(); return b->bbGetOutput(output).unsafe_get(); // std::string v = *((std::string*)b->bbGetOutput(output)) ;