}
*/
+
OutputConnectorMapType::const_iterator o;
for ( o = bbGetOutputConnectorMap().begin();
o != bbGetOutputConnectorMap().end(); ++o )
- {
- if (o->second->GetStatus()==UPTODATE)
+ {
+
+
+ if (o->first=="BoxChange")
+ {
+ o->second->SetStatus(UPTODATE);
+ }
+
+
+
+//EED 24/08/2015
+// EED CASPITAS 2
+ if (o->second->GetStatus()==UPTODATE)
+// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==OUTOFDATE))
+// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==MODIFIED))
{
o->second->SetStatus(OUTOFDATE);
o->second->SignalChange(GetThisPointer<BlackBox>(),o->first);
- }
- }
+ } // if
+ } // for
+
if ( ( bbBoxProcessModeIsReactive()
|| (c==bbGetInputConnectorMap().find("BoxExecute")->second))
&& (bbCanReact() ) )
bbtkBlackBoxDebugMessage("change",2,
"-> Execution triggered by Reactive mode or BoxExecute input change"<<std::endl);
bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
- }
+ } // if
bbtkBlackBoxDebugMessage("change",5,
"<= BlackBox::bbSetStatusAndPropagate(input)"
<<std::endl);
//=========================================================================
void BlackBox::bbRecursiveExecute( Connection::Pointer caller )
{
+
bbtkBlackBoxDebugMessage("process",3,
"=> BlackBox::bbRecursiveExecute("
<<(caller?caller->GetFullName():"0")<<")"
IOStatus s=UPTODATE;
// IOStatus s=OUTOFDATE;
// IOStatus s=MODIFIED;
-
-
+
+
if ( ( bbBoxProcessModeIsManual()==false ) ||
( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==true) ) )
{
bbSetExecuting(false);
bbGlobalSetSomeBoxExecuting(wasExecuting);
+
return;
}
//=========================================================================
<<std::endl);
bbmgGlobalProcessingExecutionList = false;
+
}
//=========================================================================
IOStatus mStatus;
/// The output changed signal
BlackBox::OutputChangeSignalType mChangeSignal;
-
-
};
//========================================================================
}
- mFrom = from;
- mOriginalFrom = from;
- mTo = to;
- mOriginalTo = to;
- mInput = mOriginalInput = input;
- mOutput = mOriginalOutput = output;
+ mFrom = from;
+ mOriginalFrom = from;
+ mTo = to;
+ mOriginalTo = to;
+ mInput = mOriginalInput = input;
+ mOutput = mOriginalOutput = output;
// Lock this pointer !!!
//Pointer p = MakePointer(this,true);
//=======================================================================
void InterpreterVirtual::Init()
{
-printf("EED InterpreterVirtual::Init start\n");
mUser = 0;
mCommandLine = false;
mThrow = false;
mCommandDict[info.keyword] = info;
*/
-printf("EED InterpreterVirtual::Init end\n");
}
//=======================================================================
//=======================================================================
void InterpreterVirtual::DoInterpretLine( const std::string& line )
- {
-
+ {
bbtkDebugMessage("interpreter",6,"==> InterpreterVirtual::DoInterpretLine(\""
<<line<<"\")"<<std::endl);
std::vector<std::string> words;
bbtkDebugMessage("interpreter",6,"<== InterpreterVirtual::DoInterpretLine(\""
<<line<<"\")"<<std::endl);
-
+
}
//=======================================================================
for (i=script_paths.begin();i!=script_paths.end();i++)
{
-printf("EED InterpreterVirtual::SwitchToFile jaja >> %s\n", (*i).c_str() );
+printf("EED InterpreterVirtual::SwitchToFile (1) >> %s\n", (*i).c_str() );
bbtkMessage("interpreter",1,
"--> Looking in '" << *i << "'" << std::endl);
j!= Filenames.end(); ++j)
{
-printf("EED InterpreterVirtual::SwitchToFile kkkkk >> %s\n", (*j).c_str() );
+printf("EED InterpreterVirtual::SwitchToFile (2) >> %s\n", (*j).c_str() );
int lgr = (*j).size();
if (lgr < 5) continue;
{
Wt::WContainerWidget *parent;
WtBlackBox::Pointer b;
- Wt::WString title;
+ WtBlackBox *pbox;
+ Wt::WString title;
};
/* jScript::jScript()
// javaScript Line
//=========================================================================
//Contains all the JS statements needed for the bbwt.
-
-
+
//=========================================================================
// WxFrame
//=========================================================================
// Application WT deployed
//==================================================================
-
-
class WtWFrame : public Wt::WApplication
{
public:
- WtWFrame(
- const Wt::WEnvironment& env
- );
- ~WtWFrame();
-
-
-
- WtBlackBox::WeakPointer mBox;
-
-
+ WtWFrame( const Wt::WEnvironment& env );
+ ~WtWFrame();
+ WtBlackBox::WeakPointer mBox;
};
- WtWFrame::WtWFrame(
- const Wt::WEnvironment& env
- )
- :
- Wt::WApplication(env)
- {
+ WtWFrame::WtWFrame( const Wt::WEnvironment& env ):Wt::WApplication(env)
+ {
//std::cout<<"Adding JavaScript -- DELETE ME -- bbtkWtBlackBox.cxx"<<std::endl;
//this->require("/home/gonzalez/Documents/CREATOOLS/wt_library/wt/bbtk_wt_PKG/src/js/xtk.js");
//this->require("http://get.goXTK.com/xtk.js");
//this->useStyleSheet("css/demo.css");
-
//this->require("http://get.goXTK.com/xtk.js");
this->require( "resourcesXTK/xtk.js" );
-
// this->require("http://get.goXTK.com/xtk_edge.js");
// this->require("http://get.goXTK.com/xtk_xdat.gui.js");
this->require( "resourcesXTK/xtk_xdat.gui.js" );
-
this->useStyleSheet("resourcesXTK/styleWT.css");
-
-
// std::cout<<"Cargado------------ "<<loadedJS<<std::endl;
-
mBox = myWtData.b;
+
+//EED -->
if(!myWtData.parent)
- {
- std::cout<<" SIN PADRE "<<std::endl;
- if(myWtData.parent == 0){std::cout<<" PARENT 0 "<<std::endl;}
- if(myWtData.parent == NULL){std::cout<<" PARENT NULL "<<std::endl;}
- myWtData.parent = new Wt::WContainerWidget();
- std::cout<<"Parent created -- DELETE ME -- bbtkWtBlackBox.cxx"<<std::endl;
- }
-
- Wt::WContainerWidget *myCont = new Wt::WContainerWidget(myWtData.parent);
- myCont->setMinimumSize(800,500);
- std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.................50%"<<std::endl;
- myWtData.b->bbUserCreateWidget(myCont);
+ {
+ std::cout<<" SIN PADRE "<<std::endl;
+ if(myWtData.parent == 0){std::cout<<" PARENT 0 "<<std::endl;}
+ if(myWtData.parent == NULL){std::cout<<" PARENT NULL "<<std::endl;}
+ myWtData.parent = new Wt::WContainerWidget();
+ std::cout<<"Parent created -- DELETE ME -- bbtkWtBlackBox.cxx"<<std::endl;
+ }
+
+ Wt::WContainerWidget *myContainer = new Wt::WContainerWidget(myWtData.parent);
+ myContainer->setMinimumSize(800,500);
+ std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.......50%"<<std::endl;
+ myWtData.b->bbUserCreateWidget(myContainer);
+
root()->addWidget(myWtData.parent);
//bbmWindow = myCont;
this->refresh();
//jss = WtBlackBox::jScript;
- std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.................80%"<<std::endl;
- std::cout<<"Creando WebWIDGET DELETE ME SCRIPT : ---"<<bbtk::jScript<<".................80%"<<std::endl;
+ std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx........80%"<<std::endl;
+ std::cout<<"Creando WebWIDGET DELETE ME SCRIPT : ---"<<bbtk::jScript<<"......80%"<<std::endl;
//this->doJavaScript(bbtk::jScript);
+//EED
+ myWtData.pbox->bbwtUpdateInputs();
+// myWtData.pbox->bbwtProcess();
+
}
//==================================================================
std::string WtBlackBox::wtServerData::docRoot = "<void>";
std::string WtBlackBox::wtServerData::port = "<void>";
- std::string WtBlackBox::wtServerData::address = "0.0.0.0";
- int WtBlackBox::wtServerData::argc = 0;
- char **WtBlackBox::wtServerData::argv = NULL;
+ std::string WtBlackBox::wtServerData::address = "0.0.0.0";
+ int WtBlackBox::wtServerData::argc = 0;
+ char **WtBlackBox::wtServerData::argv = NULL;
//=========================================================================
//=========================================================================
//Setting necessary data for Wt server deployment
myWtData.parent = WWt::GetTopWindow();
myWtData.b = GetThisPointer<WtBlackBox>();
- myWtData.title = std2wt( bbGetInputWinTitle()
- + " - bbtk (c) CREATIS");
-
-
-
-
-
+ myWtData.title = std2wt( bbGetInputWinTitle() + " - bbtk (c) CREATIS");
+ myWtData.pbox = this;
//char *argv[7] = {"./WtTest","--docroot","/home/gonzalez/Documents/pruebaResources","--http-address","0.0.0.0","--http-port","8080"};
//int argc = 7;
Wt::WServer::instance()->stop();
}
*/
+
+
std::cout<<"EED WtBlackBox::bbCreateFrameWindow Deploying Server -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
+
+
// Wt::WRun(argc,argv,&createApplication);
+
Wt::WRun(WtBlackBox::wtServerData::argc,
WtBlackBox::wtServerData::argv,
&createApplication);
+
+
}
//==================================================================
// There is not such a thing like show becouse it is a webapp
// bbGetWindow()->Show();
// WWt::CreateWtAppIfNeeded();
+
+
+ Wt::WRun(WtBlackBox::wtServerData::argc,
+ WtBlackBox::wtServerData::argv,
+ &createApplication);
+
+
bbSetShown(true);
}
}
bbtkBlackBoxDebugMessage("widget",3,"<== WtBlackBox::bbDestroyWindow("<<bbmWindow<<")"<<std::endl);
}
- //==================================================================
+
+
+//==================================================================
+ void WtBlackBox::bbwtUpdateInputs()
+ {
+ BlackBox::bbUpdateInputs();
+ }
+
+//==================================================================
+ void WtBlackBox::bbwtProcess()
+ {
+ BlackBox::bbProcess();
+ }
+
+
}//namespace bbtk
virtual void bbDestroyWindow();
//==================================================================
+ void bbwtUpdateInputs();
+ void bbwtProcess();
+
private:
Wt::WApplication* bbApp;
),
mBox(b)
{
- std::cout<<"Creando Widget DELETE ME bbtkWxBlackBox.cxx--"<<std::endl;
- std::cout<<"NAME : "<<bbtk::wx2std(title);
- if(parent)
- std::cout<<"PARENT : "<<bbtk::wx2std(parent->GetName())<<std::endl;
- else
- std::cout<<" SIN PADRE "<<std::endl;
bbtkDebugMessage("widget",9,"["<<b->bbGetName()<<"] WxFrame()"
<<std::endl);
Wx::IncNbWindowsAlive();
b->bbSetWindow(this);
// Insert the widget into the window
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
- std::cout<<"------------------------------------USER CREATE WIDGET pre DELETE ME bbtkWxBlackBox.cxx--"<<std::endl;
b->bbUserCreateWidget(this);
- std::cout<<"------------------------------------USER CREATE WIDGET post DELETE ME bbtkWxBlackBox.cxx--"<<std::endl;
wxWindow* widget = b->bbGetOutputWidget();
sizer->Add( widget, 1, wxALL|wxGROW, 2);
SetSizer(sizer);
/// Callback for creating a Frame window
void WxBlackBox::bbCreateFrameWindow()
{
- std::cout<<"--/////////////*****////////////////--JFGA Testing bbCreateFrameWindow Starting ....."<<bbGetInputWinTitle()<<"......!! D E L E T M E !! bbtkWxBlackBox.cxx"<<std::endl;
bbtkBlackBoxDebugMessage("widget",3,
"==> WxBlackBox::bbCreateFrameWindow() - parent = "
<<Wx::GetTopWindow()
+ " - bbtk (c) CREATIS"),
wxSize( bbGetInputWinWidth() ,
bbGetInputWinHeight() ) );
- std::cout<<"--/////////////*****////////////////!!--JFGA Testing bbCreateFrameWindow Done ........"<<bbGetInputWinTitle()<<"......!! D E L E T M E !! bbtkWxBlackBox.cxx"<<std::endl;
w->Show();
+
+
}
//==================================================================
{
bbtkBlackBoxDebugMessage("widget",9,"==> WxBlackBox::bbSetWindow("<<w<<")"<<std::endl);
if ((bbmWindow != 0)&&(w!=0))
- {
- std::cout << "ERRRRRRRROOOOR"<<std::endl;
- }
- std::cout<<"SetWindow DELETE ME bbtkWxBlackBox.cxx ------"<<std::endl;
- std::cout<<"WINDOW : "<<bbtk::wx2std(w->GetName())<<std::endl;
+ {
+ std::cout << "WxBlackBox::bbSetWindow ?? EED ?? ERRRRRRRROOOOR"<<std::endl;
+ }
bbmWindow = w;
}
//==================================================================
//==================================================================
void WxBlackBox::bbShowWindow()
{
- std::cout<<"--!!--JFGA Testing bbShowWindow PRE IF "<<bbGetInputWinTitle()<<"......!! D E L E T M E !! bbtkWxBlackBox.cxx"<<std::endl;
if ((bbmWindow) && (!bbIsShown()))
{
bbtkBlackBoxDebugMessage("widget",3,"==> WxBlackBox::bbShowWindow()"
}
else
{
- std::cout<<"--!!--JFGA Testing bbShowWindow "<<bbGetInputWinTitle()<<"......!! D E L E T M E !! bbtkWxBlackBox.cxx"<<std::endl;
bbGetWindow()->Show();
bbSetShown(true);
}
- }
+ } // if
+
+
}
//==================================================================
//=====
void StaticBox::CreateWidget(wxWindow* parent)
{
- std::cout << "creating..." << std::endl;
wxPanel *w=new wxPanel(
parent, //bbGetWxParent(),
-1
{
bbSetInputBoxTitle("");
bbSetInputBoxContent(NULL);
- std::cout << "initialized"<<std::endl;
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)