Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
- Date: $Date: 2009/06/08 14:50:02 $
- Version: $Revision: 1.48 $
+ Date: $Date: 2011/03/03 14:33:13 $
+ Version: $Revision: 1.51 $
=========================================================================*/
/* ---------------------------------------------------------------------
namespace bbtk
{
-
-
static bool bbmgSomeBoxExecuting = false;
static bool bbmgFreezeExecution = false;
static std::set<BlackBox::WeakPointer> bbmgExecutionList;
bbmParent()
{
+ //JCP 02-11-09
+ // bbmBoxProcessMode = "Pipeline";
+//std::cout<<"JCP BlackBox::BlackBox(const std::string &name) name=" <<name
+// <<"bbmBoxProcessMode="<<bbmBoxProcessMode<<std::endl;
bbtkBlackBoxDebugMessage("object",4,"==> BlackBox::BlackBox(\""
<<name<<"\")"<<std::endl);
bbtkBlackBoxDebugMessage("object",4,"<== BlackBox::BlackBox(\""
bbmParent()
{
+ //JCP 02-11-09
+ //bbmBoxProcessMode = from.bbmBoxProcessMode;
+ //std::cout<<"JCP BlackBox::BlackBox(const std::string &name) name=" <<name
+ // <<"bbmBoxProcessMode="<<bbmBoxProcessMode<<std::endl;
bbtkBlackBoxDebugMessage("object",4,"==> BlackBox::BlackBox("
<<from.bbGetFullName()<<",\""
<<name<<"\")"<<std::endl);
bbGetOutputConnectorMap()[o->second->GetName()]
= new BlackBoxOutputConnector(GetThisPointer<BlackBox>());
}
-
}
//=========================================================================
delete (o->second);
}
- bbtkDebugDecTab("kernel",8);
-
+ bbtkDebugDecTab("kernel",8);
}
//=========================================================================
}
bbtkDebugDecTab("kernel",9);
-
}
//=========================================================================
#ifdef USE_WXWIDGETS
|| Wx::IsSomeWindowAlive()
#endif
- );
+ );
}
//=========================================================================
const std::string& p = bbmBoxProcessMode;
if ( (p == "0") ||
(p == "P") || (p == "p") ||
- (p == "Pipeline") || (p == "pipeline") ) return Pipeline;
+ (p == "Pipeline") || (p == "pipeline") ) return bbPipeline;
if ( (p == "1") ||
(p == "A") || (p == "a") ||
- (p == "Always") || (p == "always") ) return Always;
+ (p == "Always") || (p == "always") ) return bbAlways;
if ( (p == "2") ||
(p == "R") || (p == "r") ||
- (p == "Reactive") || (p == "reactive") ) return Reactive;
+ (p == "Reactive") || (p == "reactive") )
+ return bbReactive;
/*
if ( (p == "3") ||
(p == "F") || (p == "f") ||
//=========================================================================
bool BlackBox::bbBoxProcessModeIsReactive() const
{
- return (bbGetBoxProcessModeValue() == Reactive);
+ return (bbGetBoxProcessModeValue() == BlackBox::Reactive);
}
//=========================================================================
//=========================================================================
bool BlackBox::bbBoxProcessModeIsAlways() const
{
- return (bbGetBoxProcessModeValue() == Always);
+ return (bbGetBoxProcessModeValue() == BlackBox::Always);
}
//=========================================================================
o->second->SetStatus(OUTOFDATE);
o->second->SignalChange(GetThisPointer<BlackBox>(),o->first);
}
- }
+ }
if ( ( bbBoxProcessModeIsReactive() ||
(c==bbGetInputConnectorMap().find("BoxExecute")->second))
"=> BlackBox::bbSignalOutputModification("
<<reaction<<")"
<<"]"<<std::endl);
-
+
OutputConnectorMapType::iterator i;
for ( i = bbGetOutputConnectorMap().begin();
i != bbGetOutputConnectorMap().end(); ++i)
bbtkBlackBoxDebugMessage("change",5,
"<= BlackBox::bbSignalOutputModification()"
<<std::endl);
-
}
//=========================================================================
//=========================================================================
"<= BlackBox::bbSignalOutputModification("
<<output<<")"
<<std::endl);
-
}
//=========================================================================
//=========================================================================
bbtkBlackBoxDebugMessage("change",5,
"<= BlackBox::bbSignalOutputModification(vector of outputs)"
<<std::endl);
-
}
//=========================================================================
bbSetExecuting(false);
bbGlobalSetSomeBoxExecuting(wasExecuting);
- return;
-
+ return;
}
//=========================================================================
bbtkBlackBoxDebugMessage("process",4,
"<= BlackBox::bbUpdateInputs()"
- <<std::endl);
-
-
+ <<std::endl);
return s;
}
//=========================================================================
bbtkBlackBoxDebugMessage("process",4,
"<= BlackBox::bbComputePostProcessStatus()"
- <<std::endl);
-
+ <<std::endl);
}
//==================================================================
<<name<<"\","<<c->GetFullName()<<")"
<<std::endl);
-
InputConnectorMapType::iterator i = bbGetInputConnectorMap().find(name);
if (i==bbGetInputConnectorMap().end())
{
i->second->SetConnection(c);
// The input *MUST* be set OUTOFDATE to update its input on next execution
bbSetStatusAndPropagate(i->second,OUTOFDATE);
-
+
bbtkBlackBoxDebugMessage("connection",2,
"<== BlackBox::bbConnectInput(\""
<<name<<"\","<<c->GetFullName()<<")"
- <<std::endl);
-
+ <<std::endl);
}
//=========================================================================
"==> BlackBox::bbConnectOutput(\""<<name<<"\","
<<c->GetFullName()<<")"
<<std::endl);
-
+
OutputConnectorMapType::iterator i = bbGetOutputConnectorMap().find(name);
if (i==bbGetOutputConnectorMap().end())
{
bbtkBlackBoxDebugMessage("connection",2,
"<== BlackBox::bbConnectOutput(\""<<name<<"\","
<<c->GetFullName()<<")"
- <<std::endl);
-
+ <<std::endl);
}
//=========================================================================
bbtkBlackBoxDebugMessage("connection",2,
"==> BlackBox::bbDisconnectInput(\""<<name
<<"\","<<c->GetFullName()<<")"
- <<std::endl);
-
+ <<std::endl);
if (!c)
{