Program: bbtk
Module: $RCSfile: bbtkExecuter.h,v $ $
Language: C++
- Date: $Date: 2008/04/22 09:40:10 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2008/10/02 07:43:20 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Sets the mode of dialog of the executer for Root inputs
void SetDialogMode(DialogModeType t) { mDialogMode = t; }
+ void SetNoErrorMode(bool b) { mNoErrorMode = b; }
+
+ bool GetNoErrorMode() const { return mNoErrorMode; }
//=================================================================
/// no exec mode flag
bool mNoExecMode;
+
/// Dialog mode
DialogModeType mDialogMode;
+
+ /// no error mode flag
+ bool mNoErrorMode;
+
};
}
#endif
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/09/10 12:01:46 $
- Version: $Revision: 1.70 $
+ Date: $Date: 2008/10/02 07:43:20 $
+ Version: $Revision: 1.71 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
info.argmin = 1;
info.argmax = 2;
info.code = cExec;
- info.syntax = "exec <box | 'freeze' | 'unfreeze' >";
- info.help = "Executes the black box of name <box> (and connected boxes if needed). If the special keyword 'freeze' is given then freezes any further execution command. 'unfreeze' reverts to normal execution mode.";
+ info.syntax = "exec <box | 'freeze' | 'unfreeze' | 'freeze_no_error' >";
+ info.help = "Executes the black box of name <box> (and connected boxes if needed). If the special keyword 'freeze' is given then freezes any further execution command. 'unfreeze' reverts to normal execution mode. 'freeze_no_error' is like freeze but also skips any error.";
mCommandDict[info.keyword] = info;
info.keyword = "package";
}
else
{
+ std::cout << "!!!HERRR bbtk"<<std::endl;
std::stringstream mess;
mess << "* ERROR : "<<e.GetMessage()<<std::endl;
if (mFileName.size()) {
}
else
{
+ std::cout << "!!!HERRR std"<<std::endl;
std::stringstream mess;
mess << "* ERROR : "<<e.what()<<std::endl;
if (mFileName.size()) {
}
else
{
+ std::cout << "!!!HERRRunk "<<std::endl;
std::stringstream mess;
mess << "* UNDEFINED ERROR (not a bbtk nor a std exception)"
<< std::endl;
{
str.erase(size-1,1);
}
-
- InterpretLine(str, insideComment);
+ try
+ {
+ InterpretLine(str, insideComment);
+ }
+ CATCH_MACRO;
}//while
CloseCurrentFile();
{
str.erase(size-1,1);
}
-
- InterpretLine(str, insideComment);
-
+ try
+ {
+ InterpretLine(str, insideComment);
+ }
+ CATCH_MACRO;
}//while
-
CloseCurrentFile();
}
}
case cExec :
if (words[1]=="freeze")
- mVirtualExecuter->SetNoExecMode(true);
- else if (words[1]=="unfreeze")
- mVirtualExecuter->SetNoExecMode(false);
- else
- mVirtualExecuter->Execute(words[1]);
+ {
+ mVirtualExecuter->SetNoExecMode(true);
+ mThrow = false;
+ }
+ else if (words[1]=="freeze_no_error ")
+ {
+ mVirtualExecuter->SetNoExecMode(true);
+ mVirtualExecuter->SetNoErrorMode(true);
+ mThrow = false;
+ }
+ else if (words[1]=="unfreeze")
+ {
+ mVirtualExecuter->SetNoExecMode(false);
+ mVirtualExecuter->SetNoErrorMode(false);
+ }
+ else
+ {
+ mVirtualExecuter->Execute(words[1]);
+ }
break;
case cInput :
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/07/23 11:46:11 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2008/10/02 07:43:20 $
+ Version: $Revision: 1.33 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Puts the executer in "no exec" mode,
/// which creates but does not execute pipelines.
- void SetNoExecMode(bool b) { mVirtualExecuter->SetNoExecMode(b); }
+ void SetNoExecMode(bool m) { mVirtualExecuter->SetNoExecMode(m); }
+ /// Puts the executer in "no error" mode,
+ /// Errors do not stop execution (but warnings are produced)
+ void SetNoErrorMode(bool m) { mVirtualExecuter->SetNoErrorMode(m);}
///
//typedef Executer::DialogModeType DialogModeType;
typedef VirtualExec::DialogModeType DialogModeType;
- void SetDialogMode(DialogModeType t)
- { mVirtualExecuter->SetDialogMode(t); }
+ void SetDialogMode(DialogModeType t) { mVirtualExecuter->SetDialogMode(t);}
/// Sets the bool that indicates wether we are in command line context
void SetCommandLine(bool v = true) { mCommandLine = v; }
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.cxx,v $ $
Language: C++
- Date: $Date: 2008/04/21 07:01:52 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/10/02 07:43:21 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
Transcriptor::Transcriptor(const std::string& filename)
:
- mNoExecMode(false),
mDialogMode(NoDialog)
{
//VirtualExec();
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.h,v $ $
Language: C++
- Date: $Date: 2008/04/18 12:59:16 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2008/10/02 07:43:21 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
m_Fp << " e->SetNoExecMode(false);" << std::endl;
}
- bool GetNoExecMode() const { return mNoExecMode; }
+ void SetNoErrorMode(bool b)
+ {
+ if (b)
+ m_Fp << " e->SetNoErrorMode(true);" << std::endl;
+ else
+ m_Fp << " e->SetNoErrorMode(false);" << std::endl;
+ }
+
+ bool GetNoExecMode() const { return false; }
+ bool GetNoErrorMode() const { return false; }
/// Sets the mode of dialog of the executer for Root inputs
void SetDialogMode(DialogModeType t) { mDialogMode = t; }
/// The input values of the Root ComplexBlackBox
std::map<std::string,std::string> mInputs;
- /// no exec mode flag
- bool mNoExecMode;
-
/// Dialog mode
DialogModeType mDialogMode;
Program: bbtk
Module: $RCSfile: bbtkVirtualExec.h,v $ $
Language: C++
- Date: $Date: 2008/05/06 13:45:12 $
- Version: $Revision: 1.15 $
+ Date: $Date: 2008/10/02 07:43:21 $
+ Version: $Revision: 1.16 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Sets the mode of dialog of the executer for Root inputs
virtual void SetDialogMode(DialogModeType t) = 0;
+ /// Puts the executer in "no error" mode,
+ /// Errors do not stop execution (but warnings are produced)
+ virtual void SetNoErrorMode(bool b) = 0;
+ virtual bool GetNoErrorMode() const = 0;
//=================================================================
/// Loads a package
virtual void LoadPackage(const std::string &name ) = 0;
print "That's all "
print "folks"
+