Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $
Language: C++
- Date: $Date: 2010/09/14 07:18:46 $
- Version: $Revision: 1.88 $
+ Date: $Date: 2010/09/15 14:17:17 $
+ Version: $Revision: 1.89 $
=========================================================================*/
/* ---------------------------------------------------------------------
GetExecuter()->UnLoadPackage(packageName);
}
- //ups2 EED Borrame
+ void Interpreter::commandBreak()
+ {
+ /*
+ std::cout << "BreakException("
+ <<in_script<<","
+ <<file<<","
+ <<line<<")"<<std::endl;
+ */
+ bbtkError("break");//,in_script,file,line);
+ // throw BreakException(in_script,file,line);
+ }
+
+ void Interpreter::commandQuit()
+ {
+ bbtkError("quit");//,in_script,file,line);
+ //throw QuitException(in_script,file,line);
+ }
+
+ void Interpreter::commandMessage()
+ {
+ mVirtualExecuter->HelpMessages();
+ }
+
+//ups2 EED Borrame
+ void Interpreter::commandMessage(std::string kind, std::string levelstr)
+ {
+ int level=0;
+ sscanf(levelstr.c_str(),"%d",&level);
+ mVirtualExecuter->SetMessageLevel(kind,level);
+
+ }
+
//=======================================================================
bbtkDebugMessage("interpreter",9,
"Command='"<<command.keyword
<<"' code="<<command.code<<std::endl);
- int level=0;
+
std::string left,right,left2,right2;
std::string filename;
+//ups1 EED borrame
// message command
if (command.code==cMessage)
{
if (words.size()<3)
{
- mVirtualExecuter->HelpMessages();
+ commandMessage();
+//EED Borrame mVirtualExecuter->HelpMessages();
}
else
{
- sscanf(words[2].c_str(),"%d",&level);
- mVirtualExecuter->SetMessageLevel(words[1],level);
+ commandMessage(words[1],words[2]);
+//EED Borrame sscanf(words[2].c_str(),"%d",&level);
+//EED Borrame mVirtualExecuter->SetMessageLevel(words[1],level);
}
return;
}
<<file<<","
<<line<<")"<<std::endl;
*/
- bbtkError("break");//,in_script,file,line);
+ commandBreak();
+//EED Borrame bbtkError("break");//,in_script,file,line);
// throw BreakException(in_script,file,line);
}
else
{
- bbtkError("quit");//,in_script,file,line);
+ commandQuit();
+//EED Borrame bbtkError("quit");//,in_script,file,line);
//throw QuitException(in_script,file,line);
}
return;
case cSet :
Utilities::SplitAroundFirstDot(words[1],left,right);
- commandSet(left,right,words[1]);
+ commandSet(left,right,words[2]);
//EED Borrame mVirtualExecuter->Set(left,right,words[2]);
break;
break;
case cNewGUI :
- NewGUI(words[1],words[2]);
+ commandNewGUI(words[1],words[2]);
break;
case cCategory :
case cIndex :
if (words.size()==1)
- Index("tmp_index.html");
+ commandIndex("tmp_index.html");
else if (words.size()==2)
- Index(words[1]);
+ commandIndex(words[1]);
else if (words.size()==3)
- Index(words[1],words[2]);
+ commandIndex(words[1],words[2]);
break;
case cDescription :
break;
case cHelp :
- Help(words);
+ commandHelp(words);
break;
case cGraph :
- Graph(words);
+ commandGraph(words);
break;
case cConfig :
- Config();
+ commandConfig();
break;
case cReset :
- Reset();
+ commandReset();
break;
case cClear :
//EED Borrame GetExecuter()->UnLoadPackage(words[1]);
break;
- //ups1 EED borrame
case cDebug :
- if (words.size()==2) Debug(words[1]);
- else Debug("");
+ if (words.size()==2) commandDebug(words[1]);
+ else commandDebug("");
break;
/* obsolete
//=======================================================================
- void Interpreter::Reset()
+ void Interpreter::commandReset()
{
// Cannot close all files if the reset command is read from a file !
CloseAllFiles();
//=======================================================================
/// Displays help on all the commands
-void Interpreter::Help(const std::vector<std::string>& words)
+void Interpreter::commandHelp(const std::vector<std::string>& words)
{
unsigned int nbarg = words.size()-1;
//===================================================================
/// Displays the Configuration
- void Interpreter::Config() const
+ void Interpreter::commandConfig() const
{
ConfigurationFile::GetInstance().GetHelp(1);
}
}
//=======================================================================
-void Interpreter::Graph(const std::vector<std::string>& words)
+void Interpreter::commandGraph(const std::vector<std::string>& words)
{
std::string page;
bool system_display = true;
//=======================================================================
-void Interpreter::Index(const std::string& filename,
+void Interpreter::commandIndex(const std::string& filename,
const std::string& type)
{
Factory::IndexEntryType t;
//=======================================================================
-void Interpreter::NewGUI(const std::string& boxname,
+void Interpreter::commandNewGUI(const std::string& boxname,
const std::string& instanceName)
{
if (mRealExecuter.expired())
//==========================================================================
- void Interpreter::Debug(const std::string& name)
+ void Interpreter::commandDebug(const std::string& name)
{
if ((name.length()==2)&&(name[0]=='-'))
{