Program: bbtk
Module: $RCSfile: bbtkAtomicBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2009/05/28 08:12:05 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2012/07/26 08:28:31 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbtk::AtomicBlackBoxInputDescriptor
(typeid(AtomicBlackBoxDescriptor),
"BoxProcessMode",
- "Sets the processing mode of the box (Pipeline | Always | Reactive)",
+ "Sets the processing mode of the box (Pipeline | Always | Reactive | Manual)",
"",
new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbGetInputBoxProcessMode),
new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbSetInputBoxProcessMode) ) );
Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
- Date: $Date: 2011/07/22 17:42:50 $
- Version: $Revision: 1.54 $
+ Date: $Date: 2012/07/26 08:28:31 $
+ Version: $Revision: 1.55 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbmExecuting(false),
bbmName(name),
bbmBoxProcessMode("Pipeline"),
+ bbLetRecursiveExecuteManualMode(false),
bbmParent()
{
bbmExecuting(false),
bbmName(name),
bbmBoxProcessMode(from.bbmBoxProcessMode),
+ bbLetRecursiveExecuteManualMode(false),
bbmParent()
{
(p == "F") || (p == "f") ||
(p == "Flash") || (p == "flash") ) return Flash;
*/
- bbtkError(bbGetFullName()<<" : BoxProcessMode value '"<<p
+
+ if ( (p == "3") ||
+ (p == "M") || (p == "m") ||
+ (p == "Manual") || (p == "manual") ) return bbManual;
+
+ bbtkError(bbGetFullName()<<" : BoxProcessMode value '"<<p
<<"' unknown. Possible values : "
<<"'0'/'P'/'p'/'Pipeline'/'pipeline' | "
<<"'1'/'A'/'a'/'Always'/'always' | "
<<"'2'/'R'/'r'/'Reactive'/'reactive'"
// <<"'3'/'F'/'f'/'Flash'/'flash'"
- <<std::endl);
+ <<"'3'/'M'/'m'/'Manual'/'manual'"
+ <<std::endl);
}
//=========================================================================
//=========================================================================
-
+ //=========================================================================
+ bool BlackBox::bbBoxProcessModeIsManual() const
+ {
+ return (bbGetBoxProcessModeValue() == bbManual);
+ }
+ //=========================================================================
+
//=========================================================================
void BlackBox::bbAddOutputObserver(const std::string& output,
// If force is true then update is triggered even if the box is UPTODATE
// if (force) bbSetModifiedStatus();
+ if ( bbBoxProcessModeIsManual() )
+ {
+ bbLetRecursiveExecuteManualMode = true;
+ }
+
+
// Calls the main recursive execution method
bbRecursiveExecute(Connection::Pointer());
+
+ if ( bbBoxProcessModeIsManual() )
+ {
+ bbLetRecursiveExecuteManualMode = false;
+ }
+
+
bbtkBlackBoxDebugMessage("process",2,
"<= BlackBox::bbExecute()"
<<std::endl);
this->bbCreateWindow();
// Updates its inputs
- IOStatus s = bbUpdateInputs();
-
- if ( (s != UPTODATE) ||
- bbBoxProcessModeIsAlways() )
+
+// IOStatus s;
+ IOStatus s=UPTODATE;
+// IOStatus s=OUTOFDATE;
+// IOStatus s=MODIFIED;
+
+
+ if ( ( bbBoxProcessModeIsManual()==false ) ||
+ ( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==true) ) )
+ {
+ s = bbUpdateInputs();
+ }
+
+ if ( (s != UPTODATE) || bbBoxProcessModeIsAlways() )
{
// Displays the window (WxBlackbox)
// bbShowWindow(caller);
// Actual processing (virtual)
- this->bbProcess();
-
-
- // Update the I/O statuses
- bbComputePostProcessStatus();
+ if ( ( bbBoxProcessModeIsManual()==false ) ||
+ ( (bbBoxProcessModeIsManual()==true)&&(bbLetRecursiveExecuteManualMode==true) )
+ )
+ {
+ this->bbProcess();
+ } // Manual analysis
+
+//EED ups if ((bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false))
+//EED ups {
+//EED ups bbSignalOutputModification(true);
+//EED ups }
+
+
+ // Update the I/O statuses
+ bbComputePostProcessStatus();
}
else
{
for ( o = bbGetOutputConnectorMap().begin();
o!= bbGetOutputConnectorMap().end(); ++o)
{
- o->second->SetStatus(new_output_status);
+
+//EED if ( ( bbBoxProcessModeIsManual()==false ) ||
+//EED ( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==true) )
+//EED )
+//EED {
+ o->second->SetStatus(new_output_status);
+//EED } else {
+//EED if (( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false) ) )
+//EED {
+//EED o->second->SetStatus(UPTODATE);
+//EED }
+//EED } // Manual analysis
+
}
bbtkBlackBoxDebugMessage("process",4,
Program: bbtk
Module: $RCSfile: bbtkBlackBox.h,v $
Language: C++
- Date: $Date: 2011/03/03 14:33:13 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2012/07/26 08:28:31 $
+ Version: $Revision: 1.33 $
=========================================================================*/
/* ---------------------------------------------------------------------
{
bbPipeline,
bbAlways,
- bbReactive
+ bbReactive,
+ bbManual
}
BoxProcessModeValue;
virtual bool bbBoxProcessModeIsReactive() const;
/// Returns true iff the input 'BoxProcessMode' is set to 'Always' (or a synonym)
virtual bool bbBoxProcessModeIsAlways() const;
+ /// Returns true iff the input 'BoxProcessMode' is set to 'Manual' (or a synonym)
+ virtual bool bbBoxProcessModeIsManual() const;
/// Returns the value of the input 'BoxExecute'
Void bbGetInputBoxExecute() { return Void(); }
/// Sets the value of the input 'BoxExecute'
- void bbSetInputBoxExecute(Void = 0) {}
+ void bbSetInputBoxExecute(Void = 0) { }
/// Returns the value of the output 'BoxChange'
Void bbGetOutputBoxChange() { return Void(); }
/// Sets the value of the output 'BoxChange'
- void bbSetOutputBoxChange(Void = 0) { }
+ void bbSetOutputBoxChange(Void = 0) { }
//@}
//==================================================================
/// 0 : "Pipeline" mode
/// 1 : "Always" mode
/// 2 : "Reactive" mode
+ /// 3 : "Manual" mode
std::string bbmBoxProcessMode;
/// The parent of the black box in the ComplexBlackBox hierarchy
BlackBox::WeakPointer bbmParent;
/// Map that contains the input connectors of the black box
InputConnectorMapType mInputConnectorMap;
//==================================================================
+
+
+ bool bbLetRecursiveExecuteManualMode;
};
// Class BlackBox