Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/03/20 15:27:56 $
- Version: $Revision: 1.50 $
+ Date: $Date: 2008/03/21 11:44:37 $
+ Version: $Revision: 1.51 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool exm = mCommandLine;
mCommandLine = false;
- ExitStatus status = OK;
+ ExitStatus status = Interpreter_OK;
try
}
catch (QuitException e)
{
- status = QUIT;
+ status = Interpreter_QUIT;
if (mThrow) throw QuitException();
}
catch (bbtk::Exception e)
mess << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
mess << "* LINE : "<<mLine.back()<<std::endl;
}
- status = ERROR;
+ status = Interpreter_ERROR;
if (mThrow)
throw bbtk::Exception("Interpreter","",mess.str());
else
- std::cerr << mess;
+ std::cerr << mess.str();
}
catch (std::exception& e)
mess << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
mess << "* LINE : "<<mLine.back()<<std::endl;
}
- status = ERROR;
+ status = Interpreter_ERROR;
if (mThrow)
throw bbtk::Exception("Interpreter","",mess.str());
else
- std::cerr << mess;
+ std::cerr << mess.str();
}
catch (...)
{
mess << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
mess << "* LINE : "<<mLine.back()<<std::endl;
}
- status = ERROR;
+ status = Interpreter_ERROR;
if (mThrow)
throw bbtk::Exception("Interpreter","",mess.str());
else
- std::cerr << mess;
+ std::cerr << mess.str();
}
CloseAllFiles();
bool exm = mCommandLine;
mCommandLine = false;
- ExitStatus status = OK;
+ ExitStatus status = Interpreter_OK;
try
{
}
catch (QuitException e)
{
- status = QUIT;
+ status = Interpreter_QUIT;
}
catch (bbtk::Exception e)
{
std::cerr << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
std::cerr << "* LINE : "<<mLine.back()<<std::endl;
}
- status = ERROR;
+ status = Interpreter_ERROR;
}
catch (std::exception& e)
{
std::cerr << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
std::cerr << "* LINE : "<<mLine.back()<<std::endl;
}
- status = ERROR;
+ status = Interpreter_ERROR;
}
catch (...)
{
std::cerr << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
std::cerr << "* LINE : "<<mLine.back()<<std::endl;
}
- status = ERROR;
+ status = Interpreter_ERROR;
}
CloseAllFiles();
{
bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine('"<<line<<"')"<<std::endl);
- ExitStatus status = OK;
+ ExitStatus status = Interpreter_OK;
try
{
}
catch (QuitException e)
{
- status = QUIT;
+ status = Interpreter_QUIT;
}
catch (bbtk::Exception e)
{
std::cerr << "* ERROR : "<<e.GetMessage()<<std::endl;
- status = ERROR;
+ status = Interpreter_ERROR;
}
catch (std::exception& e)
{
std::cerr << "* ERROR : "<<e.what()<<" (not in bbtk)"<<std::endl;
- status = ERROR;
+ status = Interpreter_ERROR;
}
catch (...)
{
std::cerr
<< "* UNDEFINED ERROR (not a bbtk nor a std exception)"<<std::endl;
- status = ERROR;
+ status = Interpreter_ERROR;
}
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/03/20 15:27:56 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2008/03/21 11:44:37 $
+ Version: $Revision: 1.19 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
class BBTK_EXPORT InterpreterUser
{
public:
- InterpreterUser() {};
- ~InterpreterUser() {};
+ InterpreterUser() {}
+ ~InterpreterUser() {}
virtual bool InterpreterUserHasOwnHtmlPageViewer() { return false; }
virtual void InterpreterUserViewHtmlPage(const std::string&) {}
typedef enum
{
- OK,
- ERROR,
- QUIT
+ Interpreter_OK,
+ Interpreter_ERROR,
+ Interpreter_QUIT
}
ExitStatus;
Program: bbtk
Module: $RCSfile: bbtkWxGUIConsole.cxx,v $
Language: C++
- Date: $Date: 2008/03/20 15:27:57 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/03/21 11:44:37 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
mWxGUIOutputMessages->Print(s,wxRED);
if ( mInterpreter->InterpretLine( command ) ==
- Interpreter::QUIT )
+ Interpreter::Interpreter_QUIT )
{
Close(true);
}
bool WxGUIConsole::InterpretFile( const std::string& filename)
{
if ( mInterpreter->InterpretFile(filename) ==
- Interpreter::ERROR )
+ Interpreter::Interpreter_ERROR )
{
return false;
}