// only keeps a weak pointer on the executer
// -> this would auto-destroy !!
-printf("EED Executer::Executer Start\n");
-
mFactory->SetExecuter(MakePointer(this,true));
-printf("EED Executer::Executer 1\n");
Reset();
bbtkDebugMessage("object",2,"<== Executer()" <<std::endl);
-printf("EED Executer::Executer End\n");
}
//=======================================================================
//=======================================================================
void Executer::Reset()
{
-printf("EED Executer::Reset Start\n");
bbtkDebugMessage("kernel",9,"==> Executer::Reset()" <<std::endl);
// GetFactory()->Check();
// Wx::DestroyTopWindow();
-printf("EED Executer::Reset 01\n");
GetFactory()->Reset();
-printf("EED Executer::Reset 02\n");
#if(USE_WXWIDGETS)
-printf("EED Executer::Reset 03\n");
Wx::ProcessPendingEvents();
#endif
-printf("EED Executer::Reset 04\n");
// Create user package
Package::Pointer p =
Package::New("user","internal","User defined black boxes","");
// Insert the user package in the factory
-printf("EED Executer::Reset 1\n");
GetFactory()->InsertPackage(p);
// And in the list of open packages
mOpenPackage.push_back(p);
ComplexBlackBoxDescriptor::Pointer r =
ComplexBlackBoxDescriptor::New("workspace");
// mRootCBB->Reference();
-printf("EED Executer::Reset 2\n");
r->SetFactory(GetFactory());
r->AddToAuthor("bbtk");
r->AddToDescription("User's workspace");
// Object::PrintObjectListInfo();
// GetFactory()->CheckPackages();
bbtkDebugMessage("kernel",9,"<== Executer::Reset()" <<std::endl);
-printf("EED Executer::Reset End\n");
}
//=======================================================================
const std::string &input,
const std::string &value)
{
- BlackBox::Pointer b = GetCurrentDescriptor()->GetPrototype()->bbGetBlackBox(box);
+ BlackBox::Pointer b = GetCurrentDescriptor()->GetPrototype()->bbGetBlackBox(box);
// Looks for the adaptor
if ( ( b->bbGetInputType(input) != typeid(bbtk::any<bbtk::thing>) )&&
a->bbExecute();
b->bbSetInput(input,a->bbGetOutput("Out"));
// a->Delete();
- }
- else
- {
+ } else {
std::string v(value);
b->bbSetInput(input,v);
}
//b->bbSetInput(input,a->bbGetOutput("Out"));
// a->bbDelete();
return r;
- }
- else
- {
+ } else {
b->bbExecute();
return b->bbGetOutput(output).unsafe_get<std::string>();
// std::string v = *((std::string*)b->bbGetOutput(output)) ;